Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

Unable to create new object

Can anyone tell me what the error in the image means?   And how would I go about creating a new instance of this object?

User generated image
Avatar of darbid73
darbid73
Flag of Germany image

The class starts with the word "Friend" but needs to start with the word "Public".

If this is your code then change it. If it is not your code their might be another way of getting to this information.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HLRosenberger

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()

Open in new window

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.
>>that will give me two pages - the same page twice, correct?  

That will give you 2 new pages.
ok.  thanks.  I still have my original issue to address.   I have a post on Aspose forum.
darbid73 - What's the "other" way you speak of, as this is not my code.
Thanks