Skip to content

Commit

Permalink
Update feature/performance comparison with ipptransform improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
attah committed Sep 30, 2023
1 parent db6d2c5 commit 6857464
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,54 +39,56 @@ Build:

## pdf2printable vs the competition

(As of 2023-07-25)
(As of 2023-10-30)

A bit of friendly comparison helps make sure the featureset is well-rounded and performance is on par.

### Basics
| | PDF renderer | Language | License |
| ---------------------------------------------------- | --------------- | ----------- | ------------------ |
| pdf2printable | Poppler | C++ | GPL3 |
| [ipptransform](https://github.com/istopwg/ippsample) | XPDF or Poppler | C | Apache 2.0 |
| [mutool](https://mupdf.com/) | MuPDF | C | AGPL or commercial |
| [jrender](https://github.com/HPInc/jipp) | Apache PDFBox | Java/Kotlin | MIT |
| | PDF renderer | Language | License |
| ------------------------------------------------------- | --------------- | ----------- | ------------------ |
| pdf2printable | Poppler | C++ | GPL3 |
| [ipptransform](https://github.com/OpenPrinting/libcups) | XPDF or Poppler | C | Apache 2.0 |
| [mutool](https://mupdf.com/) | MuPDF | C | AGPL or commercial |
| [jrender](https://github.com/HPInc/jipp) | 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).

### Format support

| | PDF | Postscript | PWG | URF | PCLm | PCL |
| ------------- | --- | ---------- | --- | --- | ---- | --- |
| pdf2printable |||||||
| ipptransform || || | ||
| mutool |||||||
| jrender |||||||
| | PDF | Postscript | PWG | URF | PCLm¹ | PCL² |
| ------------- | --- | ------------ | --- | --- | ---------- | --------- |
| pdf2printable || ||| | |
| ipptransform || ³(WIP) | || |³ |
| mutool || ||| | |
| jrender || ||| | |

Good printers should support PDF or PWG. After that, URF is the biggest enabler.
Postscript and PCL enable some more printers. It is not clear to me which is the bigger enabler nowadays.
However, PCL comes in many different dialects (even beyond the versions) so it might not work across all printers.
I have not yet seen a printer support PCLm and none of the other formats that pdf2printable supports.

1. I have not yet seen a printer support PCLm and none of the other formats that pdf2printable supports.
2. PCL comes in many different dialects (even beyond the versions) so it might not work across all printers.
3. Pre-rasterized compatibility versions. Currently ipptransform's Postscript is *very* slow and fails to render for me.

### Features

| | back-xform¹ | color modes ²| rotate-to-fit | page selection | stdout |
| ------------- | ---------------- | ----------------- | ------------- | -------------- | --------- |
| pdf2printable || ✔(6) ||| ✔(+stdin) |
| ipptransform || ✔(5) | | ||
| ipptransform || ✔(5) | ³ | ||
| mutool || ✔(3?) ||||
| jrender || ✘(1) ||||

1. PWG, URF and PCLm printers may require the client to help transform backside pages for duplex printing, or they will come out incorrectly.
2. Two color modes (sRGB24 and sGray8) is enough for basically anything.
3. The landscape pages in [mixed.pdf](https://wiki.debian.org/CUPSPdfToPdf?action=AttachFile&do=view&target=mixed.pdf) gets rotated differently though.

### Performance
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 | 38s | 38s | 155MB | 78MB |
| mutool (AA off) | 15s | 22s | 152MB | 76MB |
| jrender | 23s | DNF | 334MB¹ | DNF |
| | Speed (RGB) | Speed (Gray) | Size (RGB) | Size (Gray) |
| ---------------------- | ----------- | -------------| ----------- | ----------- |
| pdf2printable | 9s | 9s | 152MB | 76MB |
| ipptransform | 27s | 27s | 159MB | 76MB |
| mutool (AA off) | 15s | 22s | 152MB | 76MB |
| jrender (600dpi patch) | 25s | N/A | 334MB¹ | N/A |

1. 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.

0 comments on commit 6857464

Please sign in to comment.