.. /* * This file is part of the SavaPage project . * Copyright (c) 2026 Datraverse B.V. * Author: Rijk Ravestein. * * SPDX-FileCopyrightText: (c) 2020 Datraverse B.V. * SPDX-License-Identifier: CC-BY-SA-4.0 * * For more information, please contact Datraverse B.V. at this * address: info@datraverse.com */ .. _ch-printer-postscript-processing: PostScript Print Processing --------------------------- .. contents:: |RST_TABLE_OF_CONTENTS| :depth: 2 :local: .. _ch-printer-postscript-processing-intro: Introduction ~~~~~~~~~~~~ The PostScript that arrives at SavaPage by :ref:`PostScript Driver Print ` or :ref:`Driverless File Transfer Print ` is the first to be converted to PDF by the ``ps2pdf`` program from the Ghostscript suite. .. note:: :name: ch-printer-ps2pdf ``ps2pdf`` is a work-alike for nearly all the functionality (but not the user interface) of Adobe's Acrobat Distiller product: it converts PostScript files to Portable Document Format (PDF) files, and is implemented as a command script that invokes `Ghostscript `__. .. tip:: The final result of PostScript Print Processing on the display of fonts is shown in the SafePages :ref:`Document Details ` popup dialog. .. _ch-printer-postscript-licensed-fonts: Licensed Fonts ~~~~~~~~~~~~~~ Using a font requires a license, just like a software program. There are fonts that require a special (paid) license for embedding them into documents so these documents can be used outside the scope of the licensed computer or licensed document viewer. Be careful when you print a document containing license restricted fonts to |PRODUCT_NAME|, since font rendering might not be as expected. It all depends on how the print toolchain renders non-embeddable fonts to PostScript at the client side. Some toolchains will convert these fonts to bitmaps. Others, will embed them unconditionally, which is fine for local printing, but not for SavaPage because the :ref:`ps2pdf ` converter might give a Warning message saying the font *“cannot be embedded because of licensing restrictions”*. As a result font substitution might be flawed and :ref:`SafePages ` preview will show garbled text. In those cases rendering PostScript pages to *images* is a solution. See :ref:`PostScript Configuration Properties `. .. important:: Windows computers are more prone to font licensing issues than GNU/Linux workstations where Open Source Fonts are the norm. When printing from Windows use Open Source Fonts wherever possible. Many of these fonts come with the increasingly popular `Open Font License `__ (OFL) from `SIL International `__, a nonprofit organization committed to serving language communities worldwide. The OFL is “a free, libre and open source license specifically designed for fonts and related software based on our experience in font design and linguistic software engineering.” .. _ch-printer-encryped-pdf: Printing Encrypted PDF ~~~~~~~~~~~~~~~~~~~~~~ When you print an encrypted PDF document from Adobe Reader to a PostScript printer like |PRODUCT_NAME|, it creates a PostScript file that contains a notice telling the recipient that it is not permitted to convert (re-distill) it to PDF again. The Ghostscript :ref:`ps2pdf ` program respects this notice, and throws an error saying *“This PostScript file was created from an encrypted PDF file. Re-distilling encrypted PDF is not permitted”*. If, for example, an encrypted PDF allows printing only, it should not be re-distilled to a plain PDF equivalent, where all intended protection is removed. SavaPage respects this policy. Moreover, on behalf of its users SavaPage would like its own encrypted PDF documents to be respected in the same way. However, when an encrypted document is allowed to be printed, SavaPage would like to be able to receive it as printer, so it can be previewed and Proxy Printed. But, for that to happen we need to convert it to SafePages, i.e. to PDF format. That's where we are facing the ``ps2pdf`` barrier. To solve this issue SavaPage has an optional workaround that ignores the PostScript notice at the point where we need the ``ps2pdf`` program to create the PDF, so SafePages can be displayed and Proxy Printed as intended. The workaround is activated when :ref:`Allow Encrypted PDF for Proxy Printing ` is enabled. .. _ch-printer-postscript-config-props: PostScript Configuration Properties ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. list-table:: PostScript Print Configuration Properties :width: 100% :widths: 40 60 :header-rows: 1 * - Configuration property - Description * - | **Driver Print** - * - print-in.ps.driver.images.trigger - Trigger to render driver printed PostScript pages to images: ``AUTO`` = trigger when ``ps2pdf`` produces ``stderr`` messages (default), ``OFF`` = never trigger, ``ON`` = always trigger. * - print-in.ps.driver.images.dpi - DPI for triggered images of PostScript driver print. Default ``300``. * - print-in.ps.driver.detain - Temporarily detain driver printed PostScript file in the :ref:`JVM Temporary Files ` folder. ``OFF`` = never detain (default), ``ON`` = always detain, ``AUTO`` = detain when ``ps2pdf`` produces ``stderr`` messages. * - | **Driverless File Transfer Print** - * - print-in.ps.driverless.images.trigger - Trigger to render driverless transferred PostScript file pages to images: ``AUTO`` = trigger when ``ps2pdf`` produces ``stderr`` messages (default), ``OFF`` = never trigger, ``ON`` = always trigger. * - print-in.ps.driverless.images.dpi - DPI for triggered images of PostScript driverless file transfer. Default ``300``. See |RST_LINK_CONFIG_EDITOR| on how to set these properties.