Q: In your PDFDC (PDF Device Context) example, how can I change the
paper size and orientation in the ‘pdftron.PDF.PDFDCEX’ part of the
example?
Normally, we use CreateDC with a DevMode specifying the size and
orientation. How can I accomplish the same thing with PDFDCEX?
A: There is no way to set the bounding box ahead of time however you
can modify the page boxes (page.SetCropBox()/SetMediaBox()/
SetRotation()) after the page is created. You could use
page.GetBoundingBox() to determine the extents of the content area -
in case you would like to adjust the page rectangle based on the
content.