Class PatchedPdfLibraryUnavailableException

  • All Implemented Interfaces:
    Serializable

    public class PatchedPdfLibraryUnavailableException
    extends JRRuntimeException
    No longer used, OpenPDF 1.3.32 supports disabling glyph substitution.

    Exception raised when Apache FOP based glyph substitution is disabled, but the patched version OpenPDF library has not been detected.

    The OpenPDF library (used by the JasperReports PDF exporter) performs glyph substitution when Apache FOP is available on the classpath. Glyph substitution is required for complex scripts, but for simple scripts such as Latin can have undesired consequences, for instance copying and searching text might not work properly.

    JasperReports uses as default dependency a patched version of OpenPDF that makes FOP based glyph substitution optional. The patched version of OpenPDF (1.3.30.jaspersoft.x) is available in a Maven repository located at https://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/com/github/librepdf/openpdf/

    Glyph substitution is configured via the net.sf.jasperreports.export.pdf.classic.fop.glyph.substitution.enabled property, set to false by default.

    With the property set to fase and Apache FOP is present on the classpath, the patched OpenPDF is required in order to disable glyph substitution. If the patched OpenPDF is not detected, this exception will be raised.

    To avoid the exception being raised, one can either use the patched OpenPDF version or explicitly set the net.sf.jasperreports.export.pdf.classic.fop.glyph.substitution.enabled to true. If choosing the latter option, the net.sf.jasperreports.export.pdf.classic.document.language property can be set to specify the language used for glyph substitutions.

    Note that JasperReports features an alternative solution for complex languages based on Java AWT.

    Author:
    Lucian Chirita (lucianc@users.sourceforge.net)
    See Also:
    Serialized Form
    • Constructor Detail

      • PatchedPdfLibraryUnavailableException

        public PatchedPdfLibraryUnavailableException()