attempting to convert the attached PDF to 1.3 via ps2pdf13 malfunctions with error messages: Error: /VMerror in --.pushpdf14devicefilter-- VM status: 3 1423361 2721528 Current allocation mode is local Last OS error: 2 AFPL Ghostscript 8.54: Unrecoverable error, exit code 1
Created attachment 2835 [details] a pdf file which cannot be converted to 1.3 by AFPL Ghostscript 8.54
ps2pdf and pdf2pdf13 both works fine without error and the two generated pdf seems valid, but ps2pdf (which in this case generates pdf 1.4) is a lot faster. (1) do you really mean pdf 1.3? (2) the spec of your machine running ghostscript? VMerrors sometimes are due to limited resources on under-powered machines. (I ran your pdf file on an opteron with 1GB memory).
A conversion to PDF 1.3 needs to convert transparncy into bitmap. It may need to allocate a whole page raster buffer - 3*HWResolution.x*HWResolution.y*Width*Height (in inches) - it's a pretty big walue. Ensure you comp is capable of that. Specify a slapper resolution with -r instead the default 600 dpi. We're sorry for this poor architectural solution in Ghostscript. We're got plans for improving it with inserting a banding buffer between the interpreter and pdfwrite device.
s/slapper/smaller
ok, lack of memory is probably the explanation then. I've tried it now on a bigger amount of memory, 512M, previously it was on 128M, the conversion uses at least 380MB and now crashes with a totally different message, so it is probably now running out of memory elsewhere, the error messages now are: Error: /rangecheck in --.discardtransparencygroup-- Operand stack: --dict:6/6(L)-- 1 false --dict:10/14(L)-- Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- false 1 %stopped_push --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- 2116 --nostringval-- 3 12 %oparray_pop --nostringval-- false 1 %stopped_push 3 12 %oparray_pop --nostringval-- --nostringval-- Dictionary stack: --dict:1120/1686(ro)(G)-- --dict:2/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:105/127(ro)(G)-- --dict:253/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:20/20(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:2/5(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:9/17(L)-- Current allocation mode is local Last OS error: No such file or directory AFPL Ghostscript 8.54: Unrecoverable error, exit code 1 is there any trick way around the problem? can I convert it in 2 stages in a way that bypasses the memory constraint? unfortunately I dont have access to a 1G machine and using OS VM will probably be much too slow,
SUCCESS! I put -r200 twice and now no errors!
how feasible would it be to _optionally_ expand the bitmap to a file instead of to memory? because then say 10Gig even would be no problem and you can retain the current algorithm, that way people can go via memory and if that fails give a command line arg like: -sUseBitMapFile=/x/y/z the user needs to specify the temporary file as the user will know which volume has enough space, ideally an empty volume entirely for this purpose,
Passing to Ken since he handles pdfwrite from now.
*** This bug has been marked as a duplicate of 689805 ***