Page 1 of 1

wxPDFDoc page number

Posted: Mon Jan 08, 2018 11:33 am
by dkaip
Hello. I am trying to add some pdf files (pdf and text) and all works ok.
If i must know in where page begins the texts, how i van know it?
There is a easy method to know before save pdf document?
Method for example wxPdfDocument::MultiCell returns the nymber of pages when puts text in pdf?
wxPdfDocument::PageNo() method gives current pages of pdf if haven’t save it before?
Thank's
Jim.
Sorry, PageNo() works just fine. My wrong.

Some else. I have pdf file with page 600X825 and i whant to insert in my A4 page. Some advice for scale page?
Jim.

Re: wxPDFDoc page number

Posted: Tue Jan 09, 2018 5:28 pm
by utelle
dkaip wrote:I have pdf file with page 600X825 and i whant to insert in my A4 page. Some advice for scale page?

After you have imported the page from your pdf file, you can add it with method UseTemplate. Method UseTemplate allows to specify a new width and/or height. The new width and/or height will be used to scale the template (imported page), so that it fits to the A4 page. You should only specify either width or height to avoid that the inserted page image will become distorted.

Regards,

Ulrich