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.
Also, in my Modules Site Administration the Thumbnail Manager is not active, so I tryed to "Activate" it and it comes up with this page:
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:
GD Version 2.0.28 (Bundled)
ImageMagic 5.5.6
NetPBM Passed everything
Posts: 8601
that bug is fixed.. update to current cvs or nightly snapshot.
to get thumbnails for pdf you can:
1) use thumbnail manager to assign a default thumbnail used for all pdfs
2) make sure you have both imagemagick and gs (ghostscript) on your system and activate the G2 imagemagick module.. then you'll get pdf thumbnails of the first page of the pdf. you can additionally activate the Thumbnail Page module which lets you pick which page# to use for the thumbnail (edit document / thumb page tab)
Posts: 50
How do I update to the lastest CVS or nightly snapshot? I have no idea what these are.
Thanks
Posts: 3236
Look at the FAQ stickied in this forum.
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..
Posts: 3236
Take another look at the FAQ, looking for "nightly" zip/tar files.
Posts: 113
http://galleryupdates.jpmullan.com/ - I think.
If you're feeling adventurous, try WinCVS or TortoiseCVS
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..
Posts: 50
By the way I do use Powweb.com
Does anyone else have problems on Powweb ?
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.
Posts: 974
Yes.
Also, yes, and yes. You can find some ancient and rudimentary WinCVS instructions on my galleryupdates site, also.
Posts: 113
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:
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.[/]
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
Posts: 8601
gs needs to be in your path so imagemagick can find it.
does "identify modules/imagemagick/test/data/test.pdf" work?
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
Binary Name Pass/Fail
identify Passed
convert Passed
composite Passed
(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" ? )
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
change this code:
to:
I think that works.. you might also need isset($child.mimeType) in the "if"
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?
Posts: 8601
hmm, i tried it out.. i'll give as much detail as you did
It worked.
Posts: 50
Well, I went into the .tpl and replaced the code with:
uploaded, and then uploaded another .pdf file to see if it created a Thumbnail and it still didnt.
**UPDATE** this does work
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
arg1="view=core:DownloadItem" arg2="itemId=`$child.id`"}{else}{g->url
arg1="view=core:ShowItem" arg2="itemId=`$child.id`"}{/if}">{/capture}
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.
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..
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..
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.
Posts: 8601
you never posted the output of the identify command from the command line..
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?
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...
Posts: 50
ok, here is a new error when I try and upload 3 or more PDF files
Posts: 8601
that's an error from trying to copy the uploaded file to its location in g2data/albums.
enable debug output to get more detail on the error, if it is reproducible.
is the disk full or something like that?
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.
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.
Posts: 50
See if this works:
Posts: 8601
that appears to be an error stack trace, but there is no debug output.
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
Posts: 50
It didnt... still won't create thumbnails..
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).
Posts: 50
Let me know how it goes Mindless
Posts: 8601
so, I posted waaaay back in this topic:
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:
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:
image/gif
image/jpeg
image/pjpeg
image/jp2
image/jpg2
image/jpx
image/png
image/tiff
image/svg+xml
image/bmp
application/pdf
application/postscript
So it does show pdf support?
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:
now you have something to give your webhost.. give them the identify command too and ask them to make sure that command works reliably.
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.
Posts: 50
Waiting on the E-mail from Powweb
Posts: 50
Ok, they are not responding.. anything else I can do?
Posts: 7994
I pinged JadeaDragon, who does tech support for PowWeb. Hopefully she'll respond here soon with advice.
Posts: 50
Great, Thanks
Posts: 50
I hate to bring this back up, but has anyone figured this out or have any fixes for this?
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.
Posts: 50
Ok, I will need some direction on how to install imagemagick, and where to get it...
(sorry to be so illiterate)
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?
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.
then you'll have to activate buffered debug mode and do
site admin -> maintenance -> build thumbs and resizes
Posts: 8
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
Operand stack:
--dict:5/5(L)-- 1 --dict:6/6(ro)(G)-- xref
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3
%oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval--
--nostringval-- --nostringval-- %loop_continue --nostringval--
false 1 %stopped_push --nostringval-- %loop_continue
--nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1072/1123(ro)(G)-- --dict:0/20(G)-- --dict:93/200(L)--
--dict:93/200(L)-- --dict:97/127(ro)(G)-- --dict:229/230(ro)(G)--
--dict:16/24(L)--
Current allocation mode is local
Error Output:
GNU Ghostscript 7.07: Unrecoverable error, exit code 1
identify: Postscript delegate failed
`/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery/g2data/albums/Dealer
Backpages/testpdf/CDGi_Theater_Seat_Models.pdf'.
Status: 1 (expected 0)
chdir(/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery)
realpath(/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery/modules/core/classes/../../../)
Error (ERROR_TOOLKIT_FAILURE)in
modules/imagemagick/classes/ImageMagickToolkit.class at line 405
(gallerystatus::error)
in modules/imagemagick/classes/ImageMagickToolkit.class at
line 130 (imagemagicktoolkit::_getimagedimensions)
in modules/core/classes/GalleryDerivative.class at line 483
(imagemagicktoolkit::performoperation)
in modules/core/classes/GalleryDerivative.class at line 312
(galleryderivativeimage::_rebuildcache)
in modules/core/classes/GalleryDerivativeImage.class at line
175 (galleryderivative::rebuildcache)
in
modules/core/classes/helpers/GalleryDerivativeHelper_advanced.class at
line 703 (galleryderivativeimage::rebuildcache)
in modules/core/classes/GalleryCoreApi.class at line 830
(galleryderivativehelper_advanced::rebuildcache)
in
modules/core/classes/helpers/GalleryDerivativeHelper_simple.class at
line 66 (gallerycoreapi::rebuildderivativecache)
in modules/core/classes/GalleryCoreApi.class at line 817
(galleryderivativehelper_simple::rebuildcacheifnotcurrent)
in modules/core/classes/BuildDerivativesTask.class at line
92 (gallerycoreapi::rebuildderivativecacheifnotcurrent)
in modules/core/AdminMaintenance.inc at line 104
(buildderivativestask::run)
in ??? at line 0 (adminmaintenancecontroller::runtask)
in modules/core/classes/GalleryTemplateAdapter.class at line
730
in
g2data/smarty/templates_c/%%3681953864/%%0B^0B4^0B4F6589%%theme.tpl.php
at line 267 (gallerytemplateadapter::trailer)
in lib/smarty/Smarty.class.php at line 1251
in modules/core/classes/GallerySmarty.class at line 90
(smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 228
(gallerysmarty::fetch)
in main.php at line 316 (gallerytemplate::display)
in main.php at line 87
in main.php at line 80
copy(/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery/modules/core/classes/../data/broken-image.gif,
/home/httpd/vhosts/gallery.cinemadesigngroup.com/httpdocs/gallery/g2data/cache/derivative/4/8/4837.dat)
Thanks again!
Posts: 8601
the module reports pdf is supported because ghostscript is present.. however, it appears it isn't working, at least for this file.