John-Paul Stewart wrote:
wrote:
John-Paul Stewart wrote:
wrote:
Now, if only there was a fix for flipping the image 180 degrees. =/ Maybe some combination of acroread -toPostScript and GS with the box switch....
Why can't montage be used for that? You can flip with 'montage -flip' or rotate with 'montage -rotate 180' depending on the exact nature of the problem.
True, but the problem is, it doesn't happen on EVERY PDF we need to add to the set.
Ahh...I see...that makes things dramtically more complex. You'll have to start looking into what causes the unwanted rotation.
Is it rotation or flipping? If it's flipped rather than rotated then I'd suspect the MediaBox might be to blame. Check some of the PDFs (in any text editor or even 'less'). Common PDFs have something like:
/MediaBox [0 0 612 792]
for U.S. Letter-size paper. I think it's possible, however, to have non-zero starting points and/or negative ending points which might result in images being treated oddly. I don't know off hand how well
/MediaBox [0 792 612 0]
or
/MediaBox [0 0 612 -792]
would be handled. Either may well result in an inverted image in GhostScript. (I'm just speculating at the moment....)
So-called press-ready PDFs may also have TrimBox and CropBox. Likewise, odd numbers in one of those *might* result in an inverted image.
Sorry I really can't offer anything more than speculation. (But since I'm not seeing too many other responses...maybe speculation is better than nothing.)
No no, speculation is good!
For example SaGS speculation above about the CropBox fixed half the problem. The speculation about using pdftk (while I've only been able to play with it on my own PC and as yet unable to install it on the server) has yielded some additional info, and the speculation about the PDF versions has increased my knowledge a little bit... so speculation is great. =)
Unfortunately it's not flipping, but rotating.
What it is, is it's generally only happening on the "back" image of a two-sided product (business card, post card, etc.) The front and back images are two different files, not two pages of the same file.
Evidently someone will design the back, and then flip it upside down so that when it's laid out on the "flat" for printing, it's in the right orientation.
However, in this thumbnail creation process, it's SUPPOSED to stay upside down, but GS is flipping it back right-side-up. So when you open it in any Adobe product it displays upside-down which is correct, but GS and other PDF readers are shoing it in the originally designed right-side up.
If it was happening to ALL back side PDFs I could set it up so that GS flipped the image before it then ran montage. But it's not always happening. =/
I'm hoping to be able to get this pdftk installed on the server, and see if outputting the metadata I can find a common link, like a particular application or version or something I can rely on to determine GS flipping or not.
Anyway, thanks for the replies!
-Liam