Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
Last activity: 7 May 2024 8:13 EDT
How to add footer in correspondence rule in RTE
Hi Team, Anyone knows how to add footer in correspondence template rule directly in rich text editor, so that it will come as a fixed area in the generated PDF? I know it can be done using activity however in such case footer will be same for all pages but our requirement is maintain footer not all pages, only in odd pages when multiple page output hence exploring other options.
***Edited by Moderator Rupashree S. to add Capability tags***
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 7 May 2024 8:13 EDT
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
@Priyanka Boga Exceptional help Priyanka. This is really working now. Appreciate your time and help.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
Pegasystems Inc.
IN
@Debanjan Seth - Use pd4ml footer tag directly in source mode of the rich text editor.
<pd4ml:footer pageNumberTemplate="<%=template%>" titleAlignment="left" pageNumberAlignment="right" color="#008000" initialPageNumber="1" pagesToSkip="1" fontSize="14" areaHeight="18"/>
Here pagesToSkip parameter will help to get the odd page number footer. For more details please visit below link.
https://pd4ml.com/document_category/using-pd4ml-custom-tags-in-jsp/
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
@Priyanka Boga Thanks Priyanka for the prompt response and help. Will please provide some code snippet to understand better. How to use the section as footer?
Question -
1. pageNumberTemplate="<%=template%>" , shall i put the footer section replacing the template?
2. pagesToSkip means can we put page numbers like 2,4,6 to skip the footer?
3. Do i need to pass any parameters during HTMLToPDF activity?
<pd4ml:footer pageNumberTemplate="<%=template%>" titleAlignment="left" pageNumberAlignment="right" color="#008000" initialPageNumber="1" pagesToSkip="1" fontSize="14" areaHeight="18"/>
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
Pegasystems Inc.
IN
@Debanjan Seth Below is the example to show page numbers content in the footer by skipping one page.
<pd4ml:footer pageNumberTemplate="page $[page]" pageNumberAlignment="right" initialPageNumber="1" pagesToSkip="1" fontSize="14" areaHeight="18" > Add your content to display in footer <pd4ml:footer/>
For above syntax below will be output
Add your content to display in footer page 1
Thank you.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
@Priyanka Boga thanks for your proactive response.
The issue i am facing is this tag is printing my footer content but it is not coming as footer or in bottom when i add this in correspondence as source.
Footer content is coming in footer only when i am calling this from activity passing this parameter. param.pyPDFFooterHTMLTemplate.
Now another problem is even pagesToSkip is not working.
I am not sure if any prerequisite configuration is required or any local changes or hotfix is needed. Mine environment is pega 8.8.3.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
Pegasystems Inc.
IN
When passing the pd4ml:footer tags in param.pyPDFFooterHTMLTemplate it wont be served properly because Pega already handled the content to be wrapped within pd4ml:footer tags when passing the value to this parameter.
When providing in RTE , try wrapping the pd4ml:footer tag within footer tags to verify whether its coming properly or not. If something in pd4ml tags not working then the issue is with PD4ML tool which is a third party which Pega uses for PDF generation.
Thank you.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
@Priyanka Boga Thanks Priyanka. Curious to know if this footer tag works for you? Which version did you try please? i will just check with the support engineer if our version has any issue.
Updated: 7 May 2024 8:13 EDT
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-06/517bdd3e-6211-45a3-96d8-d2754a03b0e4.jpg?h=da2f1792&itok=t8q2xEzg)
Pegasystems Inc.
IN
@Debanjan Seth - I tested with below code and setting param.pyHTMLDisableProcessing to true in pyPDFSettings data transform. I am able to get the footer in odd pages.
<pd4ml:page.footer scope="odd"> <div>Footer</div> </pd4ml:page.footer>
Thank you.
Accepted Solution
Updated: 7 May 2024 8:13 EDT
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Accenture Services Pvt Ltd
US
@Priyanka Boga Exceptional help Priyanka. This is really working now. Appreciate your time and help.