I have a requirement to generate a QR Code and attach it to the Word document( I’m creating the Word documents by passing the word template as a param to the pxGenerateAndAttachDocument).
I have created QR as an Image in the Data-Content-Image class and added it in the UI to verify whether it’s correct. I’m able to scan and view the information in it.
The problem is inserting the QR code as an image in the Word document, I have tried these tags to display but none of them are useful.
<pegaref config={“name”:“QRCorrespondence”,“type”:“C”}> (I have inserted HTML(Code to retrieve the image) section in the correspondence.
{pega:insert Corr=QRCorrespondence!}
See the attachments.
Please suggest how to insert the Data-Content-Image instance in the Word document.
To insert a Data-Content-Image instance, such as a QR code, into a Word document in Pega 8.7.6, you can follow these steps:
Create a Correspondence Rule: Create a correspondence rule and include the section that contains the QR code image.\
Use the PegaDocumentObject Tag: Use the <PegaDocumentObject> tag to insert the image. The tag should include the InsKey of the image rule. For example:
Your image Key(InsKey of the rule)
Modify the Word Template: Insert the created correspondence rule into the Word template. If you are editing an existing Word template, modify it by adding the created correspondence rule
Generate the Document: Write an activity and call the RUF pzGenerateDocument, which will give you the URL of the generated document. You can refer to the pzDocumentNow activity for additional help
This approach should help you successfully insert the QR code image into your Word document
This is a GenAI-powered tool. All generated answers require validation against the provided references.
I have followed above approach to insert the image dynamically with PegaDocumentObject tag in the section and inserted the section in a correspondence and then finally inserted the correspondence in the word template.
After following this approach, the document is not generating and getting the error as class does not exist. please find the tracer image below.
I have imported the jar file in the local edition which is available in the solution that you provided, and followed the steps to generate the word documents, there is no image is inserted in the generated document.
That too the solution provided 8 years ago
Can you please provide any solution which is provided recently?
@LakshmanKumarThota if you believe the product is not working as documented, please log a support incident ('Error ‘class does not exist’ when trying to insert the image dynamically with PegaDocumentObject tag ) and provide the INC id here so that we can track this.