14
Views
10
Comments
[Ultimate PDF] Margin disappears when applying CSP
Question

Hello.

I want to ask if anyone has experienced margins in PDF files disappearing when Content Security Policy is applied.

Is there a specific setting for the margins?

Hoping for a response soon. Thank you.

2025-07-28 06-45-20
Rupesh Patil

Hi @Carlos Dela Cruz 

You can use the action 'CustomMarginSize. 

Take dependency. 

I hope this helps

Thanks

UserImage.jpg
Carlos Dela Cruz

Hi Rupesh.

I'll try this action. Thank you for the response.


2025-07-28 06-45-20
Rupesh Patil

Hi Carlos 

You are using which event OnReady or OnInitialize? 

Because I am facing same issue so I used OnInitialize so its working properly

I hope this helps

Thanks

UserImage.jpg
Carlos Dela Cruz

Hi Rupesh.

Since we are using a client action to download the PDF file as it is in a web block, we aren't using OnReady or OnInitialize

2025-07-28 06-45-20
Rupesh Patil

Your issue resolved? For action 'CustomMarginSize. 

Thanks

UserImage.jpg
Carlos Dela Cruz

Hi Rupesh,

I tried the CustomMargin on the PrintLayout and it didn't work. 

Am I missing something here?

2025-07-28 06-45-20
Rupesh Patil

Hi @Carlos Dela Cruz 

if possible can you share oml file? will check

Thanks

2025-07-28 06-45-20
Rupesh Patil

hi @Carlos Dela Cruz 

I have attached below oml file.

I hope this helps

Thanks

UltimatePdfTest.oml
UserImage.jpg
Carlos Dela Cruz

Hi Rupesh,

Apologies for the late reply, I'll check the oml file you sent. 

Thank you.

UserImage.jpg
Carlos Dela Cruz

Hi Rupesh,

Upon further inspection, the issue seems to be due to the Factory Configuration setting for Unsafe-Inline and Unsafe-Eval CSP directives on our server.

Thank you for the help.

Regards,

Carlos


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.