HLRosenberger
asked on
Unable to create new object
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Eric - yes this is Aspose. And I am doing exactly what you suggest. Here's my problem - I'm creating a 100 (or whatever) page PDF. The single page that I'm reading in is from a Forms PDF document. I populate the fields with data, then flatten the page. I then add that page to the collection of pages in a new document. That page is now flattened (no fields). But I want a new instance of the page with fields to reuse for the next page of the new document. I can only get a new unflattened page by using a new instance of the PDF document class, which in turn hits the disk. This disk access makes creating a 100 page document take 10 seconds. I want an unflattened instance of the page in memory that I can reuse - populate the fields with data and then flatten. Know what I mean?
Not sure to fully follow you. But if you call the Add method twice, you should get what you want no?
Dim pdfPage1 as Aspose.Pdf.Page = YourAsposeDocumentInstance.Pages.Add()
Dim pdfPage2 as Aspose.Pdf.Page = YourAsposeDocumentInstance.Pages.Add()
ASKER
that will give me two pages - the same page twice, correct? In between each page I need to populate the fields within that page. Let me try this explanation -
I am going to use Adobe Acrobat to create a PDF form with multiple text fields on a single page. Now, I need to repeat this page multiple times and save the result as a multi-page PDF document, using Aspose. So, I'm using this single page as a template, so to speak. Now say my form is for data related to a house. And then I have 100 houses in my database. I need to create a 100 page PDF document where each page is the same format, but the house-related data changes. I need to flatten each page because if I don't, leaving those form fields on each page causes performance issues with my 100 page PDF.
I am going to use Adobe Acrobat to create a PDF form with multiple text fields on a single page. Now, I need to repeat this page multiple times and save the result as a multi-page PDF document, using Aspose. So, I'm using this single page as a template, so to speak. Now say my form is for data related to a house. And then I have 100 houses in my database. I need to create a 100 page PDF document where each page is the same format, but the house-related data changes. I need to flatten each page because if I don't, leaving those form fields on each page causes performance issues with my 100 page PDF.
>>that will give me two pages - the same page twice, correct?
That will give you 2 new pages.
That will give you 2 new pages.
ASKER
ok. thanks. I still have my original issue to address. I have a post on Aspose forum.
ASKER
darbid73 - What's the "other" way you speak of, as this is not my code.
ASKER
Thanks
If this is your code then change it. If it is not your code their might be another way of getting to this information.