Loading
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

Public Sector Solutions: Fix Font Size Mismatch in DocGen

게시 일자: Aug 14, 2026
상세 설명

Description

This article explains why font sizes in document templates appear different between the rich text editor and the final generated Word or PDF documents in Salesforce Public Sector Solutions (PSS) Document Generation (DocGen).

Administrators and template authors building document templates may notice that text styled in the rich text editor renders at a visually different size in the exported document. This affects both Client-Side and Server-Side DocGen workflows.

The root cause is a unit mismatch: the rich text editor measures font size in pixels (px), while generated Word and PDF documents use points (pt). These are not equivalent units, so a font size that looks correct in the editor will appear larger or smaller in the final output.

솔루션

Resolution

Salesforce Public Sector Solutions DocGen converts font sizes from pixels (px) in the rich text editor to points (pt) in the generated Word or PDF document. Because 1 pt equals approximately 1.333 px, a font set to 16px in the editor will render as 12pt in the output document.

To resolve the font size discrepancy, follow these steps:

  1. **Use the Document Font option during document generation.** In the `fndSingleDocxServersideLwc` OmniScript, locate the **Document Font** field and specify your desired font and size directly. This setting applies a consistent font to the generated document and overrides rich text editor styling, eliminating the unit conversion mismatch.
  1. **Convert your intended font sizes from pixels to points before setting them in the rich text editor.** Use the following common reference values to match your editor input to the expected output size:

- 10px → 7.5pt

- 12px → 9pt

- 16px → 12pt

- 21px → 16pt

- 24px → 18pt

- 32px → 24pt

  1. **Apply the converted pt-equivalent px value in the rich text editor.** For example, if you want 12pt text in the final document, enter 16px in the rich text editor. Regenerate the document and confirm the output font size matches the intended size.
  1. **Verify the output.** Open the generated Word or PDF document and confirm that all styled text sections display at the expected point size.

Using the Document Font setting on the OmniScript (Step 1) is the recommended approach for consistent results across all text in the document.

Knowledge 기사 번호

003876385

 
로드 중
Salesforce Help | Article