Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Best Practices for Rendering PDF Files

Rendering a Visualforce page as a PDF file is a great way to share information about your Salesforce organization. Here are some best practices for you to consider.

For better performance when rendering Visualforce pages, reference static image and style sheet resources through the $Resource global variable.

Referencing static resources on a remote server increases the time it takes to render a Visualforce page as a PDF file. Add remote servers to your permitted Remote Sites list: From Setup, enter Remote Sites Settings in the Quick Find box, then select Remote Sites Settings. You can’t reference remote resources when using Visualforce to render PDF files in an Apex trigger. Doing so results in an exception.

Warning