PDF Templates | Troubleshooting

"URL string is longer than max length" error

Check the site URL is registered on the HCM package Configure page as the Sites URL.

For more information see Register the site URL

Images are not showing in the generated PDF

Images are not showing in PDF, when sending a PDF with an email template.

To resolve, check the Guest User profile settings for the Site guest user. Confirm PDF settings are enabled in:

  • Object permissions: Read and Create are selected for PDF Template and PDF Template Section.
  • Custom Field Level Security: Read and Edit access are selected for all field names for PDF Template and PDF Template Section.

"Image not available" error in place of the image in the PDF

An error message displays in place of a logo in the PDF: Image Not Available This image is not available because: 

  • You don't have the privileges to see it, OR
  • It has been removed from the system.

Screenshot: Image Not Available error in a PDF

Create a sharing rule for PDF templates, see Create a sharing rule for PDF templates for more information.

"Moved permanently (301)" error when using the Send PDF button

When using the Send PDF button on an Employment Record you get the following error message: "Moved Permanently (301) There is a configuration problem with PDF Template Generator. Please contact Sage People Support":

Screenshot: Error: Moved Permanently (301) There is a configuration problem with PDF Template Generator. Please contact Sage People Support

This error can be caused by checking the https settings on the PDF site but not entering the secure URL in the HCM package Configure page Sites URL field and as a Remote Site setting. For more information, see Register the site URL and Add a Remote Site.

"Unauthorized endpoint" error when using the Send PDF button

When using the Send PDF button on an Employment Record you get the following error message: "Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = {PDF Remote Site Setting URL}":

Screenshot: Error: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = {PDF Remote SIte Setting URL}

This can be caused by checking the https settings on the PDF site but not entering the secure URL as a Remote Site setting. For more information, see Add a Remote Site.

"No subject alternative DNS name found" error when using the Send PDF button

When using the Send PDF button on an Employment Record you get the following error message: "No subject alternative DNS name matching {PDF URL} found":

Screenshot: Error: No subject alternative DNS name matching  {PDF URL} found

This can be caused by checking the https settings on the PDF site but not entering the secure URL in the HCM package Configure page Sites URL field and as a Remote Site Setting. For more information, see Register the site URL and Add a Remote Site.

Also review the contents of the PDF template and any tables in it.

"ApexPages.addMessage can only be called from a Visualforce page." error with action events

PDFs are not sending from action events, with the following error message showing on the associated Apex Job" "ApexPages.addMessage can only be called from a Visualforce page":

Screenshot: Error message "ApexPages.addMessage can only be called from a Visualforce page."

Ensure the PDF Salesforce Site is secure. For more information, see Add a Remote Site.

"System.FinalException: ApexPages.addMessage" error message in batch status

Error message in batch status when PDFs are sent using a batch job: "An Apex error occurred: System.FinalException: ApexPages.addMessage can only be called from a Visualforce page."

As a result of Salesforce changes, a status similar to this means Salesforce is trying to display the real error message on the current page in the HR Portal, but is unable to.

In this case, the only way to view the real error message is to look in the enhanced debug logs.

"Unauthorized endpoint, please check Setup->Security->Remote site settings…" error message in batch status

Error message in batch status when PDFs are sent from a batch job, typically when PDFs are sent from action events: "First Error: Unauthorized endpoint, please check Setup->Security->Remote site settings…"

Check the site URL is registered on the HCM package Configure page as the Sites URL. For more information, see Register the site URL

This error can also display if Remote Site Setting and the HCM package Configure page Sites URL field do not use https or http consistently.