[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NR pdf is larger with current git by 15%

From: Masamichi Hosoda
Subject: Re: NR pdf is larger with current git by 15%
Date: Sat, 11 Jul 2020 21:36:39 +0900 (JST)

>> From the same PostScript file, the new method generates a PDF of
>> 7081 bytes and the old method generates a PDF of 6423 bytes.  The
>> new method is more than 10 % larger than the old method.
> Do you consider this a bug in gs or a feature?
>> From `old-to-new.diff`, it seems that the amount of drawing
>> operators in the /Contents has increased significantly.
> OK.  What do you think about opening a ghostscript issue, asking the
> developers for an explanation?  Maybe our new method can be slightly
> adapted to avoid the size increase.

I tried another method that adds `-sDEVICE=pdfwrite -sOutputFile=/dev/null`
and removes `-dNODISPLAY` from the new method.

$ gs -dNOSAFER -dNOPAUSE -dBATCH -dAutoRotatePages=/None -dPrinted=false 
-sDEVICE=pdfwrite -sOutputFile=/dev/null

$ qpdf --qdf

$ diff -u foo.old-method.qdf > old-to-new.diff


As a result, the drawing operators in PDF are the same as the old method.
Ghostscript seems to need `-sDEVICE=pdfwrite` to produce the PDF we expect.

Is the device specifying way on the new method (without `-sDEVICE=pdfwrite`)
documented by Ghostscript documents?
If not, it is not a bug in my humble opinion.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]