Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Unable  to create new object

Posted on 2016-11-30
9
Medium Priority
?
77 Views
Last Modified: 2016-12-01
Can anyone tell me what the error in the image means?   And how would I go about creating a new instance of this object?

error message
0
Comment
Question by:HLRosenberger
  • 5
  • 3
9 Comments
 
LVL 20

Expert Comment

by:darbid73
ID: 41907401
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.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41907405
If not mistaken, you need to use the Add method on the Pages collection:
Dim pdfPage as Aspose.Pdf.Page = YourAsposeDocumentInstance.Pages.Add()

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41907430
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?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41907443
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

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41907458
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.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 41907471
>>that will give me two pages - the same page twice, correct?  

That will give you 2 new pages.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41907567
ok.  thanks.  I still have my original issue to address.   I have a post on Aspose forum.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 41907618
darbid73 - What's the "other" way you speak of, as this is not my code.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 41909049
Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question