Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

PDF Writer ERROR

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

  • PDF Writer ERROR

    Hi,

    I'm trying to use the Document Writer with PDF Type at Destination. I wrote the next template:

    <html>
    <head></head>
    <body>
    Toc&oacute;n
    </body>
    </html>

    But I always have the next error (because I'm using html label "oacute" ):

    ERROR-401: Document connector error
    ERROR MESSAGE: Error writing document
    org.xml.sax.SAXParseException: Invalid byte 1 of 1-byte UTF-8 sequence.
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(U nknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at com.webreach.mirth.connectors.doc.DocumentMessageD ispatcher.writeDocument(DocumentMessageDispatcher. java:139)
    at com.webreach.mirth.connectors.doc.DocumentMessageD ispatcher.doDispatch(DocumentMessageDispatcher.jav a:104)
    at com.webreach.mirth.connectors.doc.DocumentMessageD ispatcher.doSend(DocumentMessageDispatcher.java:19 4)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:89)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:236)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:138)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)

  • #2
    Re:PDF Writer ERROR

    It's an encoding problem with the Mirth interface. Instead of 'รณ' use the HTML entities for non-ascii as "&oacute;"

    But you need to do something more: PDF Writter treat the entry as a XML document, no XHTML. Yo need to make a reference to the XHTML dtd to allow the inclusion of HTML entitites (as &oacute

    Try:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/url]
    <html>
    
    <head></head>
    
    <body>
    
    Toc&oacute;n
    
    </body>
    
    </html>
    Also, to avoid an HTML request each time a PDF is generated you could save xhtml1-strict.dtd, xhtml-lat1.ent, xhtml-symbol.ent and xhtml-special.ent from http://www.w3.org/TR/xhtml1/DTD/ to mirth local dir and use a local reference to the DTD:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml1-strict.dtd">

    Comment


    • #3
      Re:PDF Writer ERROR

      Thank you very much,

      It was solved.

      Comment

      Working...
      X