PDF First page thumbnail plugin PDF First page thumbnail plugin
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

PDF First page thumbnail plugin

Started by hoeksma, November 09, 2010, 07:48:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hoeksma

I have writen a plugin which will create for all PDF's you upload a thumbnail and normal sized picture of the first page of the PDF you uploaded. It requires ImageMagick (convert) and ghostscript to be installed.

Fixed the issue below about the file test.

Sierk


Αndré


waycik

I tried to install this plugin in "Coppermine Photo Gallery 1.5.10 (stable)", but all I get is:

Parse error: syntax error, unexpected T_BOOLEAN_AND in /home/XXXXXXXX/public_html/cpg15x/plugins/thumbnail_pdf/codebase.php on line 166

(I put the X's in to replace my user name)

Any chance someone could give me a little more insight into the problem?

Αndré

Open codebase.php, find
if (is_pdf($file) ) && file_exists($normal)) { // is PDF   
and replace with
if (is_pdf($file) && file_exists($normal)) { // is PDF   

waycik


waycik

I successfully installed the plugin according to the plugin manager, and I'm running Coppermine on a server that I know has imagemagick and ghostscript on it, but it doesn't seem like I'm getting any thumbnails of pdf files.

I have successfully generated thumbnails using gallery2 on the same server, but I was hoping to replace gallery2 (which is an awful gallery compared to this one) with Coppermine which I know and love.

Hopefully, I'm doing something very simple the wrong way and someone can steer me in the right direction.

Thank you.

papukaija

Quote from: waycik on December 09, 2010, 12:04:23 AM
someone can steer me in the right direction.

That would be much easier with a link to your gallery (which is required by board rules).

waycik

Oops! Sorry. I'm a newbie here.

http://www.mathshare.com
(which is also set up at http://www.math-drills.ca/mathshare/

and the gallery2 install that does work for thumbnails is http://www.math-drills.ca/gallery2/

Thanks for pointing out my mistake.

Peter

papukaija

Do you get any error messages to your server's log or cpg's log?

waycik

No errors other than a failed login and missing files: favicon.ico and robots.txt, but I don't think those are related.

papukaija

Are sure that you gave the correct absolute path to convert binary when you installed the plugin?

waycik

Yes, I used the same path as the Gallery2 install.

papukaija

Maybe it's a bug in the plugin. If you want to be sure about, set the cpg's graphic engine to imagemagic in your gallery's settings and try to add some images. If that works or if you're already using imagemagic in cpg, then it's a bug in the plugin. If not, it might be a good idea to contact your hosting's support about the imagemagick.

waycik

I tried that already and any images I upload get thumbnailed, but the pdf files don't. Method for resizing images is set to ImageMagick and the path is /usr/bin/, same as I gave to the plugin.

hoeksma

Below i provide my configuration settings, hopes this helps

Absolute path to convert binary:   /usr/bin/convert
Width of the PDF Image:   300

Quinn

This is not working for me either. Have tried all the above suggestions with no joy.

Link to galley in my signature...

AnnuN

Dear I am using Wamp 2.0 and I already installed ghostscript 9 and Imagemagik on my system. Plugin installed successfully but I am unable to preview the PDF file.. So please help

Stramm

You guys should make sure you not only to have installed ImageMagick but also to have told CPG to make use of it.

AnnuN

Dear in configuration I am using this path as ImageMagik is placed on this absolute path and i.e.

D:\ImageMagick\convert.exe and I am specifying D:/ImageMagick/convert.exe 

and ghost script

C:\Program Files\gs\gs9.02\bin\gswin32.exe

Now tell me what o do next

Stramm

If you do not enter the path whilst installing the gallery, CPG is using GD2
It's in the config -> file settings , something like 'method to resize images'. Make sure this is set to ImageMagick