PdfPig icon indicating copy to clipboard operation
PdfPig copied to clipboard

PdfDocumentBuilder.AddPage(PdfDocument, PageNo)

Open toertchn opened this issue 3 years ago • 0 comments

Currently I use v1.5 and copy pages from one document to a documentBuilder

After AddPage the newPageSize is on all bounds 0 so I need to use the original page for point calculations.

PdfDocumentBuilder builder = new PdfDocumentBuilder();
PdfPageBuilder newPage = builder.AddPage(document, page.Number);
// newPage.PageSize == 0
// need to calc Position based on old page
PdfPoint closeToTop = new PdfPoint(newPage.PageSize.Left + 30, page.Height - 30);

toertchn avatar Oct 23 '21 07:10 toertchn