dkaip wrote:Importing a page in pdf document and inserting a page how i can know the limits of import?
You can't. That is, at least wxPdfDocument doesn't offer any methods for this.
dkaip wrote:I am thinking that left and right are GetLeftMargin(); and GetTopMargin();
Is that right?
No. GetLeftMargin, GetTopMargin, GetRightMargin return the margins set for the main document, not for the imported page.
dkaip wrote:But what is bottom and right space? How i can find it?
wxPdfDocument does not offer any methods to analyze the content of imported pages. That is, it is not possible to detect the margins used on the imported page.
Looking at your code sample it seems to be the right approach to use page width and height for the template. However, variable w
will have the same value as pageWidth
, and h
the same value as pageHeight
. This way, the imported page will be scaled to fit on the newly added page.