[SOLVED] PDF file support

ezcat

Joined: 2008-05-11
Posts: 19
Posted: Wed, 2009-09-30 13:51

Is there any way to add a PDF file in Gallery like I can add a JPG file? I currently have V2.2 installed.

Thanks,
Jon

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-09-30 14:08

I believe if you use ImageMagick as your graphics toolkit then Gallery2 will support pdfs. See
http://codex.gallery2.org/Gallery2:Modules:imagemagick

 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Wed, 2009-09-30 15:46

I'm facing the same issue. Not only I have also problem browsing video file (.mov and .avi). Here the output of the test of imagemagick plug in:

image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/photoshop
image/x-photo-cd
image/wmf
image/tga
image/jpeg-cmyk
image/tiff-cmyk
application/photoshop-cmyk

rocsca

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-09-30 16:18

ImageMagick needs extra software installed and configured on your server, see the link I posted please.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Wed, 2009-09-30 22:20

Ask your host to install ghostscript binary so that is available to imagemagick to use.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Thu, 2009-10-01 12:04

Thanks Dave. Infact, it just was GS that I had to install.. :-) Moreover I missed to increase the max size of upload in 'php.ini' file. But this is no a matter of Gallery.. Now I miss the head facing the problem of thumbnail for uploaded PDF documents. They was created (Infat I see them in gallery data dir) but the browser (either IE or FF) does not display them. I have enabled debugging of Gallery but no error of imagemagick I have found.

I only see that the thumb is not displayed as if the link is corrupted. Here the relative path that have to generate the thumb:

/main.php?g2_view=core.DownloadItem&g2_itemId=2407&g2_serialNumber=2

If I try to follow it I get:

Error Detail -
Error (ERROR_BAD_PARAMETER)

* in C:\Apache2.2\htdocs\gallery2\modules\core\DownloadItem.inc at line 65 (GalleryCoreApi::error)
* in C:\Apache2.2\htdocs\gallery2\main.php at line 450 (DownloadItemView::renderImmediate)
* in C:\Apache2.2\htdocs\gallery2\main.php at line 104
* in C:\Apache2.2\htdocs\gallery2\main.php at line 88

System Information
Gallery version 2.3
PHP version 5.2.5 apache2handler
Webserver Apache/2.2.6 (Win32) proxy_html/3.0.0 PHP/5.2.5
Database mysqlt 5.0.27-community-nt
Toolkits ImageMagick, Gd
Operating system Windows NT W2K-WEBHOSTING5 5.0 build 2195
Browser Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.8.1) Gecko/20061010 Firefox/2.0 (.NET CLR 3.5.30729)

I can't figure out why I can't see the thumbs.

Thanks in advance for your help.

rocsca

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22892
Posted: Fri, 2009-10-02 03:14

Since IM is working... uninstall GD so that is not adding to the confusion.
URL?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Fri, 2009-10-02 07:40

Thanks Dave. I have disinstalled GD.

Here the URL to see that really my theme has a problem with thumbnail...

http - <colon+double slash> - www.rocsca.it - <slash> - gallery2 - <slash> -

Nome Utente: test
Password: test

Thanks in advance,

rocsca

 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Fri, 2009-10-02 07:44

Sorry Dave,

I just have tried with a smaller document (about 100K) and the thumb is displayed correctly.. The proble so is when the uploaded document is too big.. I think..

Is there exist any workaround or is just a bug?

Still thanks,

rocsca

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-10-02 11:33

IE cannot display images in the CMYK colorspace.
I have posted a fix for imagemagick/CMYK colorspace before - search for it.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Fri, 2009-10-02 12:23

I don't think that is a matter of CMYK. Because it is not enabled (In IM plugin settings). But I can try to apply the fix anyway.. What I have to looking for to find this fix?

rocsca

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6138
Posted: Fri, 2009-10-02 12:58
 
rocsca
rocsca's picture

Joined: 2009-05-12
Posts: 75
Posted: Fri, 2009-10-02 13:41

Simply great!! It work well now!! I really really thank you!!

rocsca