Skip to main content
You can define margin for the document (space between the limits of the document and the beginning of the content). You can either pass an object as defined below, or use a CSS like string, like the following:
ValueDescription
10pxWill set a margin of 10px for all four borders.
10px 0Will set a margin of 10px for top and bottom, and a margin of 0 for left and right.
10px 0 20pxWill set a margin of 10px for top, 0 for left and right and 20px for the bottom.
10px 20px 30px 40pxWill set a margin of 10px for top, 20px for right, 30px for bottom and 40px for left.
Otherwise, you can use an object to directly target a specific margin, using the following:
ParameterTypeDefaultDescription
topInteger or StringnullSpace between the top and the content.
rightInteger or StringnullSpace between the right and the content.
bottomInteger or StringnullSpace between the bottom and the content.
leftInteger or StringnullSpace between the left and the content.