[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: 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 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.


> I've found that `.setdefaultscreen` is described here.
> 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.  (,
> -------------
> 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.

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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