[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NR pdf is larger with current git by 15%
From: |
Jonas Hahnfeld |
Subject: |
Re: NR pdf is larger with current git by 15% |
Date: |
Sun, 12 Jul 2020 12:11:40 +0200 |
User-agent: |
Evolution 3.36.4 |
Am Sonntag, den 12.07.2020, 18:57 +0900 schrieb Masamichi Hosoda:
> >>> I've found the documented way to specify Ghostscript devices
> >>> without `-sDEVICE=pdfwrite`. It is using the operator
> >>> `selectdevice`.
> >
> > Thanks for investigating. The main question remains why gs produces
> > suboptimal results without `selectdevice`.
>
> `selectdevice` is defined in gs_init.ps as follows.
>
> ```
> /selectdevice
> { finddevice setdevice .setdefaultscreen } bind def
> ```
>
> `selectdevice` does `setdevice` and then `.setdefaultscreen`.
> If we use only `setdevice`, then `.setdefaultscreen` is not done.
Aha. So should we just call .setdefaultscreen ourselves? (calling
"[...] setdevice (pdfwrite) finddevice setdevice" is duplicate) Looks
like it was introduced long ago, so we can safely rely on it.
Jonas
> I've found that `.setdefaultscreen` is described here.
> https://www.ghostscript.com/doc/current/History3.htm#V3.61_Interpreter
>
>
> Here's a quote.
>
> -------------
> Defines a .setdefaultscreen procedure that sets the default halftone screen,
> transfer function, and stroke adjustment for the current device. Changes
> selectdevice and setpagedevice so that they call .setdefaultscreen;
> setpagedevice calls .setdefaultscreen before calling the Install procedure,
> so that Install can set different parameters if it wishes. Note that
> setdevice does not do this. (gs_init.ps, gs_setpd.ps)
> -------------
>
> It seems to set some defaults for the current device.
>
> This means that if we use only `setdevice`, those defaults are not set.
> In that case, many drawing operators need to be written,
> including the defaults that can be omitted if I understand correctly.
>
signature.asc
Description: This is a digitally signed message part
- 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, 2020/07/11
- 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 <=
- Re: NR pdf is larger with current git by 15%, Masamichi Hosoda, 2020/07/12