Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Tags for generating .docx documents through APIs

Updated on November 22, 2021

APIs support generating formatted and personalized documents that you can use during case processing. To save time and resources, the pxGenerateWordDocument API provides the possibility of generating a .docx document on the server side, without installing additional software, such as Silverlight.

Note: Word Merge is deprecated in align with deprecation of Sliverlight. Instead, use the pxGenerateWordDocument API to generate .docx documents. For more information about supported functionalities, see Pega Platform Client Operating System and Browser Support.

To switch from the Silverlight software to the pxGenerateWordDocument API, move your Silverlight documents templates to the new server-side document generating format. The following table provides information about support for Silverlight tags in the pxGenerateWordDocument API:

Tag in SilverlightSupport in the pxGenerateWordDocument APIComments
{pega:reference propertyreference }Yes
  • Data references can vary as Silverlight reads data from BLOBs.
  • No support for localization in pxGenerateWordDocument
{pega:attachment attachfile=”propertyName.insertMethod.extension.pzInsKey”} No
  • Use the tag <pegaref config={"name":".AttachmentLink","type":"A"}> instead.
  • AttachmentLink is the property reference that provides the pzInsKey of Data-WorkAttach-File or Rule-File-Binary.
  • No support for attachments other than images inside tables, footers, and headers.
{pega:insert corr=corrname}Partial
  • No support for correspondence inside tables, headers and footers.
{pega:insert corrinline=corrname}No
  • Convert {pega:insert corrinline=corrname} to {pega:insert corr=corrname}.
  • Alternatively, to add correspondence inline within a document, use <pegaref config={"name":"CorrespondenceName","type":"C"}>.
  • No support for correspondence inside tables, headers and footers.
{pega:binary imagefile= AppName.imageFileName.FileType}No
  • Parse images by using <pegaref config={"name":".AttachmentLink","type":"A"}>.
  • AttachmentLink is the property reference the provides the pzInsKey of Data-WorkAttach-File or Rule-File-Binary.
{pega:binary binaryfile=TemplateClass.TemplateName}NoNo support for reading the template and parsing the tags inside the template, and then adding the template back to the target file.
{pega:binary imagefilelocalpath="LocalPath" }NoN/A
{pega:binary imagefileserverpath ="ServerPath" }NoN/A

The specifications of the pxGenerateWordDocument API are as follows:

  • The pxGenerateWordDocument API supports templates in .docx format only.
  • No support for macros inside templates.
  • The output format of the documents that you generate through the pxGenerateWordDocument API is always .docx.
  • No support for client-side editing of documents that you generate through the pxGenerateWordDocument API.
  • The pxGenerateWordDocument API creates documents in the following ways:
    • The pxGenerateWordDocument API adds .docx attachments inline.
    • The pxGenerateWordDocument API adds images inline and does not support the .svg images.
    • The pxGenerateWordDocument API adds attachments other than .docx format and images in the .svg format as OLE objects inside the generated .docx output document.
    • Inside tables, headers, and footers, the pxGenerateWordDocument API supports the addition of image attachments only.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us