(should really be renamed)
Available as rudimentary standalone applications, but mainly made for use in SeaPrint.
Takes a pbm, pgm or ppm (P4, P5 or P6 "raw") Netpbm bitmap image and converts to PWG or URF printer raster format.
...or a raw bitmap in the c++ api.
For debugging. Similar to rasterview, but without a GUI. Takes a PWG or URF printer raster and outputs a series of P4, P5 or P6 pbm/pgm/ppm images.
Takes a PDF document and makes it suitable for printing, by:
- rotate and scale to fit as needed to a desired page size
- convert to PDF 1.7¹, Postscript level 2 or PWG/URF raster
- PDF 1.5 if using Cairo < 1.18.
Takes a JPEG and losslessly repacks it to the baseline ecoding profile, keeping only JFIF and Exif headers. Sort of like jpegtran without any arguments, but reusable in C++.
IPP-printers are only required to support baseline-encoded jpeg according to PWG5100.14.
Despite working with in-memory data, it only requires the libjpeg 62.2.0 and not 62.3.0/7.3+ API, so it works on conservative distros.
An IPP client that harnesses the above tools for converting files to be printed. This is a port/rewrite/clean-up of the core parts of SeaPrint in regular (non-Qt) C++. The plan is to swap over to using this once fature parity is achieved.
Install dependencies:
sudo apt install libpoppler-dev libpoppler-glib-dev libcairo2-dev libglib2.0-dev libjpeg-dev libcurl4-openssl-dev zlib1g-dev
Build:
make -j$(nproc)
(As of 2024-03-02)
A bit of friendly comparison helps make sure the featureset is well-rounded and performance is on par.
PDF renderer | Language | License | |
---|---|---|---|
pdf2printable | Poppler | C++ | GPL3 |
ipptransform | XPDF or Poppler | C | Apache 2.0 |
mutool | MuPDF | C | AGPL or commercial |
jrender | Apache PDFBox | Java/Kotlin | MIT |
Not in the running: cups-filters (can't get them to run outside CUPS), Android/Apple built-ins and Google Cloud Print (not available standalone).
Postscript | PWG | URF | PCLm¹ | PCL² | ||
---|---|---|---|---|---|---|
pdf2printable | ✔ | ✔ | ✔ | ✔ | ✘ | ✘ |
ipptransform | ✔ | ✔ | ✔ | ✔ | ✘ | ✔³ |
mutool | ✔ | ✘ | ✔ | ✘ | ✔ | ✔ |
jrender | ✘ | ✘ | ✔ | ✘ | ✔ | ✘ |
Good printers should support PDF or PWG. After that, URF is the biggest enabler.
- I have not yet seen a printer support PCLm and none of the other formats that pdf2printable supports.
- PCL comes in many different dialects (even beyond the versions) so it might not work across all printers.
- Pre-rasterized compatibility version.
back-xform¹ | color modes ² | rotate-to-fit | page selection | stdout | |
---|---|---|---|---|---|
pdf2printable | ✔ | ✔(6) | ✔ | ✔ | ✔(+stdin) |
ipptransform | ✔ | ✔(5) | ✔ | ✔ | ✔ |
mutool | ✘ | ✔(3?) | ✘ | ✔ | ✘ |
jrender | ✘ | ✘(1)³ | ✘ | ✘ | ✘ |
- PWG, URF and PCLm printers may require the client to help transform backside pages for duplex printing, or they will come out incorrectly.
- Two color modes (sRGB24 and sGray8) is enough for basically anything.
- Jrender can be patched to do gray or bi-level, but the output is broken.
Measured with a representative 90-page document for PWG-raster at 600 DPI on a AMD 3950X.
Speed (RGB) | Speed (Gray) | Size (RGB) | Size (Gray) | |
---|---|---|---|---|
pdf2printable | 9s | 9s | 152MB | 76MB |
ipptransform | 26s | 27s | 159MB | 76MB |
mutool (AA off) | 19s | 26s | 152MB | 76MB |
jrender (600dpi patch) | 25s | N/A | 334MB¹ | N/A |
- Antialiasing seems to be enabled and would account for the size difference. However, at these resolutions that doesn't really provide much benefit. For pdf2printable and mutool it can be optionally enabled/disabled.