Reputation: 40
I have multipage PDF eg. ~ 80 pages
gs -dNumRenderingThreads=2 -c 30000000 setvmthreshold -f -dNOGC
-sDEVICE=jpeg -q -dSAFER -dNOPAUSE -dBATCH -dMaxBitmap=100000000
-dJPEGQ=100 -r300 -dPDFFitPage -dFIXEDMEDIA
-sDEFAULTPAPERSIZE=a4 -sOutputFile='.$output_name.'temp%04d.jpg $input_file
First was trying to split whole pdf but its start to show error invalidfileaccess in --showpage ...
File is ok because first i check if it's exists Now i chunk pdf to 10 pages pdf but still is the same problem and after i run chunked pdf in loop its removeing the file with error and all others files from loop
Upvotes: 0
Views: 211
Reputation: 40
Problem sloved there was strange situation with TMP DIR need to be foreach export TMP diffrent dir
Upvotes: 0
Reputation: 31207
The most likely problem is that you are running out of disk space, either on the destination or in the /tmp volume, or possibly a memory error.
You should start by simplifying the command line; get rid of the NumRenderingThreads which probably isn't doing anything at all at 300 dpi, remove the extraneous -c... -f and the -dNOGC, these are constraining the memory and preventing GS from garbage collecting, which means that its memory usage will continually increase.
Remove -dSAFER as that affects file writing. Put -sPAPERSIZE=a4 before -dFIXEDMEDIA, as the order of operands is important.
If that solves the problem put commands back one at a time until the problem recurs.
Finally, what verison of Ghostscript are you using, and please post the entire erorr trace.
Upvotes: 1