Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unable  to create new object

Posted on 2016-11-30
9
Medium Priority
?
69 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

 
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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

688 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