Re: Ghostscript file creation
- From: "Uwe" <uwe@xxxxxxxxxx>
- Date: Mon, 12 Nov 2007 17:51:24 -0500
Thank you; Thank you!
"Ross Presser" <rpresser@xxxxxxxxx> wrote in message
news:1194897678.264136.169640@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Nov 12, 2:26 pm, "Uwe" <u...@xxxxxxxxxx> wrote:
I'm having a problem with creating files. I want to split a large PDF
into 1
page files in windows. The following is the command I'm using from a Dos
Box
I've also tried it from the RUN command line directly:
gswin32c -dnopause -dbatch -soutputfile # C:\TestPDF\xtest%%02d.pdf
test.pdf
Ghostscript is obviously splitting the file because it displays 41 1 page
files in the viewer but it does NOT write any files to disk.
Help Uwe
1. Nearly all parameters to gs are case sensitive, including the
OutputFile parameter.
2. You did not provide a DEVICE parameter at all, so the default
device -- for gswin32c, the display -- was used.
3. Worst of all, the pdfwrite device does not respect the %d argument
in the OutputFile parameter. Even if you had done the whole command
"correctly"
gswin32c -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=C:\TestPDF
\xtest%%02d.pdf test.pdf
you'd get only one output file.
If you must use Ghostscript to burst your PDF, you must wrap it in a
loop.
for /L %%p in (1,1,41) do (
gswin32c -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=C:\TestPDF
\xtest%%p.pdf -dFirstPage=%%p -dLastPage=%%p test.pdf
)
A better way is to use PDFTK, which has a burst command ready-made:
pdftk test.pdf burst output c:\TestPDF\xtest%%d.pdf
pdftk can be found here:
http://www.accesspdf.com/pdftk/
(All % signs are doubled, because I assume you are putting these
commands into .cmd batch files.)
.
- References:
- Ghostscript file creation
- From: Uwe
- Re: Ghostscript file creation
- From: Ross Presser
- Ghostscript file creation
- Prev by Date: NEW -> typesetterforum.com
- Next by Date: limitcheck due to Japanese characters.
- Previous by thread: Re: Ghostscript file creation
- Next by thread: Re: Ghostscript file creation
- Index(es):
Relevant Pages
|
|