Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jun 2019 17:05:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 238583] print/gv: X11 resource "gsCmdConvPDF" is defined specifying nonexistent gs device "pswrite"
Message-ID:  <bug-238583-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238583

            Bug ID: 238583
           Summary: print/gv: X11 resource "gsCmdConvPDF" is defined
                    specifying nonexistent gs device "pswrite"
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: david@catwhisker.org

This is running:
albert(11.3)[1] uname -a
FreeBSD albert.catwhisker.org 11.3-BETA3 FreeBSD 11.3-BETA3 #998=20
r348830M/348832: Sun Jun  9 03:47:33 PDT 2019=20=20=20=20
root@freebeast.catwhisker.org:/common/S1/obj/usr/src/sys/ALBERT  amd64

with these ports installed:
albert(11.3)[2] pkg info -o gv\* ghostscript\*
gv-3.7.4_5                     print/gv
ghostscript9-agpl-base-9.27_2  print/ghostscript9-agpl-base
ghostscript9-agpl-x11-9.27     print/ghostscript9-agpl-x11

albert(11.3)[3] gs -h | grep 'ps[^ ]*write'
   eplcolor eplmono eps2write eps9high eps9mid epson epsonc escp escpage
   pr1000_4 pr150 pr201 ps2write psdcmyk psdcmyk16 psdcmykog psdrgb psdrgb16
   x11cmyk8 x11gray2 x11gray4 x11mono xcf xes xpswrite

albert(11.3)[4] grep gsCmdConvPDF
/usr/local/{share/gv/gv_system.ad,lib/X11/app-defaults/GV}
/usr/local/share/gv/gv_system.ad:GV.gsCmdConvPDF:       gs -dNOPAUSE -dQUIET
-dBATCH -sDEVICE=3Dpswrite -sOutputFile=3D%s -f %s -c save pop quit
/usr/local/lib/X11/app-defaults/GV:!GV.gsCmdConvPDF:    gs -dNOPAUSE -dQUIET
-dBATCH -sDEVICE=3Dpswrite -sOutputFile=3D%s -f %s -c save pop quit

>From file:///usr/local/share/doc/ghostscript/9.27/Devices.htm#PS:
4.2 PS2 writer

The ps2write device outputs postscript language level 2. It is recommnded t=
hat
this device is used for PostScript output. There is no longer any support f=
or
creating PostScript level 1 output.

(I reached the above by selecting the "PostScript file output" link from
file:///usr/local/share/doc/ghostscript/9.27/Devices.htm.)

End-user-visible symptoms of the issue:
Attempting to print from gv fails; if the user happens to notice, a message=
 is
emitted (to the controlling tty, if there is one), e.g.:
albert(11.3)[19] gv bike.pdf=20
Unknown device: pswrite
lpr: No file in print request.


As a circumvention, I tried placing:
! Fix gv conversion from PDF to PostScript
GV.gsCmdConvPDF:                gs -dNOPAUSE -dQUIET -dBATCH -sDEVICE=3Dps2=
write
-sOutputFile=3D%s -f %s -c save pop quit

in the file where I keep my personal X11-related resources (~/.Xresources),
then running "xrdb -merge ~/.Xresources".  While this no longer generates e=
rror
messages, and does print the file, I find that the image is slightly offset=
 and
(as a result) trimmed (since the printer in question is a laser printer, and
has  an "unprintable margin" of about 0.5" or so).  I am not clear on how to
address this.

In passing, I note that "info gv" claims (under "(gv)Resources of gv"):
*gsCmdConvPDF*
     The command used to convert a PDF file to PostScript.

     It defaults to `gs -dNODISPLAY -dQUIET  -dNOPAUSE -sPSFile=3D%s %s
     -c quit'

I tried specifying that purported default in ~/.Xresources; it also fails.

It is also possible that gv ought not be attempting to "convert to PostScri=
pt"
when the invoker wishes to print: apparently generating PostScript has fall=
en
out of fashion, and folks/applications are expected to only use PDF nowaday=
s.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-238583-7788>