Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Word Document to PDF Conversion issue

SA-40774

Summary



Error when generating a PDF without populating the content of a Word document using the ConvertAttachmentToPDF flow action.


Error Messages



Failed to load PDF document


Steps to Reproduce



Include a Word document as an attachment for a work object using the out-of-the-box ConvertAttachmentToPDF flow action.


Root Cause



A defect in Pegasystems’ code or rules.

The strFileSource was not parsed in the HTML document.



Resolution



Perform the following local-change:
  1. Declare strFileSource in the ActionConvertAttachmentToPDF HTML -

    <input id="strFileSource" name="strFileSource" type="hidden" value="<pega:reference name='Param.strFileSource'/>">
  2. Add the below line to the ConvertToPdf() function present in the ActionConvertAttachmentToPDF HTML Source (JSP)

    document.getElementById('strFileSource').value = sResult;
  3. Remove the Span tag for the error handling in the Object tag:

    Code after the span tags removal must be :


    <object classid="CLSID:ABA23149-06BA-440D-88FF-69203B966083" codeType=application/x-oleobject id="OpenAuthor" style="visibility:hidden" viewastext>
    PARAM NAME="_ExtentX" VALUE="0">
    <PARAM NAME="_ExtentY" VALUE="0">
    </object>

Suggest Edit

Published November 8, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us