sayani paul (sayanip1)

sayanip1 Member since 2014 1 post
Posted: September 12, 2019
Last activity: September 20, 2019
Posted: 12 Sep 2019 10:05 EDT
Last activity: 20 Sep 2019 13:38 EDT

How to append the content of attachments to a PDF file

Requirement: Generate a PDF file that should contain the content of the case attachement. There can be various types of document attached to a case. From pc_data_workattach fetch the byte stream and append the content of those attachments to the PDF file.

How PDF is currently generated:

  1. The PDF is generated using an activity, using the concept of “HTMLtoPDF”
  2. An HTML stream is used where a section is referred

Approach to append the attachment content to the PDF:

  1. We need to attach the content of attached file in this section. Created a section and unchecked the ‘Auto-generated HTML’. We have fetched pyAttachStream from pc_data_workattach and tried following code in this section.
  1. Passing the InputStream as image source (For Image file)

<HTML><img src='InputStream' />

  1. Passing the value of InputStream as object.

<object> <pega:reference name="Property.pyAttachStream" /> </object>

The Inputstream is displayed in PDF instead of the content.

With this approach we’re unable to generate the PDF with the content of the attachment.

Enterprise Application Development Dev/Designer Studio
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.