PDF thump and user upload

Hello,
I have 3 big problems.
I have class text object also installed to upload pdf. Unfortunately, it does not recognize what is in the pdf. Is there somewhere a manual as I can instalieren the plugin pdf-thumb-generational and especially where? Is it possible that you can also download the pdfs then, currently, it can only be seen online on the browser.
and quite another question. Is it possible that I can see the image, the image which user has uploaded? That would be important because of the image rights.

Thanks for the help and excuse my bad english!

sonson

Hallo,
ich habe class-textobjekt installiert um auch pdf´s hochladen zu können. Leider erkennt man jetzt nicht was in der pdf steht. Gibt es irgendwo eine Anleitung, wie ich das Plugin pdf-thumb-generation installieren kann und vor allem wo? Ist es auch möglich, das man die pdfs dann auch runterladen kann, im Augenblick ist es nur online auf dem Browser zu sehen.
und eine ganz andere Frage. Ist es möglich, dass ich am Bild sehe, welcher user das Bild hochgeladen hat? Das wäre wegen der Bildrechte schon wichtig.

Vielen DAnk für die Hilfe!!!

sonson

Comments

  • acrylian Administrator, Developer
    1. Zenphoto cannot generate thumbs from non standard gallery items like video, audio and also PDF. Actually the graphic libary on the server cannot.

    I have naturally no knowledge about the 3rd party plugin pdf-thumb-generation. In any case it requires to install Ghostscript binary on the server itself. Unless you have your own server you most likely cannot respectively are not allowed to do that at all (e.g. on shared hosting).

    You have to follow these instructions: http://www.zenphoto.org/news/problems-with-albums-and-images#thumbnails-for-videos-are-not-created

    2. You can download pdf by adding a full image link to the theme used. See the standard themes, the function documentation and the theming tutorial on the user guide. 3rd party themes might be more complicated.

    3. On the backend you have to visit the image edit page to see the owner. You could also modify the theme used to display the owner. Again please see the resources above.
  • I found once a code that seems to work without Ghostscript, even w/o ImageMagick (both are missing in my host's server!) although the authors insisted that this needs IM. And the output file could be not only jpg but also png.
    Only one bad thing - I didn't find the way how to set the code to just use the 1st page of pdf. It makes images from each page.

    // Start

    $pdf_file = './originalfile.pdf';
    $save_to = './outputfolder/outputfile.jpg'; //make sure that apache has permissions to write in this folder! (common problem)

    exec('convert "'.$pdf_file.'" -colorspace RGB -resize 300 "'.$save_to.'"', $output, $return_var);

    // Just to verify

    if($return_var == 0) { //if exec successfuly converted pdf to jpg
    print "Conversion OK";
    }
    else print "Conversion failed.".implode(',', $output);

    // End

    Where (and which parts of the code) should I put to be able to test it? Of course I mean not only thumbs but also the "details size"
  • fretzl Administrator, Developer
    Why not just try the `class-WEBdocs` plugin ?
  • acrylian Administrator, Developer
    @fretzl: The reason is of course to not have to create and upload the thumbs manually.

    @Jaanus: There exists also a PHP PDF extensions:
    http://www.php.net/manual/de/intro.pdf.php
    But again it needs to be installed on the server then working with PDFs would probably work without Ghostscript and Imagick. But I never had access to it.

    The easiest without is to use what fretzl recommended.
Sign In or Register to comment.