[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 gs-command.ps
...snip...
$ qpdf --qdf foo.new-method.pdf foo.new-method.qdf
$ diff -u foo.old-method.qdf foo.new-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.
- NR pdf is larger with current git by 15%, Werner LEMBERG, 2020/07/10
- Re: NR pdf is larger with current git by 15%, Masamichi Hosoda, 2020/07/11
- Re: NR pdf is larger with current git by 15%, Werner LEMBERG, 2020/07/11
- Re: NR pdf is larger with current git by 15%, Karlin High, 2020/07/11
- Re: NR pdf is larger with current git by 15%,
Masamichi Hosoda <=
- Re: NR pdf is larger with current git by 15%, Masamichi Hosoda, 2020/07/11
- Re: NR pdf is larger with current git by 15%, Jonas Hahnfeld, 2020/07/11
- Re: NR pdf is larger with current git by 15%, Werner LEMBERG, 2020/07/11
- Re: NR pdf is larger with current git by 15%, Masamichi Hosoda, 2020/07/12
- Re: NR pdf is larger with current git by 15%, Jonas Hahnfeld, 2020/07/12
- Re: NR pdf is larger with current git by 15%, Masamichi Hosoda, 2020/07/12