PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

Trimming margins of document
http://forum.pdfsharp.com/viewtopic.php?f=2&t=3967
Page 1 of 1

Author:  damian [ Tue May 21, 2019 1:42 pm ]
Post subject:  Trimming margins of document

Hi,

I've been trying to trim document in order to reduce its size without scaling content.
Ex. I got page 20 x 30cm and I'd like to trim it to 18 x 30cm, which means cut out those 2cm with all content.

I managed to do so on the right side and top of the document using:
Code:
page.TrimMargins.Right = someValue; //someValue is XUnit obj.
page.TrimMargins.Top = someValue;


Unfortunately, when trying to trim left side or bottom it still trims right and top.
I've found couple sample codes and they all look similar to mine (there's really not much that could go wrong), so I suspect it might be bug.

Can anyone help please?

Author:  damian [ Thu May 23, 2019 7:54 am ]
Post subject:  Problem with trimming margins

Hi,

I've been trying to trim document in order to reduce its size without scaling content.
Ex. I got page 20 x 30cm and I'd like to trim it to 18 x 30cm, which means cut out those 2cm with all content.

I managed to do so on the right side and top of the document using:
Code:
page.TrimMargins.Right = someValue; //someValue is XUnit obj.
page.TrimMargins.Top = someValue;


Unfortunately, when trying to trim left side or bottom it still trims right and top.
I've found couple sample codes and they all look similar to mine (there's really not much that could go wrong), so I suspect it might be bug.

Can anyone help please?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/