Re: Ghostscript file creation



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.)



.



Relevant Pages

  • Re: Ghostscript file creation
    ... The following is the command I'm using from a Dos Box ... Ghostscript is obviously splitting the file because it displays 41 1 page ... in the OutputFile parameter. ... A better way is to use PDFTK, which has a burst command ready-made: ...
    (comp.lang.postscript)
  • Re: increasing scsi_max_sg / max_segments for scsi writes/reads
    ... I tried working on scsi_malloc to increase burst size ... > | read/write sectors per command. ... > | read/write through a single scsi command, ... > To unsubscribe from this list: ...
    (Linux-Kernel)
  • Re: ICBM warheads
    ... > Satellites are too vulnerable, ... that ICBM vehicles were specially designed to take a ... "fail safe" command to "disarm" to the last few seconds of final descent arc ... device to initiate its burst. ...
    (sci.military.moderated)
  • HY57V643220CT datasheet
    ... ideally suited for the memory applications which require wide data I/O ... pipelined to achieve very high bandwidth. ... read or write cycles initiated by a single control command (Burst ...
    (sci.electronics.design)
  • Re: Need advice on being a tankadin
    ... using either hammer of justice + judgement of command + seal of command ... + melee hit as an aggro burst to get a mob back on me, ... threat overall than Seal of Righteousness? ...
    (alt.games.warcraft)