Skip to content

Commit f04e8be

Browse files
committed
Freshen up benchmarks
1 parent c02423d commit f04e8be

File tree

2 files changed

+26
-13
lines changed

2 files changed

+26
-13
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Build:
5252

5353
## pdf2printable vs the competition
5454

55-
(As of 2025-01-04)
55+
(As of 2025-12-13)
5656

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

@@ -61,19 +61,23 @@ A bit of friendly comparison helps make sure the featureset is well-rounded and
6161
| ------------------------------------------------------- | --------------------- | ----------- | ------------------ |
6262
| pdf2printable | Poppler¹ | C++ | GPL3 |
6363
| [ipptransform](https://github.com/OpenPrinting/libcups) | XPDF or Poppler¹ | C | Apache 2.0 |
64+
| [ghostscript](https://ghostscript.com/)² | Ghostscript | C | AGPL or commercial |
6465
| [mutool](https://mupdf.com/) | MuPDF | C | AGPL or commercial |
6566
| [jrender](https://github.com/HPInc/jipp) | Apache PDFBox | Java/Kotlin | MIT |
6667

67-
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).
68+
Not in the running: Android/Apple built-ins and Google Cloud Print (not available standalone).
69+
Ghostscript is standing in for cups-filters, since that's what is used under the hood.
6870

6971
1. pdf2printable uses the Cairo backend in Poppler and ipptransform uses the Splash backend inhertited from XPDF. Cairo generally produces higher quality rasterization, but is slightly more prone to misrendering with unusual PDFs.
72+
2. Not freshly built from source.
7073

7174
### Format support
7275

7376
| | PDF | Postscript | PWG | URF | PCLm¹ | PCL² |
7477
| ------------- | --- | ---------- | --- | --- | ---------- | --------- |
7578
| pdf2printable |||||||
76-
| ipptransform ||||||³ |
79+
| ipptransform ||||||³ |
80+
| ghostscript |||||||
7781
| mutool |||||||
7882
| jrender |||||||
7983

@@ -89,7 +93,8 @@ Good printers should support PDF or PWG. After that, URF is the biggest enabler.
8993
| ------------- | ---------------- | ----------------- | ------------- | -------------- | --------- |
9094
| pdf2printable || ✔(6) ||| ✔(+stdin) |
9195
| ipptransform || ✔(5) ||||
92-
| mutool || ✔(3?) ||||
96+
| ghostscript | ? | ✔(6+) ||| ✔(+stdin) |
97+
| mutool || ✔(4) ||||
9398
| jrender || ✘(1)³ ||||
9499

95100
1. PWG, URF and PCLm printers may require the client to help transform backside pages for duplex printing, or they will come out incorrectly.
@@ -102,8 +107,11 @@ Measured with a representative 90-page document for PWG-raster at 600 DPI on a A
102107
| | Speed (RGB) | Speed (Gray) | Size (RGB) | Size (Gray) |
103108
| ---------------------- | ----------- | -------------| ------------ | ----------- |
104109
| pdf2printable | 500 PPM | 529 PPM | 152 MB | 76 MB |
105-
| ipptransform | 204 PPM | 194 PPM | 159 MB | 76 MB |
106-
| mutool (AA off) | 260 PPM | 184 PPM | 152 MB | 76 MB |
107-
| jrender (600dpi patch) | 171 PPM | N/A | 334 MB¹ | N/A |
110+
| ipptransform | 198 PPM | 186 PPM | 159 MB | 76 MB |
111+
| ghostscript | 575 PPM | 643 PPM | 152 MB | 76 MB |
112+
| mutool (AA off) | 264 PPM | 188 PPM | 153 MB | 76 MB |
113+
| jrender (600dpi patch) | 167 PPM | N/A | 334 MB¹ | N/A |
108114

109-
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.
115+
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, ghostscript and mutool it can be optionally enabled/disabled.
116+
117+
pdf2printable will match or beat ghostscript if compield with `-mtune=native`, but that would be cheating, as ghostscript surely would retake the lead if allowed architecture-dependent optimizations too.

bench.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ make -Bj$(nproc)
99
LD_LIBRARY_PATH=./cups/ time ./tools/ipptransform -m image/pwg-raster -r 600 -t srgb_8 ~/reference.pdf > out.pwg
1010
LD_LIBRARY_PATH=./cups/ time ./tools/ipptransform -m image/pwg-raster -r 600 -t sgray_8 ~/reference.pdf > out.pwg
1111

12+
# ghostscript
13+
14+
time gs -sDEVICE=pwgraster -dcupsBitsPerColor=8 -dcupsColorSpace=18 -sOutputFile=out.pwg -r600 -dNOPAUSE -dQUIET -dBATCH ~/reference.pdf
15+
time gs -sDEVICE=pwgraster -dcupsBitsPerColor=8 -dcupsColorSpace=19 -sOutputFile=out.pwg -r600 -dNOPAUSE -dQUIET -dBATCH ~/reference.pdf
16+
17+
# mutool
18+
make -Bj$(nproc)
19+
time ./build/release/mutool convert -O resolution=600 -A 0 -o out.pwg ~/reference.pdf
20+
time ./build/release/mutool convert -O resolution=600,colorspace=gray -A 0 -o out.pwg ~/reference.pdf
21+
1222
# jrender
1323

1424
diff --git a/sample/jrender/src/main/java/sample/jrender/Main.java b/sample/jrender/src/main/java/sample/jrender/Main.java
@@ -27,8 +37,3 @@ index 0fc678d..2dcf810 100644
2737

2838
./gradlew build -Dorg.gradle.java.home=/usr/lib/jvm/java-1.8.0-openjdk-amd64/ && unzip -o ./sample/jrender/build/distributions/jrender-*.zip
2939
time jrender-*/bin/jrender ~/reference.pdf out.pwg
30-
31-
# mutool
32-
make -Bj$(nproc)
33-
time ./build/release/mutool convert -O resolution=600 -A 0 -o out.pwg ~/reference.pdf
34-
time ./build/release/mutool convert -O resolution=600,colorspace=gray -A 0 -o out.pwg ~/reference.pdf

0 commit comments

Comments
 (0)