function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Benjamin BolopueBenjamin Bolopue 

Visualforce, PDF Generation and Image URL Re-Direct Issues

We're attempting to generate documents (PDFs) via Visualforce. Everything is generating exactly as expected except for images. Our images are being pulled from an external server and there's a redirect involved. Salesforce doesn't seem to like this re-direct.

Once PDF generation is initiated, linked-to images are pulled in via a URL stored in a text field. For security reasons, the URL stored in the Record's text field is re-directed to a secure server where the image files are actually stored. This re-direct is keeping images from being shown inthe PDFs we generate. A "Broken Link" icon shows where images should be.

This issue doesn't exist until PDFs are generated. When viewing the documents as VF pages, the images are rendered using the re-directed URLs without issue.

Can anyone offer insight as to why the re-direct is problematic or how to get around this issue?

Mathew Andresen 5Mathew Andresen 5
You can't just put the images as static resources?
Benjamin BolopueBenjamin Bolopue
The images/URLs are different on every record. I should explain further...

We have 3rd party auditing software integrated with our org. Whenever an audit is completed, the software pushes the audit results into SFDC.
As audit images range in size from 3-6 MB, and every audit could have a couple dozen images, we opted to keep all media on the software server's side of things and simply send links to SFDC.

Due to security concerns & storage cost, we decided to store audit media on a separate secure server. As part of the process of securing the audit media, a URL redirect was put in place. It's this re-direct that brings on the show stopper, broken links.

Hoping to find evidence of a work around, I'm looking for any SFDC documentation that might reference re-direct issues and how to get around them.

Matt Higgs 5Matt Higgs 5
Any luck getting the redirected image to show up in the PDF?