16
Views
3
Comments
Solved
[Ultimate PDF] Please support custom margin size
Forge component by Leonardo Fernandes
15
Published on 08 Jan 2021
Application Type
Traditional Web

We had requirement with very specific margin size.

But for margin, we're stuck with static entities.

So we need to modify the component codebase.

Please support custom margin size.

Rank: #6889
Solution

Use the action 'CustomMarginSize' before using 'PrintToPdf_Advanced':

Units are in cm.

Wow didn't notice that action.

However, I think CustomMarginSize's output parameter should be used in PrintLayout, right?


Rank: #6889

Depends on your use case.

We use PrintToPdf_Advanced in combination with filling the parameter as

CustomMarginSize.MarginSizeId

so we can use the binary to offer the pdf as download or as preview in the browser's pdf viewer.

This is a workaround, because ScreenToPdf doesn't support custom margins.