Closed yorkie closed 7 years ago
image/urf is an Apple raster format used for AirPrint. It is not publicly documented at this time, and CUPS does not support it out of the box. (macOS includes support for it in the CoreGraphics-based filters we use)
Okay @michaelrsweet thanks for your quick reply, so if we used CUPS at Linux or Windows, the output format will not be the image/urf
?
Correct.
The last question, could you guide me where the CUPS source is handling this, like where to use the CoreGraphics-based filters in the codebase, thanks so much :)
The CoreGraphics filters are part of macOS and not CUPS. There is no public source code for them...
Ah, I mean how CUPS converts like application/pdf
to image/urf
, because I tried CUPS in my MacBook, and logged my printer jobs and see every job's mime type is image/urf
:)
CUPS uses its filter chain (see the online documentation) to choose program(s) that will convert a PDF file to image/urf (or image/pwg-raster, or application/vnd.cups-raster, etc.)
On macOS the cgpdftoraster filter handles converting PDF files into image/urf, image/pwg-raster,or application/vnd.cups-raster as needed.
Thank you @michaelrsweet that helps me so much :)
I have an EPSON printer which supports image/urf, application/octet-stream & image/jpeg MIME types. And I am trying to print a pdf using IPP protocol from Nodejs. This is not successful. Is there any way I can convert PDF to one of the above MIME types?
@zkewal There is nothing in Nodejs to do this conversion. Aside from the CUPS filters provided on Linux and macOS, the IPP Sample Code project includes a program called "ipptransform" that can do this for you (and submit the job to the printer).
Epson provides a gpl-licensed raster->escp filter which works with cups.
On Debian and its derivitives the package is called printer-driver-escpr.
On Gentoo it is called net-print/epson-inkjet-printer-escpr.
I'm sure it exists on all of the linux and bsd distributions.
Esc/pr is what the printer expects as application/octet-stream.
With that and the normal pdf->raster filter installed you can just send the pdf to cups to print to their printers.
It works well.
Are there any alternatives for windows?
@zkewal I am not aware of any alternatives for Windows - very little development is done on Windows for free software printing, and Microsoft currently does not support open standards like IPP Everywhere.
@michaelrsweet Can I use ipptransform on Windows or Linux? How does it install?
@zkewal I don't know about Windows (we don't currently provide a Visual Studio project for it, but I think MuPDF will build there), but on Linux it is just a matter of using the snap package or doing the usual ./configure; make to get the ipptransform binary.
Hey @michaelrsweet I encountered a problem when using the IPP, and think the answer should be in cups.
I bought the wireless printer HP DeskJet 4538, and opened the IPP option of it, then:
document-format-supported
.document-format-supplied
, it'simage/urf
.Then the problem that I'm opening this issue is what's the format "image/urf", after having googles on this keyword, few informations about that, just get knows that is a mime type introduced by Apple, Inc, I guess it's CUPS precisely.
Sorry about troubling you guys here maybe not the correct place, but I'm really looking forward how is this format, and how could we convert pdf or image files to image/urf.
Thanks.