Replace non-breaking space component

Replace non-breaking space component

This advanced workflow component, Replace non-breaking space replaces any non-breaking space (nbsp) hexadecimal 0A or C2A0 in UTF-8 with a normal space in an XML file. An alternative to this component (and more detailed information) is found in the troubleshooting section.

 

This can be used in order to avoid the error:

Error during rendering:

Message: org.apache.fontbox.ttf.TrueTypeFont.getAdvanceWidth(I) during processing.

 

Non-breaking spaces is a way to insert a space in a text/string while indicating, that the previous and following words are not to be split into separate lines.

The problem with a non-breaking space can be, that this character may not be supported in the font, that you are using and/or is not supported by the barcode type in which this text might be used for.

 

One alternative solution could be to make sure to use a font, that does include the non-breaking space.

Another alternative solution is to manually search and replace any non-breaking spaces in a string before using it in a text.

 

The Replace non-breaking space component has no parameters, it accepts XML as input and this component simply replace any non-breaking spaces with a normal space and return the changed contents into the payload of the workflow.

 

If you want to make sure, that a non-breaking space in an input file cannot cause an issue, then you can execute this component early in the workflow.

    • Related Articles

    • String Manipulation

      XPath includes powerful functions for processing text within XML elements. This section explores how to concatenate strings, extract substrings, search within text, replace characters, and tokenize strings into lists. Adding preceding/leading or ...
    • PDF to splf component

      IMPORTANT! DO NOT use this feature in the 1.9.0 version, as an important change was made in the next version, which changed the behavior of existing definitions. InterFormNG2 can extract text from a PDF file and put the extracted text into the ...
    • Advanced Utilities workflow components

      The Advanced Utilities workflow components are as follows: Append to zip archive. Appends the payload to a zip file. The zip file will be created, if the referenced zip file does not exist. Attachment to payload. Takes a named attachment, removes it ...
    • PDF Delayed email - shortcut component

      It is possible to create an email, that is to be sent at a later time. This can e.g. be used, if you want to send an invoice to a customer at the end of the day, but you want to hold the email to make it possible to issue another email later (to ...
    • Troubleshooting

      This section contains solutions to specific problems: Issues related to namespaces in input XML files Error during rendering: Message: org.apache.fontbox.ttf.TrueTypeFont.getAdvanceWidth(I) PKIX path building failed: XXXX: unable to find valid ...