← All articles
Action requiredSummer '26Platform / Apex and PDF Output

Action Required: Regression-Test Apex Blob.toPdf() Output

PDFs created with Apex Blob.toPdf() can change appearance even though the method signature is unchanged.

Required action

Regression-test every business-critical PDF produced by Apex Blob.toPdf() and correct any output differences. The Summer ’26 release update changes the rendering service to the one used by Visualforce; the method still accepts a string and returns a Blob, but the generated document can render differently.[1][2]

Find affected code

Search Apex case-insensitively for Blob.toPdf(; if your search tool is case-sensitive, also search for Blob.toPDF(. Then identify the HTML/text templates and workflows that generate invoices, statements, certificates, labels or other customer-facing PDFs. Installed managed packages can also call the method in code you can’t search, so ask vendors whether they tested their generated documents with the Visualforce renderer. If nobody checks, a changed font, wrapped value or extra page may first be noticed by a customer.

Test the rendered files

  1. Collect reference PDFs for each template generated before your org’s Summer ’26 upgrade—for example, copies saved as Salesforce Files or sent to customers—or an approved expected layout.
  2. Regenerate PDFs for the same records with the current renderer.
  3. Compare page count, headers/footers, table widths, long values, page breaks and non-ASCII/multibyte characters. The new renderer supports additional fonts and multibyte characters. If a PDF has no explicit font styling, its default changes from sans-serif to serif, which can change line lengths and page breaks; declare font-family explicitly in the template CSS so output doesn’t depend on the renderer default.[2]
  4. Adjust the source markup/styles where differences matter, then regenerate and inspect the PDFs again.
  5. Keep a regression sample for later release testing.

Salesforce enforced this release update with Summer ’26. Orgs upgraded to Summer ’26 or later already use the Visualforce renderer for Blob.toPdf().[1][2] Treat any PDF difference as a live production issue: reproduce and fix it in a sandbox, then deploy the corrected templates.[2]

Sources

  1. Summer '26 Release Updateshttps://help.salesforce.com/s/articleView?id=release-notes.rn_ru.htm&language=en_US&release=262&type=5
  2. Use Visualforce PDF Rendering Service with Apex Blob.toPdf()https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_system_blob_topdf.htm&language=en_US&release=262&type=5