Hi,
We are using UltimatePDF Forge for PDF generation with configured header and footer sections. After enabling Content Security Policy (CSP) in the environment, we started facing a layout issue in the generated PDFs.
Currently, both the header and footer are overlapping with the main content area instead of maintaining proper spacing and alignment.
Kindly review the attached screenshot for reference and help us identify the root cause and possible resolution.
Hoping for your assistance.
Thanks.
Hi @Vijay Dhasnamoorthy,
UltimatePDF uses a Chromium-based rendering engine to convert an HTML screen into PDF. The layout logic for header, main content, and footer spacing relies heavily on:
When Content Security Policy (CSP) is enabled at the environment level, one or more of these internal mechanisms can be blocked.
This causes:
From UltimatePDF’s own implementation and documentation:
Recommended resolution
Update CSP to allow inline styles: HTTPstyle-src 'self' 'unsafe-inline';
Hope this helps,
Cheers.
Saugat