Replacing invalid XML characters with empty strings in PDF documents


PDF generation of documents that contain invalid XML (null) characters fails. The PDF_GEN_FIND_REPLACE configuration parameter enables to replace the invalid XML characters with empty strings in the documents when PDFs are generated. By default, a JSON string with invalid XML characters, � and [\\000]* is configured in the PDF_GEN_FIND_REPLACE parameter. If the PDF generation fails due to any other invalid XML characters, as an administrator, you can add additional characters or regex in JSON format in the PDF_GEN_FIND_REPLACE parameter.

To specify the invalid XML characters in JSON format

  1. Login to BMC Helix Business Workflows.
  2. Click Settings image2022-8-30_16-48-22.png.
  3. Expand Application Configuration > Common Configurations.
  4. Click PDF_GEN_FIND_REPLACE.
  5. In the Configuration value field, the following JSON string is set as the default value:
    {"charConfigs":[{"find":"�","replace":""}],"regexConfigs":[{"find":"[\\000]*","replace":""}]}Here, � and [\\000]* are the invalid XML (null) characters.
  6. (Optional) If the PDF generation fails due to any other invalid XML (null) characters, add those additional characters or regex in the JSON string.
  7. Click Save.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*