Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/06/03)Fwd 1 day (to 2020/06/05) >>>20200604 
zdohnal Hi all, I'm debugging filter chain during printing for specific printer model, and gs is run during filtering like this:10:13.15 
  gs -sstdout=%stderr -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs<</Duplex false/Tumble false>>setpagedevice -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -sDeviceManufacturer=\"HEWLETT-PACKARD\" -sDeviceModel=\"deskjet 5600\" -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2,PS:MediaPosition=7 -dIjsUseOutputFD -sOutputFile=out.prn out2.ps10:13.19 
  there is an error in cmdline after hpijs, but I don't know what is wrong with it10:13.59 
  would anyone mind looking into the command line and tell me what is the problem there?10:14.32 
  when I ran the command in shell it shows it is uncomplete command, but I don't know what to add10:15.34 
kens There is what appears to be an incomplete setpagedevice command following the -sDEVICE=hpijs10:17.35 
  Actually ti is complete, but it doesn't have -c to introduce PostScript so GS will try to treat it as an input filename10:18.15 
  The section <<...>> setpagedevice10:18.49 
  That's standard PostScript, which you can send to GS but not like that10:19.04 
zdohnal kens: thanks! do you know where '-c' should be put?11:10.08 
Robin_Watts_ zdohnal: after hpijs and before <<11:43.42 
  surrounded by spaces.11:44.01 
zdohnal Robin_Watts_: unfortunately it doesn't work for me - the part of cmd looks now like this - -sIjsServer=hpijs -c <</Duplex false/Tumble false>>setpagedevice -dDEVICEWIDTHPOINTS=612 11:45.35 
  oh quotes11:46.18 
  Robin_Watts_: so the correct form should be: -sIjsServer=hpijs -c '<</Duplex false/Tumble false>>setpagedevice' -dDEVICEWIDTHPOINTS=612 ?11:47.41 
Robin_Watts_ Whatever style of quoting works for your shell.11:52.26 
  I'd have guessed at " rather than ' but anything is possible.11:52.40 
chrisl zdohnal: The -c stuff is documented: https://ghostscript.com/doc/9.52/Use.htm#General_switches11:57.15 
zdohnal chrisl: IIUC it should work without quotes, but it still doesn't (command line is not complete, expects a ending character). I tried to move -c + ps code to other locations, but without any effect12:28.19 
kens If I were you I'd start by simplifying the command line, remove bits until the problem goes away and then you know what the problem is.12:29.21 
  I'd start by removing the sequence <<....>> setpagedevice12:29.32 
zdohnal chrisl: those postscript commands are added by foomatic-rip, if I'll change the postscript code to '-dDuplex=false' which is in PPD, it works12:29.55 
kens Yeah becasue (almost certainly) that doesn't do anything12:30.30 
  the -d and -s switches end up ebing passed into PostScript, and potentially to the device code.12:30.51 
  If you define a value in PostScript, and nothing is looking for it, then it won't do anything12:31.04 
  It won't cause any problems but it won't have any effect either12:31.15 
  Essentially that's the same as what I suggested, just removing it12:31.29 
  The need for quotes depends on the shell you are using (or scripting language) it has to be right for the scripting language or shell12:32.39 
  double quotes usually work but I believe some people find single quotes fine on Linux12:32.56 
  And I notice your command line has hte double quotes escaped12:33.10 
  So presumably that's a requirement of whatever you are running12:33.22 
  You might find -c \"....\" -f works12:33.43 
  But that's a pure guess12:33.51 
zdohnal kens: ok, thank you! then it seems hpijs is not capable to eat postscript commands as -c... since it is old and ijs is not much used, I'll let it go12:40.21 
  anyway kens, chrisl, Robin_Watts__: thanks for the help!12:40.37 
kens Its not hpijs that interprets the PostScript, that is Ghostscript12:40.49 
  The Tumble and Duplex commands are used to turn duplex on and off, and to corrrectly orient the back side when duplexing is enabled12:41.27 
