Welcome Guest Search | Active Topics | Sign In | Register

PDF: doc.Save(stream); Object reference not set to an instance... Options
DMZ1984
Posted: Monday, March 19, 2012 12:54:35 PM
Rank: Member
Groups: Member

Joined: 10/21/2011
Posts: 13
Good afternoon.

I'm trying out the PDF lib before buying. We already have an enterprise license of your aspx controls.

I feel like my code should be working as this is common in your samples. Yet with the code below I keep getting: Object reference not set to an instance of an object. on doc.Save.

Code: C#
MemoryStream stream1 = new MemoryStream();
                doc.Save(stream1);
                byte[] data = stream1.ToArray();



I have verified that indeed doc is populated and has pages etc. Just locally I can't use the memory stream.

Thank you
eo_support
Posted: Monday, March 19, 2012 1:26:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine. The problem might be somewhere else or it might even be a bug. Make sure you update to the latest build first, if the problem continues, try to isolate the problem into a separate test project. Once you have that you can either post the test code here or send the test project to us, we will then try to run it here to see if we can see the same problem. As soon as we can reproduce the problem, we should be able to tell you what's wrong.

Thanks!
DMZ1984
Posted: Monday, March 19, 2012 2:09:04 PM
Rank: Member
Groups: Member

Joined: 10/21/2011
Posts: 13
eo_support wrote:
Hi,

Your code looks fine. The problem might be somewhere else or it might even be a bug. Make sure you update to the latest build first, if the problem continues, try to isolate the problem into a separate test project. Once you have that you can either post the test code here or send the test project to us, we will then try to run it here to see if we can see the same problem. As soon as we can reproduce the problem, we should be able to tell you what's wrong.

Thanks!



I'd love to send the file and not post, how should I go about doing this?

Thanks.
eo_support
Posted: Monday, March 19, 2012 2:25:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please see your private message as to where to send the test files.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.