:: Re: [DNG] Printing -- now even pdf …
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Hendrik Boom
日付:  
To: dng
古いトピック: Re: [DNG] Printing -- now works.
題目: Re: [DNG] Printing -- now even pdf works. I have no idea why.
On Thu, Apr 21, 2016 at 03:18:10PM +0100, Rainer Weikusat wrote:
> Hendrik Boom <hendrik@???> writes:
> > On Wed, Apr 20, 2016 at 05:43:10PM +0100, Rainer Weikusat wrote:
> >> Hendrik Boom <hendrik@???> writes:
> >>
> >> [Brother printer]
> >>
> >> > I did manage to get the printer going. I should have mentionned long
> >> > ago what the final problem was.
> >> >
> >> > It turns out I was trying to print a pdf to a postscript printer. I
> >> > thought that pdf was a specialized form of postscript, the way inkscape
> >> > files are a specialized form of svg. Turns out that was completely
> >> > wrong.
> >>
> >> This suggests that something is wrong with the driver/ input filter
> >> setup. That's supposed to convert the input file to something the
> >> printer understands. I can print PostScript, PDF and a number of kinds
> >> of files just fine.
> >
> > I'm using the driver from Brother, and lpr from lprng. I found the
> > lprng-doc package. I suppose the next thing is to read it,
>
> My (working) /etc/printcap looks like this:
>
> DCP7010:\
>         :mx=0:\
>         :sd=/var/spool/lpd/DCP7010:\
>         :sh:\
>         :lp=/dev/usb/lp0:\
>         :if=/usr/local/Brother/lpd/filterDCP7010:


And this is mine:

HL3170CDW:\
        :mx=0:\
        :sd=/var/spool/lpd/hl3170cdw:\
        :sh:\
        :lp=POSTSCRIPT_P1@172.25.1.15:\
        :if=/opt/brother/Printers/hl3170cdw/lpd/filterhl3170cdw:


When I use lpr to feed it a postscript file, such as the following:

%! PRINTPS.CPP PostScript OUTPUT
/cour /Courier findfont 5 scalefont def
cour setfont gsave
%54 756 moveto (cd ~/sys/web/chimera-1.65) show
%54 751 moveto (test-chimera &) show
/cm 72 2.545 div def
% In theory should use 2.54 not 2.545, but this is more accurate on my printer.
/side cm 3 div def
/ssin side 2 div def
/ccos side 30 cos mul def
/vert { 0 side neg rmoveto 0 side rlineto } def
/rise { ccos ssin rlineto } def
/lower { ccos ssin neg rlineto } def
/hexbottom { lower rise } def
/bottomrow { gsave 0 side neg rmoveto
    hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom 
    hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom 
    hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom 
    hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom  hexbottom 
    stroke grestore } def
/arc {vert rise lower } def 
/row {  arc arc arc arc arc arc arc arc
    arc arc arc arc arc arc arc arc
    arc arc arc arc arc arc arc arc
    arc arc arc arc arc arc arc arc
    vert } def
/lowrow {
    gsave 0 side neg rmoveto lower stroke grestore
    gsave row rise stroke grestore
    } def
/highrow { gsave row stroke grestore } def
/2row { lowrow
    ccos side ssin add rmoveto
    highrow
    ccos neg side ssin add rmoveto } def
newpath
54 54 moveto
0.25 setlinewidth 
bottomrow
2row 2row 2row 2row 2row 2row 2row 2row 2row 2row 2row 2row
2row 2row 2row 2row 2row 2row 2row 2row 2row 2row 2row 2row
showpage grestore


I get a lovely page of hexagons.

But if I try to print a pdf,

lpr grouptable.pdf

I get:

Hey! Surprise! Today it does print a pdf. last time I tried it, it
didn't. Let me hope that whatever was wrong has been fixed, and that
I'm not just lucky today.

I did change the IP number in the printcap, because the printer's IP
number has also changed (and it's now static, so I wn't have to do
this again). As far as I know, that shouldn't affect printability
pdf's, though.

-- hendrik