For Programmers: Free Programming Magazines  


Home > Archive > PostScript > February 2005 > Centering pages with GhostScript









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Centering pages with GhostScript
No Such Luck

2005-02-25, 9:00 pm

Hi All:

I use a GhostScript 8.14 command to rasterize 8.5" x 11" PDF pages to
JPG images, and it works really well. However, I have a PDF file with
rather strange page dimensions (looks to be roughly 8.5" x 17"). When I
use this command to rasterize these pages to jpgs, the jpg is 8.5" x
11" (good), but but the contents of the original PDF page are
left-aligned in the jpg (bad), leaving a lot of white space on the
right. Is there anyway to center the contents of the PDF page onto the
8.5" x 11" jpg image?

Here is the command I am using for all PDF files, and I'd like to still
only use one command for all PDF files:

gswin32c.exe -dNOPAUSE -dBATCH -sDEVICE=jpeg -r150
-sOutputFile=test-page%04d.jpg -dFirstPage=1 -dLastPage=1 test.pdf

Thanks for any help.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com