Gretyl's Portal

Heretto Help

Show Page Sections

Heretto PDF Generator Troubleshooting

XSL Namespace Declarations Are Removed Upon Save

I want to define custom XSL declarations but my edits are removed when I save the Heretto PDF Generator publishing scenario.

The removal of XSL namespace declarations that you add in the XSLT tab is a limitation of the Heretto PDF Generator feature.

  1. Open a Heretto PDF Generator publishing scenario.
  2. In the XSLT tab, add the namespace declarations as usual.
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
      version="2.0"
      exclude-result-prefixes="dita-ot ditamsg jcm-link-man table">
  3. For each declaration, add the :preserve="preserve" attribute.
    To preserve the xmlns:dita-ot declaration add:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" dita-ot:preserve="preserve"
      xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot"
      version="2.0"
      exclude-result-prefixes="dita-ot ditamsg jcm-link-man table">
  4. Click Save Scenario.

SVG Files Render with an Incorrect Font in Output

SVG images used to publish with a specific font and now a different font is used in PDF Generator output. For example, text in my .svg files used to be published using Arial and now it's published using Times New Roman.

Portions of this procedure can be completed only by users assigned the Administrator role in Heretto CCMS.

Might be caused by an upgrade of the Prince XML version used by PDF Generator.

  1. Learn which fonts are pre-installed.

    Commonly used fonts that are pre-installed include:

    • Arial.ttf

    • NotoSans.ttf

    • NotoSerif.tff

    • Tahoma.tff

    • Verdana.tff

    For the full list, contact your Customer Success Manager (CSM).

  2. Use this example to prepare the CSS code that you need for importing your font.
    @font-face {
      font-family: "Arial";
      font-style: normal;
      src: url(/usr/share/fonts/Arial.ttf) format("truetype");
    }
    Important: Do not use either quotation mark or apostrophe characters in the url() CSS function.
    1. Replace Arial with the name of your font.
    2. Replace woff2 with the appropriate font format.

      For ttf fonts, use format("truetype"). For otf fonts, use format("opentype"). For woff fonts, use woff. For woff2 fonts, use woff2.

  3. (Administrators only) Go to your PDF Generator scenario and open the CSS tab. Paste the code that you prepared under @import rules but above your proper CSS code.
    /* These are the base styles provided by Heretto and are subject to change as we make improvements. If you don't want these changes you can remove this link to start from scratch. Cheers!*/
    @import url("https://jorsek.github.io/pdfgen.github.io/styles1.1/gray_pdf.css");
    @font-face {
      font-family: "Arial";
      font-style: normal;
      src: url(/usr/share/fonts/Arial.ttf) format("truetype");
    }
    /* My styling edits start here */
    h1.title {
  4. Apply the new font to the elements that you want to modify.
    Be sure to use the right CSS selectors to select the elements properly.
    h1.title {
    	font-family: "Arial", normal;
    }