chrisl zdohnal: Give me a half hour or so and I'll try it properly here12:41.35 
kens If you don't get those right, then you will get pages where the back is upside down wrt to the front12:41.52 
zdohnal kens, chrisl: that's the only way I can any 'output' of gs, when I use -c: https://paste.centos.org/view/f0ccfc9b12:44.24 
  it reports an error in hpijs too, so I thought it was due error in hpijs that gs failed12:44.49 
kens In that case it appears to be the hpijs service which is giving you an error yes12:45.11 
  Its saying it can't set 8.26x11.69 inch media12:45.33 
  Very possibly yuour PostScript file is doing that (out.prn)12:45.51 
  You may need to set -dFIXEDMEDIA after setting the medi size in points12:46.34 
  And you might want to do that *before* executing setpagedevice12:47.25 
  Because I suspect that your default media (in Ghostscript) is A4, so the device is intially loaded with A4, then you do a setpagdevice, and it merges the Duplex and Tumble requests with the existing device setup (which includes A4) and sends that to the ijs server12:48.19 
  So after -sIjsServer=hpijs, put -dDEVICEHEIGHTPOINTS=792 -dDEVICEWIDTHPOINTS=612 -dFIXEDMEDIA -c ".....12:49.40 
  I'd have to actually test this to be sure, and I don't happen to have an IJS server running right now. Chris did say he'd test it if you want to hang around for a little while12:50.26 
chrisl "STATE: -marker-supply-low-warning" no idea what that means.....12:50.45 
  "STATE: -marker-supply-low-warning" no idea what that means.....12:50.51 
kens I'm guessing maybe its a low toner warning12:51.01 
zdohnal chrisl: I would say it comes from hpijs, where it is default for toner level...12:53.15 
kens HP help forums suggest its a low toner/ink warning12:53.52 
zdohnal kens: yep, it is kind of funny to get it when you don't print at all :) and only run their ijs server12:54.37 
kens I guess it can't communicate with a printer and panics12:55.12 
chrisl It seems odd to complain about toner when the output is going to a file12:56.17 
zdohnal kens: tried to switch the sequence as you said, but still the same error https://paste.centos.org/view/9b93baad12:57.19 
kens Well, that's coming back from the IJS server isn't it ? So that's HP....12:57.32 
  zdohnal: I'd have to set up an IJS server to experiment, but basically it looks to me like there's an attempt going on to set A4 and teh IJS server is saying 'you can't do that'12:58.28 
chrisl zdohnal: I'm not sure how to point hpijs at my printer.... or whether it will work with a laserjet either12:58.34 
  Maybe try: https://pastebin.com/E1HA5ybr12:59.08 
zdohnal if the problem is in hpijs, I would say let it go - because they mostly don't accept any patches on their launchpad and hpijs is old type - they prefer pdf/ps/hpcups over hpijs...12:59.21 
  chrisl: the last one works!13:00.19 
  chrisl: thanks!13:00.27 
  chrisl++13:00.30 
chrisl Cool :-)13:00.35 
zdohnal no karma bot here :(13:00.38 
kens Thanks are enough for us :-)13:01.00 
zdohnal either way, thanks kens++ and Robin_Watts__++ too :)13:01.09 
kens You're welcome13:01.16 
chrisl zdohnal: For the most part, gs command line options are order agnostic, but a very few aren't. And "-c" is awkward because it actually requires interpreting Postscript13:01.44 
  I think, as my reward, I'm going to get some lunch - since it's already past time.... :-)13:02.59 
zdohnal chrisl: so the problem is the ppd from hplip :(13:03.02 
  chrisl: so enjoy the meal :) I'll get my snack13:03.20 
chrisl zdohnal: I don't know what hpijs does wrt to ppd files, but if it's just the ppd missing some supported page sizes, it shouldn't be too hard to resolve13:50.56 
ray_laptop I usually tell people to put the -c "..." right before the input file since it causes us to run 'init2' and options that are handled during initialization may not have an effect if they follow the -c14:09.55 
  and it's entirely too hard to track which options those are14:10.25 
chrisl Yeh, normally I would do the same, but I wasn't sure if the input was coming from file name or from a pipe (stdin).14:17.26 
 <<<Back 1 day (to 2020/06/03)Forward 1 day (to 2020/06/05)>>> 
ghostscript.com #mupdf
Search: