Does PDF Thumbnails work?
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Greetings. I was just wondering if PDF thumbnails worked on the new G2 that was released. Because I can upload the .pdf file. But it still has no thumbnail. Error (ERROR_MISSING_OBJECT) : GalleryGroup in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1613 (gallerystatus::error) in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 284 (mysqldatabasestorage::_describeentitymembers) in modules/core/classes/GalleryStorage.class at line 113 (mysqldatabasestorage::loadentities) in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 89 (gallerystorage::loadentities) in modules/core/classes/GalleryCoreApi.class at line 2018 (galleryentityhelper_simple::loadentitiesbyid) in modules/core/classes/helpers/GalleryPermissionHelper_advanced.class at line 93 (gallerycoreapi::loadentitiesbyid) in modules/core/classes/helpers/GalleryPermissionHelper_advanced.class at line 74 (gallerypermissionhelper_advanced::_postgroupevent) in modules/core/classes/GalleryCoreApi.class at line 537 (gallerypermissionhelper_advanced::addgrouppermission) in modules/thumbnail/classes/ThumbnailHelper.class at line 213 (gallerycoreapi::addgrouppermission) in modules/thumbnail/module.inc at line 122 (thumbnailhelper::additem) in modules/core/AdminModules.inc at line 108 (thumbnailmodule::activate) in main.php at line 170 (adminmodulescontroller::handlerequest) in main.php at line 47 in main.php at line 40
Some info you might want: |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
that bug is fixed.. update to current cvs or nightly snapshot. to get thumbnails for pdf you can: |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
How do I update to the lastest CVS or nightly snapshot? I have no idea what these are. |
|
fryfrog
Joined: 2002-10-30
Posts: 3236 |
![]() |
Look at the FAQ stickied in this forum. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
So apparently to us the CVS you have to have the Unix Command line, which I do not run the server locally and my host does not give me a command line.. |
|
fryfrog
Joined: 2002-10-30
Posts: 3236 |
![]() |
Take another look at the FAQ, looking for "nightly" zip/tar files. |
|
CSpotkill
Joined: 2004-12-11
Posts: 113 |
![]() |
http://galleryupdates.jpmullan.com/ - I think. If you're feeling adventurous, try WinCVS or TortoiseCVS |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
That's what I needed. Thanks. I udpated and the Thumbnail manager works. Apparently my hosting company does not have Ghostscript on their system, so I e-mailed them asking to set it up for me. So that should fix the PDF auto thumbnail for me. One thing I think this needs though, is to be able to assign a thumbnail to each file. Instead of having ONE default image for all .pdf files. You should be able to assign 1 image to 1 .pdf file. Just a thought.. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
By the way I do use Powweb.com |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
I haven't heard too many complaints about PowWeb. If you're having problems with them, please let me know. Remember that they're geared up to support Gallery 1.x, and are only coming up to speed on Gallery 2.x now (remember that G2 is still an alpha product!). We have plans to allow you to assign a custom thumbnail to each file. Won't happen in the near future, but it will happen. |
|
jmullan
![]()
Joined: 2002-07-28
Posts: 974 |
![]() |
CSpotkill wrote:
http://galleryupdates.jpmullan.com/ - I think. Yes. Also, yes, and yes. You can find some ancient and rudimentary WinCVS instructions on my galleryupdates site, also. |
|
CSpotkill
Joined: 2004-12-11
Posts: 113 |
![]() |
jmullan wrote:
You can find some ancient and rudimentary WinCVS instructions on my galleryupdates site, also. I'm using the latest version of WinCVS for pulling G2 right now ... though I didn't see your instructions ;) Oooh, after looking at them now, they really are out of date. It's now a lot easier to checkout source code in WinCVS: Quote:
Feel free to update your web page with these instructions, or repost them in the G2 FAQ (or in a separate stickied thread). If you use them, please give credit to Louis St-Amour (CSpotkill), if possible. Also, please save the image locally, as it is currently hosted on my home ADSL connection. Thanks.[/] |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Wowser, nice lookin instructions CSpot. Well I contacted Powweb and they do have Ghostscript v7.97 enabled and everything else... So now I am wondering why no PDF thumbnail... Any suggestions on what I should check to see if it's enabled? I do know it's Alpha and still has stuff to work out, I just love playing around with it |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
gs needs to be in your path so imagemagick can find it. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I am not 100% sure what you mean. But I went into the admin section, clicked on ImageMagick and clicked "test Settings". and it came back: ImageMagick binary test results (Also, how could I edit the gallery, so that I can just view the gallery, click on the pdf file and have it go directly to the PDF instead of going to the NEXT page where it says "download this document" ? ) |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
I meant trying the identify command from the command line when logged into your server. You could accomplish the direct download using a layouts/matrix/templates/albumBody.tpl.local {capture name="link"}<a href="{g->url arg1="view=core:ShowItem" arg2="itemId=`$child.id`"}">{/capture} to: {capture name="link"}<a href="{if $child.mimeType == "application/pdf"}{g->url arg1="view=core:DownloadItem" arg2="itemId=`$child.id`"}{else}{g->url arg1="view=core:ShowItem" arg2="itemId=`$child.id`"}{/if}">{/capture} I think that works.. you might also need isset($child.mimeType) in the "if" |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Didnt work. I could P.M someone the link to the gallery and give them admin privilages and see if they could get it to work that way? can I trust someone with this? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
hmm, i tried it out.. i'll give as much detail as you did It worked. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Well, I went into the .tpl and replaced the code with: Quote:
{capture name="link"}<a href="{if $child.mimeType == "application/pdf"}{g->url uploaded, and then uploaded another .pdf file to see if it created a Thumbnail and it still didnt. **UPDATE** this does work |
|
CSpotkill
Joined: 2004-12-11
Posts: 113 |
![]() |
The {capture name="link"} code is only to directly download the .pdf file from the link/thumbnail, it won't magically fix the thumbnail problem on its own, that's something else, probably configuration-related. I'd recommend re-installing a recent GhostScript 8 RPM (on Linux) or using the installation wizard on Windows. If you leave it in the default installation directory, ImageMagick should find it, no problemo. As for adding the code to the if statement, I'd assume it would look something like this: {capture name="link"}<a href="{if isset($child.mimeType) && $child.mimeType == "application/pdf"}{g->url All that should do is see whether child.mineType is set before confirming the value as "application/pdf". Again, it also won't magically fix the thumbnail problem, but it might prevent errors if there isn't a mimeType for the item. Or something like that. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Ok, yea that worked perfect, I got a little confused on a few issues, but they got resolved. So it does go directy to them. Now on to the thumbnail making again.... This is wacky.. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Could there be a certain folder that I am not CHMODing correctly? The only one I did was g2data at 777 Also, I uploaded a typical JPG file and there WAS a thumbnail created for it.. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I recon I am just S.O.L. I will wait until the beta and install it and see if my Thumbnails appear. Thanks for the help though. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
you never posted the output of the identify command from the command line.. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
The identify command is not recognized on the server... Is there any other way of doing this output to a Powweb.com server? Does anyone know? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
I'm not familiar with what PowWeb offers, but they have good tech support so you could forward this forum thread to them and ask them if they can help and see what comes of it... |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
ok, here is a new error when I try and upload 3 or more PDF files Quote:
Error (ERROR_PLATFORM_FAILURE) |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
that's an error from trying to copy the uploaded file to its location in g2data/albums. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I enabled Debuggin, and it just linked to the files that was giving the errors.. it was the same error. No the disk is not even close to being full. |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
The problem is that you're only including part of the debug output (the stack trace) which doesn't include other information that we really need to diagnose your problem. Can you take all the debug output, save it into a file, put it on your website and post a link to it here? That will probably help us figure out what's going wrong. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
See if this works: |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
that appears to be an error stack trace, but there is no debug output. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I am currently updating the software with the vary latest CVS version and deleted all the MYSQL files, just doing a complete reinstall.. Hope it works |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
It didnt... still won't create thumbnails.. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
how about you put your G2 in buffered debug mode and PM me a G2 username/passwd I can use to upload items (either your admin login or a new user with appropriate permissions to add items). |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Let me know how it goes Mindless |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
so, I posted waaaay back in this topic: Quote:
gs needs to be in your path so imagemagick can find it. take a look at the list of supported mime types in thumbnail manager or the Test Settings output from Imagemagick site admin... the mime type for PDF is NOT listed! this means imagemagick isn't finding ghostscript so it won't support pdf. put this test.php file in your gallery2 directory: <?php system("/usr/local/bin/identify modules/imagemagick/test/data/test.pdf"); print "---------------"; system("which gs"); ?> |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I added test.php in the root directory so you can check it out. Also, I did the "test settings" for imagemagic and the supported MIME types are: So it does show pdf support? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
haha, yes it turns out your problem is intermittent.. try "test settings" a few times and you'll see pdf only shows up sometimes. I tried test.php and see that gs is in /usr/local/bin/gs, so it is installed ok. Here's the error message from running "identify" that I see from test.php: Quote:
Unrecoverable error: rangecheck in .putdeviceprops now you have something to give your webhost.. give them the identify command too and ask them to make sure that command works reliably. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Holiday is getting me a bit busy, but come monday or tuesday I will write them a note and see if they can figure it out. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Waiting on the E-mail from Powweb |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Ok, they are not responding.. anything else I can do? |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
I pinged JadeaDragon, who does tech support for PowWeb. Hopefully she'll respond here soon with advice. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Great, Thanks |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
I hate to bring this back up, but has anyone figured this out or have any fixes for this? |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
if your webhost has some broken software installed and won't fix it then i guess you could try installing your own copy of imagemagick and give the appropriate path to the G2 imagemagick module. |
|
lamur
Joined: 2004-12-11
Posts: 50 |
![]() |
Ok, I will need some direction on how to install imagemagick, and where to get it... |
|
laughingtiger
Joined: 2005-10-14
Posts: 8 |
![]() |
Hello, I've got the latest release of G2 installed using the latest version of the PG theme and I'm able to see .pdf as supported file type. However, G2 does not generate thumbnails of the pdf. It creates a broken document icon and a link to the document download. Any ideas? |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
so in site admin -> imagemagick, when you click test, it lists application/pdf or something like that? only then you can expect thumbs for pdf. if you get the broken thumbnail and we're talking about the same broken thumbnail (modules/core/data/broken-image.gif), then it tries to generate thumbs for pdf but it fails. |
|
laughingtiger
Joined: 2005-10-14
Posts: 8 |
![]() |
valiant wrote:
so in site admin -> imagemagick, when you click test, it lists application/pdf or something like that? only then you can expect thumbs for pdf. Thanks for the prompt response. Imagemagick does show pdf as a supported MIME type. I rebuilt thumbs and resizes to no avail. I believe the pertinent error output is as follows: Error: /undefined in /BXlevel Error (ERROR_TOOLKIT_FAILURE)in copy(/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery/modules/core/classes/../data/broken-image.gif, Thanks again! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Quote:
GNU Ghostscript 7.07: Unrecoverable error, exit code 1 the module reports pdf is supported because ghostscript is present.. however, it appears it isn't working, at least for this file. |
|