We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

CreatePage returns NULL after PDFDocument.Append

Thread ID:

Created:

Updated:

Platform:

Replies:

55148 Jan 24,2007 09:06 AM Jan 28,2007 09:39 AM Windows Forms 3
loading
Tags: PDF
Dick Barney
Asked On January 24, 2007 09:06 AM

A shortened version of code (in C#) is:

IPDFPage newPage;
..............
pdfDoc = PDFDocument.Append(pdfDoc, rptStream);
pdfDoc.ReleaseStream();
.............
newPage = pdfDoc.CreatePage();

The pdfDoc.CreatePage returns a NULL that causes an error. The CreatePage works if I don't precede it with an APPEND. (The rptStream comes from Crystal Reports.)

Any ideas on what I am doing wrong?

Dhivya K [Syncfusion]
Replied On January 25, 2007 08:04 AM

Hi Dick,

Thank you for your interest in Essential PDF.

Thanks for the code snippet. I was able to reproduce the issue. Could you please use the following statement for adding a new page to the appended document?

C#
// Adds a new page to the appended document.
pdfdoc.Pages.Add(pdfdoc.CreatePage());

Here is a sample for your reference:
inserting_page.zip

Please take a look into it and let me know if you it meets your need.

Regards,
Dhivya.

Dick Barney
Replied On January 26, 2007 08:19 AM

THanks for the reply. I had switched to using memory streams without problems shortly after posting. I still have the old code and should find time to test it next week.

Again.......Thank You for the prompt reponse.

Dhivya K [Syncfusion]
Replied On January 28, 2007 09:39 AM

Hi Dick,

Thank you for the update. Please let me know if you have any queries.

Regards,
Dhivya.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;