Hi,
I'm trying to import a landscape page, but after the import it appears that the orientation is no longer preserved.
The code is basically as follows:
Code:
PdfDocument target = new PdfDocument();
PdfDocument source = PdfReader.Open('source.pdf', PdfDocumentOpenMode.Import);
foreach (PdfPage srcPage in source.Pages) {
PdfPage added = target.AddPage(srcPage); // the orientation appears not preserved.
}
target.Save('target.pdf');
So, if the source page has the following width, height & orientation:
Code:
width = 3024, height = 2016, orientation = Landscape
Once added it becomes
Code:
width = 2016, height = 3024, orientation = Portrait
How can I fix this issue? Thanks.