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