Announcement

Collapse
No announcement yet.

Error writing PDF document

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error writing PDF document

    I have a channel that takes information from an HL7 ORM message and creates a PDF document. It creates the format of the document through a transformer and HTML encoding. The channel was working but when I upgraded to Mirth 3.12 it started giving me an error of,

    Document Writer error
    ERROR MESSAGE: Error writing document
    org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.

    I have attached the transformer that creates the PDF if that helps. Anyone know what I need to change in order for this to work again? Thanks for the help!
    Attached Files

  • #2
    I suspect you can just remove the declaration. I don't think you need it to write the PDF.
    Diridium Technologies, Inc.
    https://diridium.com

    Comment


    • #3
      I tried removing that line and now I get the error of,

      Document Writer error
      ERROR MESSAGE: Error writing document
      org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

      This is the part of the code that I changed and got the new error. The first line was the one that I removed and the second line (tmp+="\n<html>" is what I added in it's place. Do you think I should have done it differently? The data type for this destination is set as HL7 v2.x and Raw as the outbound.

      //tmp="<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">";
      tmp+="\n<html>";
      tmp+="\n<head>";
      tmp+="\n<style media="print" type="text/css">";
      tmp+="\n</style>";
      tmp+="\n</head>";
      tmp+="\n<body>";

      Comment


      • #4
        Never mind. I removed all of the html formatting code and it is working now. Thanks for the suggestion.

        Comment

        Working...
        X