Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | ||||||||
Line: 12 to 12 | ||||||||
Similarly GhostXPS is an XPS parser written on top of the Ghostscript graphics library. | ||||||||
Changed: | ||||||||
< < | For the rest of this discussion we will just say "Ghostscript" when we actually mean "Ghostscript, GhostPCL and GhostXPS "; everything we say about Ghostscript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "GhostPDL". | |||||||
> > | For the rest of this discussion we will just say "Ghostscript" when we actually mean "Ghostscript, GhostPCL and GhostXPS "; everything we say about Ghostscript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "GhostPDL". To make matters more confusing, we have now have an actual product called "GhostPDL" that pulls the functionality from all three together into a single executable. | |||||||
If you need the ability to handle EPUB or CBZ input, then you must use MuPDF. | ||||||||
Changed: | ||||||||
< < | Both MuPDF and Ghostscript can handle PDF and XPS input. | |||||||
> > | Both MuPDF and GhostScript (and GhostPDL) can handle PDF input. MuPDF and GhostPDL can both handle XPS input, together with bitmap formats such as JPEG, PNG and TIF. | |||||||
Changed: | ||||||||
< < | MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. Ghostscript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | |||||||
> > | Ghostscript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | |||||||
Color Management | ||||||||
Changed: | ||||||||
< < | Currently, MuPDF does not offer any color management options. Therefore if a color managed workflow is required, you need to use Ghostscript. The color management of Ghostscript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
> > | Both MuPDF and Ghostscript offer color managed workflows, both use ICC profiles and (by default) LCMS. The Ghostscript color management options are more extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
Output options | ||||||||
Changed: | ||||||||
< < | If you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use Ghostscript. | |||||||
> > | If you want to output high-level PostScript, PCL/XL, or XPS, or you want to output to a MS Windows printer, then you need to use Ghostscript. Both MuPDF and Ghostscript are capable of outputting to PDF, though Ghostscript's PDF generation is more mature. Both MuPDF and Ghostscript can produce PCLm output (basically bitmaps wrapped into PDF format). Both MuPDF and Ghostscript can produce simple bitmap based PCL output too. | |||||||
Printer output | ||||||||
Line: 44 to 44 | ||||||||
The easiest mechanism for outputting to a printer that is not already supported or that cannot be supported using the "uniprint" module is to get Ghostscript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | ||||||||
Changed: | ||||||||
< < | Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. Other such conversions can of course be added by the integrator. | |||||||
> > | Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. Other such conversions can, of course, be added by the integrator. | |||||||
Changed: | ||||||||
< < | MuPDF can render in RGB, Greyscale, or CMYK. Ghostscript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
> > | Both MuPDF and Ghostscript can render in RGB, Greyscale, CMYK and CMYK + Spots. Both MuPDF and Ghostscript are capable of overprint simulation, and also of handling color separations and DeviceN colors. | |||||||
Adding a new printer type - via high level output | ||||||||
Line: 56 to 56 | ||||||||
Ghostscript has high level devices to output PostScript (Level 2) and PCL-6 (aka PCL/XL). | ||||||||
Changed: | ||||||||
< < | While MuPDF does not currently offer any fully functional devices, it has both SVG output and PDF output modules that demonstrate its abilities. A third-party has implemented a GDI based output for doing rendering on Windows. | |||||||
> > | While MuPDF does not currently offer any fully functional high-level output devices, it has both SVG output and PDF output modules that demonstrate its abilities. A third-party has implemented a GDI based output for doing rendering on Windows. | |||||||
It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex![]() Bitmap output | ||||||||
Changed: | ||||||||
< < | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX, PSD (Photoshop) or raw output use Ghostscript. | |||||||
> > | If you are outputting to a bitmap other than monochrome, greyscale, RGB, CMYK or CMYK+Spots, or if you need JPEG, TIFF, MIFF, BMP, PCX, PSD (Photoshop) or raw output use Ghostscript. | |||||||
If you want TGA (TrueVision) use MuPDF. Both Ghostscript and MuPDF support PBM, PGM, PPM, PAM, PNG and both have the ability to do anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than Ghostscript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | ||||||||
Changed: | ||||||||
< < | As a rule of thumb, if you are rendering PDF or XPS input for display based use, you probably want to be leaning towards MuPDF. | |||||||
> > | As a rule of thumb, if you are rendering PDF, XPS or Image input for display based use, you probably want to be leaning towards MuPDF. | |||||||
Interactive behaviour |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 88 to 88 | |||||||||||||||||||||||||||||||||||||||||
Both Ghostscript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | Ghostscript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. Ghostscript can render multiple bands in parallel. | ||||||||||||||||||||||||||||||||||||||||
> > | Both allow for one page to be rendered in background threads while the display list for the next page is created by the interpreter. | ||||||||||||||||||||||||||||||||||||||||
The decision of how to handle threads is divorced from the core of MuPDF. It is possible to implement both of the above schemes with MuPDF, as well as many others (such as rendering thumbnails for pages on a background thread, while rendering current pages at different zoom levels). | |||||||||||||||||||||||||||||||||||||||||
Line: 111 to 110 | |||||||||||||||||||||||||||||||||||||||||
The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe.
Ghostscript Performance | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | Ghostscript commit 5a7b20755617cde8c915ab24725f94fd74be3aee is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
> > | Ghostscript commit c7d005ac1c92a6fee43554fffd9a6f38c0a6b962 is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | -Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___ | ||||||||||||||||||||||||||||||||||||||||
> > | -Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___ -dNumRenderingThreads=4 -dBGPrint=true | ||||||||||||||||||||||||||||||||||||||||
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false). | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | MuPDF (commit 149520a84e3521289cb7e56ef5ca6aef59a8cbc3) mutool is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
> > | MuPDF (commit 35b2aeef91fdd062f54beba302726c9ea279114e) mutool is run with the arguments: for mono 1-bit:: draw -r600 -o /dev/null -F pbm -c mono -A 0 -B 2400 -s t -P -T4 | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for mono 1-bit:: draw -r600 -o /dev/null -F pbm -c mono -A 0 -B 2400 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for gray 8-bit: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2400 -s t -P -T4 | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for gray 8-bit: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2400 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for rgb: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 880 -s t -P -T4 | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for rgb: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 880 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for cmyk 1-bit: draw -r600 -o /dev/null -F pkm -c cmyk -A 0 -B 704 -s t -P -T4 | ||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||
< < | for cmyk 1-bit: draw -r600 -o /dev/null -F pkm -c cmyk -A 0 -B 704 -s t | ||||||||||||||||||||||||||||||||||||||||
and, | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for cmyk 8-bit: draw -r600 -o /dev/null -F pam -c cmyk -A 0 -B 704 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for cmyk 8-bit: draw -r600 -o /dev/null -F pam -c cmyk -A 0 -B 704 -s t -P -T4 | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | For the 1200 dpi cases, mupdf Band Heights are one-half the above value for "-B". The BandHeights are set the same for 8-bit and 1-bit since mupdf first renders to 8-bit (plus alpha), then halftones the rendered image to 1-bit. | ||||||||||||||||||||||||||||||||||||||||
> > | For the 1200 dpi cases, mupdf Band Heights are one-half the above value for "-B". The BandHeights are set the same for 8-bit and 1-bit since mupdf first renders to 8-bit, then halftones the rendered image to 1-bit.
| ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | Running on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) | ||||||||||||||||||||||||||||||||||||||||
> > | Running on a RaspBerry Pi 3 (Quad core ARMv8) at 1.2GHz, 1Gb RAM, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) | ||||||||||||||||||||||||||||||||||||||||
Monochrome (1-bit) / Gray (8-bit)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
Running Ghostscript on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm). Monochrome (1-bit) / Gray (8-bit) |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 146 to 146 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 137 to 137 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 146 to 146 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 146 to 146 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||
Line: 154 to 154 | |||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
| |||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||
Running Ghostscript on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm). |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 146 to 146 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 111 to 111 | |||||||||||||||||||||||||||||||||||||||||
The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe.
Ghostscript Performance | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | Ghostscript is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
> > | Ghostscript commit 5a7b20755617cde8c915ab24725f94fd74be3aee is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
-Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___ | |||||||||||||||||||||||||||||||||||||||||
Line: 137 to 137 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 146 to 146 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
Running Ghostscript on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm). Monochrome (1-bit) / Gray (8-bit) |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 117 to 117 | |||||||||||||||||||||||||||||||||||||||||
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false). | |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | MuPDF (mutool) is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
> > | MuPDF (commit 149520a84e3521289cb7e56ef5ca6aef59a8cbc3) mutool is run with the arguments: | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for monochrome 1-bit (no banding needed for 16Mb buffer): draw -r600 -o /dev/null -F pbm -c mono -A 0 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for mono 1-bit:: draw -r600 -o /dev/null -F pbm -c mono -A 0 -B 2400 -s t | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for gray: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for gray 8-bit: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2400 -s t | ||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < | for rgb: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t | ||||||||||||||||||||||||||||||||||||||||
> > | for rgb: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 880 -s t for cmyk 1-bit: draw -r600 -o /dev/null -F pkm -c cmyk -A 0 -B 704 -s t and, for cmyk 8-bit: draw -r600 -o /dev/null -F pam -c cmyk -A 0 -B 704 -s t For the 1200 dpi cases, mupdf Band Heights are one-half the above value for "-B". The BandHeights are set the same for 8-bit and 1-bit since mupdf first renders to 8-bit (plus alpha), then halftones the rendered image to 1-bit. | ||||||||||||||||||||||||||||||||||||||||
Running on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) | |||||||||||||||||||||||||||||||||||||||||
Line: 131 to 137 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||
Line: 131 to 131 | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF |
Line: 1 to 1 | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||
Line: 142 to 142 | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||
RGB 24-bit Contone (8-bit per component)
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 131 to 131 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Running Ghostscript on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm). Monochrome (1-bit) / Gray (8-bit) |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 137 to 137 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | RGB 24-bit Contone (8-bit per component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | RGB 24-bit Contone (8-bit per component) |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Running Ghostscript on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm). |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 128 to 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Running on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) Monochrome (1-bit) / Gray (8-bit) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CMYK (1-bit per component) / contone (8-bit per component) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 117 to 117 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | MuPDF (mutool) is run with the arguments: for monochrome 1-bit (no banding needed for 16Mb buffer): draw -r600 -o /dev/null -F pbm -c mono -A 0 -s t for gray: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t for rgb: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Running on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) Monochrome (1-bit) / Gray (8-bit) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | CYMK (1-bit) and 32-bit Contone (8-bit / component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | CMYK (1-bit per component) / contone (8-bit per component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | RGB 24-bit Contone (8-bit / component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | RGB 24-bit Contone (8-bit per component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Monochrome (1-bit) / Gray (8-bit)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 161 to 162 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | !MuPDF PerformanceRunning on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with the same small set of benchmark files gives some comparison for a few contone (8-bit per component) color models. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm). mutool is run with the arguments: draw -r600 -o /dev/null -F pbm -c mono -A 0 -s t for monochrome 1-bit (no banding needed for 16Mb buffer), and : draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t for gray, and: draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t for rgb, and: draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 698 -s t for cmyk contone. The band heights (2800 for gray, 938 for rgb, and 698 for cmyk) correspond to the band heights used by Ghostscript with -dBufferSpace=16m. For 1200 dpi, the band heights are 1400, 460 and 350. No banding is used for 1200 dpi mono since mupdf does not currently support banding for pbm output. Monochrome (1-bit) / Gray (8-bit)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Deleted: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | TBD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
\ No newline at end of file |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||
Line: 167 to 167 | |||||||||||||||||||||||||||||||||||||
mutool is run with the arguments: | |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | draw -r600 -o /dev/null -F pgm -c gray -A 0 -s t | ||||||||||||||||||||||||||||||||||||
> > | draw -r600 -o /dev/null -F pbm -c mono -A 0 -s t | ||||||||||||||||||||||||||||||||||||
for monochrome 1-bit (no banding needed for 16Mb buffer), and : | |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t | ||||||||||||||||||||||||||||||||||||
> > | draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t | ||||||||||||||||||||||||||||||||||||
for gray, and: | |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t | ||||||||||||||||||||||||||||||||||||
> > | draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t | ||||||||||||||||||||||||||||||||||||
for rgb, and: | |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 698 -s t | ||||||||||||||||||||||||||||||||||||
> > | draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 698 -s t | ||||||||||||||||||||||||||||||||||||
for cmyk contone. | |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | The band heights (2800 for gray and 938 for rgb) correspond to the band heights used by Ghostscript with -dBufferSpace=16m. | ||||||||||||||||||||||||||||||||||||
> > | The band heights (2800 for gray, 938 for rgb, and 698 for cmyk) correspond to the band heights used by Ghostscript with -dBufferSpace=16m. For 1200 dpi, the band heights are 1400, 460 and 350. No banding is used for 1200 dpi mono since mupdf does not currently support banding for pbm output. | ||||||||||||||||||||||||||||||||||||
Monochrome (1-bit) / Gray (8-bit)
| |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||
RGB
| |||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < |
CMYK
![]() ![]() | ||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | Comments | ||||||||||||||||||||||||||||||||||||
> > | TBD | ||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||
< < | |||||||||||||||||||||||||||||||||||||
> > | |||||||||||||||||||||||||||||||||||||
\ No newline at end of file |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 109 to 109 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The actual rendering speeds of Ghostscript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Ghostscript Performance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Ghostscript Performance | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ghostscript is run with the arguments: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 162 to 161 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | !MuPDF Performance TBD | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | !MuPDF PerformanceRunning on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with the same small set of benchmark files gives some comparison for a few contone (8-bit per component) color models. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm). mutool is run with the arguments:draw -r600 -o /dev/null -F pgm -c gray -A 0 -s t
for monochrome 1-bit (no banding needed for 16Mb buffer), and :
draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 2800 -s t
for gray, and:
draw -r600 -o /dev/null -F ppm -c rgb -A 0 -B 938 -s t
for rgb, and:
draw -r600 -o /dev/null -F pgm -c gray -A 0 -B 698 -s t
for cmyk contone. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The band heights (2800 for gray and 938 for rgb) correspond to the band heights used by Ghostscript with -dBufferSpace=16m.
Monochrome (1-bit) / Gray (8-bit)
CMYK
![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comments |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 108 to 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The actual rendering speeds of Ghostscript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Running on a RaspBerry Pi Model B (single core, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Ghostscript Performance | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 118 to 118 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Running on a RaspBerry Pi Model B (single core ARM, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Monochrome (1-bit) / Gray (8-bit)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 140 to 140 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Running on a Windows XP laptop having an Intel Celeron x86 at 1.6GHz, with the same small set of benchmark files gives the results below. As with the timings above, five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are also in "Pages per Minute" (ppm).
Monochrome (1-bit) / Gray (8-bit)
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
!MuPDF Performance TBD | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Comments |
Line: 1 to 1 | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||||||||||||||||||||||
Line: 108 to 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||
The actual rendering speeds of Ghostscript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Running on a RaspBerry Pi Model B (not Pi 2) with a small set of benchmark files gives some comparison for common color models and depths. | ||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Running on a RaspBerry Pi Model B (single core, not Pi 2 quad core) at 700MHz, with a small set of benchmark files gives some comparison for common color models and depths. The j9, j11 and j12 files are selected from the JEITA test suite, and have been used by some of our customers for performance studies. The PLRM-100 file is the first 100 pages from the PostScript Language Reference Manual - third edition. The JEITA files are available for purchase from that organization and PLRM is available from Adobe. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||
< < | Ghostscript is run with the arguments: -sBandListStorage=memory -dBandHeight=256 to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) | ||||||||||||||||||||||||||||||||||||||||||||||||||
> > | Ghostscript Performance
Ghostscript is run with the arguments:
-Z: -dUseFastColor=true -sBandListStorage=memory -dBufferSpace=16m -o /dev/null -sDEVICE=bit____ -r____ -dGrayValues=___
to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.) and at either 600 or 1200 resolution. With these settings, the amount of RAM needed varies with the complexity of the page since the display list (BandList) is in RAM, and varies slightly with the resolution. For example, in Gray mode, files range from 30 Mb to 48 Mb. Note that -dUseFastColor may not be appropriate for CMYK 1-bit, since it is not possible to do color correction on a halftoned result. (TBD: run CMYK 1-bit with -dUseFastColor=false).
Five runs of each file are performed and the fastest is used (to allow for random other processor load). All results below are in "Pages per Minute" (ppm)
Monochrome (1-bit) / Gray (8-bit) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||
< < |
| ||||||||||||||||||||||||||||||||||||||||||||||||||
> > |
| ||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||
> > | CYMK (1-bit) and 32-bit Contone (8-bit / component)
| ||||||||||||||||||||||||||||||||||||||||||||||||||
Changed: | |||||||||||||||||||||||||||||||||||||||||||||||||||
< < | -- ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||
> > | -- ![]() ![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comments |
Line: 1 to 1 | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | |||||||||||||||||||||||||||||||
Line: 108 to 108 | |||||||||||||||||||||||||||||||
The actual rendering speeds of Ghostscript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||||||||||||||||||||||||||
Added: | |||||||||||||||||||||||||||||||
> > | Running on a RaspBerry Pi Model B (not Pi 2) with a small set of benchmark files gives some comparison for common color models and depths.
Ghostscript is run with the arguments: -sBandListStorage=memory -dBandHeight=256 to the various "bit" devices, with -dGrayValues=2 or 256 (1-bit or 8-bit, resp.)
| ||||||||||||||||||||||||||||||
-- ![]() ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | ||||||||
Line: 12 to 12 | ||||||||
Similarly GhostXPS is an XPS parser written on top of the Ghostscript graphics library. | ||||||||
Changed: | ||||||||
< < | For the rest of this discussion we will just say "Ghostscript" when we actually mean "Ghostscript, GhostPCL and GhostXPS "; everything we say about Ghostscript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "!GhostPDL". | |||||||
> > | For the rest of this discussion we will just say "Ghostscript" when we actually mean "Ghostscript, GhostPCL and GhostXPS "; everything we say about Ghostscript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "GhostPDL". | |||||||
If you need the ability to handle EPUB or CBZ input, then you must use MuPDF. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | Choosing between GhostScript and MuPDF | |||||||
> > | Choosing between Ghostscript and MuPDF | |||||||
Changed: | ||||||||
< < | GhostScript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes be hard to know which one to use in a given situation. | |||||||
> > | Ghostscript![]() ![]() | |||||||
Input languages | ||||||||
Changed: | ||||||||
< < | If you need the ability to handle PostScript input, then you must use GhostScript. | |||||||
> > | If you need the ability to handle PostScript input, then you must use Ghostscript. | |||||||
Changed: | ||||||||
< < | If you need the ability to handle PCL input, then you must use GhostPCL (a PCL parser on top of the GhostScript graphics library). | |||||||
> > | If you need the ability to handle PCL input, then you must use GhostPCL (a PCL parser on top of the Ghostscript graphics library). | |||||||
Changed: | ||||||||
< < | Similarly GhostXPS is an XPS parser written on top of the GhostScript graphics library. | |||||||
> > | Similarly GhostXPS is an XPS parser written on top of the Ghostscript graphics library. | |||||||
Changed: | ||||||||
< < | For the rest of this discussion we will just say "GhostScript" when we actually mean "GhostScript, GhostPCL and GhostXPS "; everything we say about GhostScript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "GhostPDL". | |||||||
> > | For the rest of this discussion we will just say "Ghostscript" when we actually mean "Ghostscript, GhostPCL and GhostXPS "; everything we say about Ghostscript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "!GhostPDL". | |||||||
Changed: | ||||||||
< < | If you need the ability to handle EPUB or CBZ input, then you must use MuPDF. | |||||||
> > | If you need the ability to handle EPUB or CBZ input, then you must use MuPDF. | |||||||
Changed: | ||||||||
< < | Both MuPDF and GhostScript can handle PDF and XPS input. | |||||||
> > | Both MuPDF and Ghostscript can handle PDF and XPS input. | |||||||
Changed: | ||||||||
< < | MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. GhostScript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | |||||||
> > | MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. Ghostscript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | |||||||
Changed: | ||||||||
< < | Colour Management | |||||||
> > | Color Management | |||||||
Changed: | ||||||||
< < | Currently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use GhostScript. The colour management of GhostScript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
> > | Currently, MuPDF does not offer any color management options. Therefore if a color managed workflow is required, you need to use Ghostscript. The color management of Ghostscript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
Output options | ||||||||
Changed: | ||||||||
< < | If you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use GhostScript. | |||||||
> > | If you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use Ghostscript. | |||||||
Printer output | ||||||||
Changed: | ||||||||
< < | As a rule of thumb, if you want printer output, you probably want to be leaning towards using GhostScript. | |||||||
> > | As a rule of thumb, if you want printer output, you probably want to be leaning towards using Ghostscript. | |||||||
Changed: | ||||||||
< < | If you want to output to a printer, then it is a question of whether GhostScript or MuPDF supports your printer out of the box. GhostScript has support for many printers that MuPDF does not, including a "uniprint" (Universal Printer) output module that allows many more printers to be supported by creating "upp" parameter files. | |||||||
> > | If you want to output to a printer, then it is a question of whether Ghostscript or MuPDF supports your printer out of the box. Ghostscript has support for many printers that MuPDF does not, including a "uniprint" (Universal Printer) output module that allows many more printers to be supported by creating "upp" parameter files. | |||||||
Changed: | ||||||||
< < | MuPDF does have support for some printer outputs (such as PCL and CUPS ones). If you use MuPDF and want to print to something other than a PCL printer then you are going to need to add some C code yourself. | |||||||
> > | MuPDF does have support for some printer outputs (such as PCL and CUPS ones). If you use MuPDF and want to print to something other than a PCL printer then you are going to need to add some C code yourself. | |||||||
Changed: | ||||||||
< < | Both MuPDF and GhostScript can produce PWG format output (aka CUPS format, used for printing on Linux systems), but GhostScript can handle more of the different possible output colour spaces. | |||||||
> > | Both MuPDF and Ghostscript can produce PWG format output (aka CUPS format, used for printing on Linux systems), but Ghostscript can handle more of the different possible output color spaces. | |||||||
Changed: | ||||||||
< < | If you want to output for a printer type that is not currently supported by either GhostScript, CUPS or the existing "upp" files then you are going to need to add some code yourself (possibly a "upp" file or C code). | |||||||
> > | If you want to output for a printer type that is not currently supported by either Ghostscript, CUPS or the existing "upp" files then you are going to need to add some code yourself (possibly a "upp" file or C code). | |||||||
Adding a new printer type - via bitmap output | ||||||||
Changed: | ||||||||
< < | The easiest mechanism for outputting to a printer that is not already supported or that cannot be supported using the "uniprint" module is to get GhostScript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | |||||||
> > | The easiest mechanism for outputting to a printer that is not already supported or that cannot be supported using the "uniprint" module is to get Ghostscript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | |||||||
Changed: | ||||||||
< < | GhostScript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. Other such conversions can of course be added by the integrator. | |||||||
> > | Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. Other such conversions can of course be added by the integrator. | |||||||
Changed: | ||||||||
< < | MuPDF can render in RGB, Greyscale, or CMYK. GhostScript is capable of all this, and also of handling colour separations and DeviceN colors. | |||||||
> > | MuPDF can render in RGB, Greyscale, or CMYK. Ghostscript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
Adding a new printer type - via high level outputBy 'high level output' we mean making use of vector, text or image objects rather than breaking everything down to simple rasterised bitmaps. | ||||||||
Changed: | ||||||||
< < | If you wish to drive a printer with some different type of high level format, then both GhostScript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
> > | If you wish to drive a printer with some different type of high level format, then both Ghostscript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
Changed: | ||||||||
< < | GhostScript has high level devices to output PostScript (Level 2) and PCL-6 (aka PCL/XL). | |||||||
> > | Ghostscript has high level devices to output PostScript (Level 2) and PCL-6 (aka PCL/XL). | |||||||
Changed: | ||||||||
< < | While MuPDF does not currently offer any fully functional devices, it has both SVG output and PDF output modules that demonstrate its abilities. A third-party has implemented a GDI based output for doing rendering on Windows. | |||||||
> > | While MuPDF does not currently offer any fully functional devices, it has both SVG output and PDF output modules that demonstrate its abilities. A third-party has implemented a GDI based output for doing rendering on Windows. | |||||||
Changed: | ||||||||
< < | It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex engineer to get more advice. | |||||||
> > | It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex![]() | |||||||
Bitmap output | ||||||||
Changed: | ||||||||
< < | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX, PSD (Photoshop) or raw output use GhostScript. | |||||||
> > | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX, PSD (Photoshop) or raw output use Ghostscript. | |||||||
Changed: | ||||||||
< < | If you want TGA (TrueVision) use MuPDF. | |||||||
> > | If you want TGA (TrueVision) use MuPDF. | |||||||
Changed: | ||||||||
< < | Both GhostScript and MuPDF support PBM, PGM, PPM, PAM, PNG and both have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than GhostScript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | |||||||
> > | Both Ghostscript and MuPDF support PBM, PGM, PPM, PAM, PNG and both have the ability to do anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than Ghostscript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | |||||||
Changed: | ||||||||
< < | As a rule of thumb, if you are rendering PDF or XPS input for display based use, you probably want to be leaning towards MuPDF. | |||||||
> > | As a rule of thumb, if you are rendering PDF or XPS input for display based use, you probably want to be leaning towards MuPDF. | |||||||
Interactive behaviour | ||||||||
Changed: | ||||||||
< < | Viewers can be built either with GhostScript or MuPDF, but MuPDF is much better suited to this task. | |||||||
> > | Viewers can be built either with Ghostscript or MuPDF, but MuPDF is much better suited to this task. | |||||||
Changed: | ||||||||
< < | GhostScript cannot handle interactive features such as form filling, whereas MuPDF can, and MuPDF has support for incremental loading of Linearized (Web optimized) PDFs from web sites which can improve viewers response times. | |||||||
> > | Ghostscript cannot handle interactive features such as form filling, whereas MuPDF can, and MuPDF has support for incremental loading of Linearized (Web optimized) PDFs from web sites which can improve viewers response times. | |||||||
Banded rendering | ||||||||
Changed: | ||||||||
< < | Both GhostScript and MuPDF are capable of rendering pages in bands to keep memory usage down. | |||||||
> > | Both Ghostscript and MuPDF are capable of rendering pages in bands to keep memory usage down. | |||||||
Changed: | ||||||||
< < | GhostScript can be built with the ability to make use of RAM or disc based storage for its display list, whereas MuPDF runs entirely using RAM. | |||||||
> > | Ghostscript can be built with the ability to make use of RAM or disc based storage for its display list, whereas MuPDF runs entirely using RAM. | |||||||
Changed: | ||||||||
< < | GhostScript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | |||||||
> > | Ghostscript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | |||||||
Multithreaded operation | ||||||||
Changed: | ||||||||
< < | Both GhostScript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. | |||||||
> > | Both Ghostscript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. | |||||||
Changed: | ||||||||
< < | GhostScript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. GhostScript can render multiple bands in parallel. | |||||||
> > | Ghostscript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. Ghostscript can render multiple bands in parallel. | |||||||
Changed: | ||||||||
< < | The decision of how to handle threads is divorced from the core of MuPDF. It is possible to implement both of the above schemes with MuPDF, as well as many others (such as rendering thumbnails for pages on a background thread, while rendering current pages at different zoom levels). | |||||||
> > | The decision of how to handle threads is divorced from the core of MuPDF. It is possible to implement both of the above schemes with MuPDF, as well as many others (such as rendering thumbnails for pages on a background thread, while rendering current pages at different zoom levels). | |||||||
Changed: | ||||||||
< < | GhostScript offers certain common tasks in a ready rolled package. MuPDF requires slightly more integration, but is ultimately more flexible for it. | |||||||
> > | Ghostscript offers certain common tasks in a ready rolled package. MuPDF requires slightly more integration, but is ultimately more flexible for it. | |||||||
Manipulation of PDF files | ||||||||
Changed: | ||||||||
< < | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files, reduce the size, extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. Ghostscript can also encrypt the resulting PDF file allowing for separate "owner" and "user" passwords so that users can be give a restricted set of permissions. | |||||||
> > | Ghostscript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files, reduce the size, extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. Ghostscript can also encrypt the resulting PDF file allowing for separate "owner" and "user" passwords so that users can be give a restricted set of permissions. | |||||||
Changed: | ||||||||
< < | MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions, linearisation or addition of annotations without losing the existing information within the file. | |||||||
> > | MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions, linearisation or addition of annotations without losing the existing information within the file. | |||||||
Porting | ||||||||
Changed: | ||||||||
< < | Both GhostScript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. GhostScript (and GhostPCL) have been embedded in several printers and MuPDF has been embedded in many tablets and smart phones. | |||||||
> > | Both Ghostscript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. Ghostscript (and GhostPCL) have been embedded in several printers and MuPDF has been embedded in many tablets and smart phones. | |||||||
Speed | ||||||||
Changed: | ||||||||
< < | The actual rendering speeds of GhostScript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||
> > | The actual rendering speeds of Ghostscript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||
-- ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between GhostScript and MuPDF | ||||||||
Line: 96 to 96 | ||||||||
Manipulation of PDF files | ||||||||
Changed: | ||||||||
< < | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files reduce the size or to extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. Ghostscript can also encrypt the resulting PDF file allowing for separate "owner" and "user" passwords so that users can be give a restricted set of permissions. | |||||||
> > | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files, reduce the size, extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. Ghostscript can also encrypt the resulting PDF file allowing for separate "owner" and "user" passwords so that users can be give a restricted set of permissions. | |||||||
MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions, linearisation or addition of annotations without losing the existing information within the file. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between GhostScript and MuPDF | ||||||||
Line: 96 to 96 | ||||||||
Manipulation of PDF files | ||||||||
Changed: | ||||||||
< < | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files reduce the size or to extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. | |||||||
> > | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files reduce the size or to extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. Ghostscript can also encrypt the resulting PDF file allowing for separate "owner" and "user" passwords so that users can be give a restricted set of permissions. | |||||||
MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions, linearisation or addition of annotations without losing the existing information within the file. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between GhostScript and MuPDF | ||||||||
Changed: | ||||||||
< < | GhostScript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes to know which one to use in a given situation. | |||||||
> > | GhostScript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes be hard to know which one to use in a given situation. | |||||||
Input languages | ||||||||
Changed: | ||||||||
< < | If you need the ability to handle PostScript or PCL input, then you must use GhostScript or GhostPCL (a PCL parser on top of the GhostScript graphics library). | |||||||
> > | If you need the ability to handle PostScript input, then you must use GhostScript. If you need the ability to handle PCL input, then you must use GhostPCL (a PCL parser on top of the GhostScript graphics library). Similarly GhostXPS is an XPS parser written on top of the GhostScript graphics library. | |||||||
Changed: | ||||||||
< < | If you need the ability to handle EPUB or GBZ input, then you must use MuPDF. | |||||||
> > | For the rest of this discussion we will just say "GhostScript" when we actually mean "GhostScript, GhostPCL and GhostXPS"; everything we say about GhostScript applies to the others as they shares the same basic structure and devices. In other documents you may see all three of these referred to collectively as "GhostPDL". | |||||||
Changed: | ||||||||
< < | Both MuPDF and GhostScript can handle PDF and XPS input (GhostXPS is a the XPS parser on top of the GhostScript graphics library). | |||||||
> > | If you need the ability to handle EPUB or CBZ input, then you must use MuPDF. Both MuPDF and GhostScript can handle PDF and XPS input. | |||||||
MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. GhostScript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | ||||||||
Added: | ||||||||
> > | ||||||||
Colour Management | ||||||||
Changed: | ||||||||
< < | Currently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use GhostScript. The color management of GhostScript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
> > | Currently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use GhostScript. The colour management of GhostScript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
Output optionsIf you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use GhostScript. | ||||||||
Line: 18 to 27 | ||||||||
Output optionsIf you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use GhostScript. | ||||||||
Added: | ||||||||
> > | ||||||||
Printer outputAs a rule of thumb, if you want printer output, you probably want to be leaning towards using GhostScript. | ||||||||
Changed: | ||||||||
< < | If you want to output to a printer, then it is a question of whether GhostScript or MuPDF supports your printer out of the box. GhostScript has support for many printers that MuPDF does not including output in CUPS format for printing on linux and other Unix systems and a "uniprint" (Universal Printer) output module that allows many more printers to be supported by creating "upp" parameter files. | |||||||
> > | If you want to output to a printer, then it is a question of whether GhostScript or MuPDF supports your printer out of the box. GhostScript has support for many printers that MuPDF does not, including a "uniprint" (Universal Printer) output module that allows many more printers to be supported by creating "upp" parameter files. MuPDF does have support for some printer outputs (such as PCL and CUPS ones). If you use MuPDF and want to print to something other than a PCL printer then you are going to need to add some C code yourself. | |||||||
Changed: | ||||||||
< < | MuPDF does have support for some printer outputs (such as PCL ones). If you use MuPDF and want to print to something other than a PCL printer then you are going to need to add some C code yourself. | |||||||
> > | Both MuPDF and GhostScript can produce PWG format output (aka CUPS format, used for printing on Linux systems), but GhostScript can handle more of the different possible output colour spaces. | |||||||
If you want to output for a printer type that is not currently supported by either GhostScript, CUPS or the existing "upp" files then you are going to need to add some code yourself (possibly a "upp" file or C code). | ||||||||
Added: | ||||||||
> > | ||||||||
Adding a new printer type - via bitmap output | ||||||||
Changed: | ||||||||
< < | The easiest mechanism for outputting to a printer that is not already supported or that cannot be suppprted using the "uniprint" module is to get GhostScript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | |||||||
> > | The easiest mechanism for outputting to a printer that is not already supported or that cannot be supported using the "uniprint" module is to get GhostScript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | |||||||
Changed: | ||||||||
< < | GhostScript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. | |||||||
> > | GhostScript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. Other such conversions can of course be added by the integrator. MuPDF can render in RGB, Greyscale, or CMYK. GhostScript is capable of all this, and also of handling colour separations and DeviceN colors. | |||||||
Deleted: | ||||||||
< < | MuPDF can render in RGB, Greyscale, or CMYK. GhostScript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
Adding a new printer type - via high level output | ||||||||
Added: | ||||||||
> > | By 'high level output' we mean making use of vector, text or image objects rather than breaking everything down to simple rasterised bitmaps. If you wish to drive a printer with some different type of high level format, then both GhostScript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
GhostScript has high level devices to output PostScript (Level 2) and PCL-6 (aka PCL/XL). | ||||||||
Changed: | ||||||||
< < | If you wish to drive a printer with some different type of high level format (using vector objects rather than simple bitmap data), then both GhostScript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
> > | While MuPDF does not currently offer any fully functional devices, it has both SVG output and PDF output modules that demonstrate its abilities. A third-party has implemented a GDI based output for doing rendering on Windows. | |||||||
It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex engineer to get more advice. | ||||||||
Added: | ||||||||
> > | ||||||||
Bitmap output | ||||||||
Changed: | ||||||||
< < | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX PSD (Photoshop) or raw output use GhostScript. | |||||||
> > | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX, PSD (Photoshop) or raw output use GhostScript. | |||||||
If you want TGA (TrueVision) use MuPDF. | ||||||||
Line: 50 to 69 | ||||||||
Both GhostScript and MuPDF support PBM, PGM, PPM, PAM, PNG and both have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than GhostScript. If anti-aliased output is important to you, then MuPDF is probably a better bet. As a rule of thumb, if you are rendering PDF or XPS input for display based use, you probably want to be leaning towards MuPDF. | ||||||||
Added: | ||||||||
> > | ||||||||
Interactive behaviourViewers can be built either with GhostScript or MuPDF, but MuPDF is much better suited to this task. | ||||||||
Changed: | ||||||||
< < | GhostScript cannot handle interactive features such as form filling, whereas MuPDF can, and MuPDF has support for incremental loading of a Linearized (Web optimized) PDF from a web site which can improve viewers. | |||||||
> > | GhostScript cannot handle interactive features such as form filling, whereas MuPDF can, and MuPDF has support for incremental loading of Linearized (Web optimized) PDFs from web sites which can improve viewers response times. | |||||||
Banded renderingBoth GhostScript and MuPDF are capable of rendering pages in bands to keep memory usage down. | ||||||||
Line: 62 to 83 | ||||||||
GhostScript can be built with the ability to make use of RAM or disc based storage for its display list, whereas MuPDF runs entirely using RAM. GhostScript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | ||||||||
Added: | ||||||||
> > | ||||||||
Multithreaded operation | ||||||||
Changed: | ||||||||
< < | Both GhostScript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. GhostScript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. GhostScript can render mutiple bands in parallel. | |||||||
> > | Both GhostScript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. GhostScript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. GhostScript can render multiple bands in parallel. The decision of how to handle threads is divorced from the core of MuPDF. It is possible to implement both of the above schemes with MuPDF, as well as many others (such as rendering thumbnails for pages on a background thread, while rendering current pages at different zoom levels). GhostScript offers certain common tasks in a ready rolled package. MuPDF requires slightly more integration, but is ultimately more flexible for it. | |||||||
Manipulation of PDF filesGhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files reduce the size or to extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. | ||||||||
Changed: | ||||||||
< < | MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions or addition of annotations without losing the existing information within the file. | |||||||
> > | MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions, linearisation or addition of annotations without losing the existing information within the file. | |||||||
PortingBoth GhostScript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. GhostScript (and GhostPCL) have been embedded in several printers and MuPDF has been embedded in many tablets and smart phones. | ||||||||
Added: | ||||||||
> > | SpeedThe actual rendering speeds of GhostScript and MuPDF are broadly similar. MuPDF benefits from having its PDF handling written in C, so is faster at navigating and extracting information from PDF files. | |||||||
-- ![]() ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Changed: | ||||||||
< < | Choosing between Ghostscript and MuPDFGhostscript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes to know which one to use in a given situation. | |||||||
> > | Choosing between GhostScript and MuPDF | |||||||
Added: | ||||||||
> > | GhostScript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes to know which one to use in a given situation. | |||||||
Input languages | ||||||||
Changed: | ||||||||
< < | If you need the ability to handle Postscript (or PCL) input, then you must use Ghostscript (or GhostPCL). | |||||||
> > | If you need the ability to handle PostScript or PCL input, then you must use GhostScript or GhostPCL (a PCL parser on top of the GhostScript graphics library). | |||||||
If you need the ability to handle EPUB or GBZ input, then you must use MuPDF. | ||||||||
Changed: | ||||||||
< < | Both MuPDF and Ghostscript can handle PDF and XPS input. MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. Ghostscript can be persuaded to handle such formats using postscript programs. | |||||||
> > | Both MuPDF and GhostScript can handle PDF and XPS input (GhostXPS is a the XPS parser on top of the GhostScript graphics library). | |||||||
Added: | ||||||||
> > | MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. GhostScript is distributed with PostScript "helper files" to handle JPEG, GIF, MIFF (ImageMagick format) and raw files and can be persuaded to handle other formats using this type of PostScript program. | |||||||
Colour Management | ||||||||
Changed: | ||||||||
< < | Currently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use Ghostscript. | |||||||
> > | Currently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use GhostScript. The color management of GhostScript uses ICC profiles and is extensive (refer to http://www.ghostscript.com/doc/current/GS9_Color_Management.pdf![]() | |||||||
Output options | ||||||||
Changed: | ||||||||
< < | If you want to output to pdf or xps, then you need to use Ghostscript. | |||||||
> > | If you want to output PostScript, PCL/XL, PDF, or XPS, or you want to output to a MS Windows printer, then you need to use GhostScript. | |||||||
Printer output | ||||||||
Changed: | ||||||||
< < | If you want to output to a printer, then it is a question of whether Ghostscript or MuPDF support your printer out of the box. Ghostscript has support for many printers that MuPDF does not. | |||||||
> > | As a rule of thumb, if you want printer output, you probably want to be leaning towards using GhostScript. | |||||||
Changed: | ||||||||
< < | MuPDF does have support for some printer outputs (such as PCL ones), but this support is not as extensive as Ghostscript's. | |||||||
> > | If you want to output to a printer, then it is a question of whether GhostScript or MuPDF supports your printer out of the box. GhostScript has support for many printers that MuPDF does not including output in CUPS format for printing on linux and other Unix systems and a "uniprint" (Universal Printer) output module that allows many more printers to be supported by creating "upp" parameter files. | |||||||
Changed: | ||||||||
< < | As a rule of thumb, if you want printer output, you probably want to be leaning towards using Ghostscript. If you want to output for a printer type that is not currently supported by either Ghostscript or MuPDF, then you are going to need to add some code yourself. | |||||||
> > | MuPDF does have support for some printer outputs (such as PCL ones). If you use MuPDF and want to print to something other than a PCL printer then you are going to need to add some C code yourself. | |||||||
Added: | ||||||||
> > | If you want to output for a printer type that is not currently supported by either GhostScript, CUPS or the existing "upp" files then you are going to need to add some code yourself (possibly a "upp" file or C code). | |||||||
Adding a new printer type - via bitmap output | ||||||||
Changed: | ||||||||
< < | The easiest mechanism for outputting to a printer is to get Ghostscript or MuPDF to render to a bitmap, and then for you to convert that bitmap into a data stream for your printer. Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. | |||||||
> > | The easiest mechanism for outputting to a printer that is not already supported or that cannot be suppprted using the "uniprint" module is to get GhostScript or MuPDF to render to a bitmap, and then for convert that bitmap into a data stream for your printer. | |||||||
Changed: | ||||||||
< < | MuPDF can render in RGB, Greyscale, or CMYK. Ghostscript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
> > | GhostScript has the ability to do a range of different halftoning techniques for Monochrome printers including ordered (spot) dither based on threshold arrays or functions and error diffusion. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. | |||||||
Added: | ||||||||
> > | MuPDF can render in RGB, Greyscale, or CMYK. GhostScript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
Adding a new printer type - via high level output | ||||||||
Changed: | ||||||||
< < | If you wish to drive your printer in high level mode (using vector objects rather than simple bitmap data), then both Ghostscript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
> > | GhostScript has high level devices to output PostScript (Level 2) and PCL-6 (aka PCL/XL). | |||||||
Changed: | ||||||||
< < | It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex engineer to get more advice. | |||||||
> > | If you wish to drive a printer with some different type of high level format (using vector objects rather than simple bitmap data), then both GhostScript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. | |||||||
Added: | ||||||||
> > | It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex engineer to get more advice. | |||||||
Bitmap output | ||||||||
Changed: | ||||||||
< < | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, use Ghostscript. | |||||||
> > | If you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, or if you need JPEG, TIFF, MIFF, BMP, PCX PSD (Photoshop) or raw output use GhostScript. | |||||||
Changed: | ||||||||
< < | Both Ghostscript and MuPDF have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than Ghostscript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | |||||||
> > | If you want TGA (TrueVision) use MuPDF. | |||||||
Changed: | ||||||||
< < | As a rule of thumb, if you are rendering non postscript input for display based use, you probably want to be leaning towards MuPDF. | |||||||
> > | Both GhostScript and MuPDF support PBM, PGM, PPM, PAM, PNG and both have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than GhostScript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | |||||||
Added: | ||||||||
> > | As a rule of thumb, if you are rendering PDF or XPS input for display based use, you probably want to be leaning towards MuPDF. | |||||||
Interactive behaviour | ||||||||
Changed: | ||||||||
< < | Viewers can be built either with Ghostscript or MuPDF, but MuPDF is much more suited to this task. Ghostscript cannot handle interactive features such as form filling, whereas MuPDF can. | |||||||
> > | Viewers can be built either with GhostScript or MuPDF, but MuPDF is much better suited to this task. | |||||||
Added: | ||||||||
> > | GhostScript cannot handle interactive features such as form filling, whereas MuPDF can, and MuPDF has support for incremental loading of a Linearized (Web optimized) PDF from a web site which can improve viewers. | |||||||
Banded rendering | ||||||||
Changed: | ||||||||
< < | Both Ghostscript and MuPDF are capable of rendering pages in bands to keep memory usage down. | |||||||
> > | Both GhostScript and MuPDF are capable of rendering pages in bands to keep memory usage down. | |||||||
Changed: | ||||||||
< < | Ghostscript can be built with the ability to make use of backing store (such as disc based storage) for its display list, whereas MuPDF runs entirely using RAM. Ghostscript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | |||||||
> > | GhostScript can be built with the ability to make use of RAM or disc based storage for its display list, whereas MuPDF runs entirely using RAM. | |||||||
Added: | ||||||||
> > | GhostScript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | |||||||
Multithreaded operation | ||||||||
Changed: | ||||||||
< < | Both Ghostscript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. | |||||||
> > | Both GhostScript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. GhostScript allows for one page to be rendered in background threads while the display list for the next page is created by the interpreter. GhostScript can render mutiple bands in parallel. | |||||||
Manipulation of PDF files | ||||||||
Changed: | ||||||||
< < | Ghostscript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files or to extract pages etc. Extra (non-graphical) information in the PDFs (such as structural information, bookmarks etc) is lost during this process. | |||||||
> > | GhostScript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files reduce the size or to extract pages, change the color model, etc. Some (non-graphical) information in the PDFs (such as structural information, bookmarks etc) may be lost during this process. The type of PDF file created by Ghostscript can be PDF/A-1, PDF/A-2 or PDF/X-3 and a PDF (1.4 and above) that has transparency can be "flattened" to make a PDF 1.3 that does not use transparency. | |||||||
MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions or addition of annotations without losing the existing information within the file. | ||||||||
Deleted: | ||||||||
< < | ||||||||
Porting | ||||||||
Changed: | ||||||||
< < | Both Ghostscript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. | |||||||
> > | Both GhostScript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. GhostScript (and GhostPCL) have been embedded in several printers and MuPDF has been embedded in many tablets and smart phones. | |||||||
-- ![]() | ||||||||
Added: | ||||||||
> > | -- ![]() | |||||||
Comments | ||||||||
Deleted: | ||||||||
< < | ||||||||
\ No newline at end of file | ||||||||
Added: | ||||||||
> > |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | ||||||||
Line: 52 to 52 | ||||||||
Both Ghostscript and MuPDF have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than Ghostscript. If anti-aliased output is important to you, then MuPDF is probably a better bet. | ||||||||
Added: | ||||||||
> > | As a rule of thumb, if you are rendering non postscript input for display based use, you probably want to be leaning towards MuPDF. | |||||||
Interactive behaviourViewers can be built either with Ghostscript or MuPDF, but MuPDF is much more suited to this task. | ||||||||
Line: 64 to 66 | ||||||||
Ghostscript can be built with the ability to make use of backing store (such as disc based storage) for its display list, whereas MuPDF runs entirely using RAM. | ||||||||
Added: | ||||||||
> > | Ghostscript can make its own decisions about how big a band buffer to use (though it can be told explicitly by the caller), whereas MuPDF always leaves this to the caller to specify. | |||||||
Multithreaded operationBoth Ghostscript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content. | ||||||||
Line: 76 to 80 | ||||||||
Porting | ||||||||
Changed: | ||||||||
< < | Both Ghostscript and MuPDF are highly portable, but MuPDF is probably a better bet for embedded or resource constrained devices. | |||||||
> > | Both Ghostscript and MuPDF are highly portable. Opinions differ between engineers as to which is easier to embed. | |||||||
-- ![]() |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Choosing between Ghostscript and MuPDF | ||||||||
Line: 38 to 38 | ||||||||
Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap. | ||||||||
Added: | ||||||||
> > | MuPDF can render in RGB, Greyscale, or CMYK. Ghostscript is capable of all this, and also of handling color separations and DeviceN colors. | |||||||
Adding a new printer type - via high level outputIf you wish to drive your printer in high level mode (using vector objects rather than simple bitmap data), then both Ghostscript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Choosing between Ghostscript and MuPDFGhostscript and MuPDF are both high quality renderers for page description languages. While there is considerable overlap in their abilities, each one is tailored for slightly different requirements. It can therefore sometimes to know which one to use in a given situation.Input languagesIf you need the ability to handle Postscript (or PCL) input, then you must use Ghostscript (or GhostPCL). If you need the ability to handle EPUB or GBZ input, then you must use MuPDF. Both MuPDF and Ghostscript can handle PDF and XPS input. MuPDF handles bitmap formats such as JPEG, PNG and TIF natively. Ghostscript can be persuaded to handle such formats using postscript programs.Colour ManagementCurrently, MuPDF does not offer any colour management options. Therefore if a colour managed workflow is required, you need to use Ghostscript.Output optionsIf you want to output to pdf or xps, then you need to use Ghostscript.Printer outputIf you want to output to a printer, then it is a question of whether Ghostscript or MuPDF support your printer out of the box. Ghostscript has support for many printers that MuPDF does not. MuPDF does have support for some printer outputs (such as PCL ones), but this support is not as extensive as Ghostscript's. As a rule of thumb, if you want printer output, you probably want to be leaning towards using Ghostscript. If you want to output for a printer type that is not currently supported by either Ghostscript or MuPDF, then you are going to need to add some code yourself.Adding a new printer type - via bitmap outputThe easiest mechanism for outputting to a printer is to get Ghostscript or MuPDF to render to a bitmap, and then for you to convert that bitmap into a data stream for your printer. Ghostscript has the ability to do a range of different halftoning techniques for Monochrome printers. MuPDF renders in contone, and then has code in it to do simple thresholding based halftoning to give a monochrome bitmap.Adding a new printer type - via high level outputIf you wish to drive your printer in high level mode (using vector objects rather than simple bitmap data), then both Ghostscript and MuPDF can handle this. Both products require you to implement a 'device' to perform graphics operations on a virtual page. It is beyond the scope of this document to talk more about this here. Discuss your needs with an Artifex engineer to get more advice.Bitmap outputIf you are outputting to a bitmap other than monochrome, greyscale, RGB or CMYK, use Ghostscript. Both Ghostscript and MuPDF have the ability to do Anti-aliased rendering, but MuPDF has this embedded in the renderer at a lower level than Ghostscript. If anti-aliased output is important to you, then MuPDF is probably a better bet.Interactive behaviourViewers can be built either with Ghostscript or MuPDF, but MuPDF is much more suited to this task. Ghostscript cannot handle interactive features such as form filling, whereas MuPDF can.Banded renderingBoth Ghostscript and MuPDF are capable of rendering pages in bands to keep memory usage down. Ghostscript can be built with the ability to make use of backing store (such as disc based storage) for its display list, whereas MuPDF runs entirely using RAM.Multithreaded operationBoth Ghostscript and MuPDF interpret pages using a single thread, but both can use multiple threads to actually render the page content.Manipulation of PDF filesGhostscript has the ability to read PDF (or other format) files, to break it down into graphical objects and to make completely new PDF files from it. Some users make use of this to 'sanitise' PDF files or to extract pages etc. Extra (non-graphical) information in the PDFs (such as structural information, bookmarks etc) is lost during this process. MuPDF has the ability to directly manipulate PDF files. While it cannot convert a non-PDF file to a PDF file, it can perform operations such as page deletions or addition of annotations without losing the existing information within the file.PortingBoth Ghostscript and MuPDF are highly portable, but MuPDF is probably a better bet for embedded or resource constrained devices. --![]() Comments |