Frequently Asked Question:
NewPages function doesn’t work as described inthe Reference Guide
Question
I don't know if I miss anything but this function always create extra page. i.e. Result = QP.NewPages(iNumPages)
Result is always = iNumPages+1.
It should return 0 or 1 as describe in the manual. I am using VB6 with QuickPdf ActiveX 7.23
Answer
Yes. There is a small problem with the documentation.
The NewPages function seems to return the total number of pages in the current document.
int ret = QP.NewPages(1); // returns 2. We start with 1 page by default.
int numPages = QP.PageCount(); // returns 2.
ret = QP.NewPages(2); // returns 4 because we are adding 2 pages.
numPages = QP.PageCount(); // returns 4.
Thank you. I will pass this onto the person in charge of documentation.