attah / ppm2pwg

Misc printing utilities
GNU General Public License v3.0
18 stars 9 forks source link

ippclient print ignores the copies option with urf format #30

Closed milahu closed 2 months ago

milahu commented 2 months ago

this prints two copies

pdf2printable -f pwg src.pdf dst.pwg
ippclient print --copies 2 ipp://192.168.178.197/ dst.pwg 

this prints two copies

pdf2printable -f urf --copies 2 src.pdf dst.urf
ippclient print ipp://192.168.178.197/ dst.urf 

this prints one copy (expected: two copies)

pdf2printable -f urf src.pdf dst.urf
ippclient print --copies 2 ipp://192.168.178.197/ dst.urf 

expected: ippclient print should fail when the copies option is used with urf files

attah commented 2 months ago

Not exactly. Your printer ignores the copies option when getting urf. It probably told us that it will, so i'll look at if it can produce a helpful error. I have at least 2 printers that will happily make me copies of a urf raster file. What is really strange here is that your printer behaves differently between pwg and urf that are substantially the same format.

For your performance requirements, you definitely want the copies option passed to ippclient and not pdf2printable if your printer will do it.

attah commented 2 months ago

After some more thinking, this is probably not going to be done for the time being. So far i have not needed to ask printers for parameter support by format. I.e. i can just assume that if they say copy support varies by format it is not supported for rasters and act accordingly in the convert process. Meaning that if i put that assumption in the check suggested above, i'd not allow you to tell the printer to produce the copies for pwg. These formats really should have the same constraints, but once again a Brother printer manages to be different for no reason.

If i get sufficiently bored some time, i might add an additional preflight step to check settings by file format.

Using ippclient to just send over natively supported formats is a bit of a corner-case anyway, mostly for experiments and possible single images. So i'm pretty ok with that "here be dragons". Next someone might want me to parse and sanity-check the pwg/urf-raster against printer support of the parameters it can contain... And that definitely isn't happening.

milahu commented 2 months ago

I have at least 2 printers that will happily make me copies of a urf raster file.

These formats really should have the same constraints, but once again a Brother printer manages to be different for no reason.

ok, so this is a printer bug

i will look into the original printer driver (at some point in the future...) but probably it uses only the pwg format while the printer claims to support both pwg and urf formats