Visual Studio 2008 Document.Save error

The PDF Creator .NET Library enables you to create secure PDF documents on the fly and to view, print and process existing PDF documents. If you have any questions about PDF Creator .Net, please post them here.
Post Reply
Gabhan
Posts: 3
Joined: Fri Jun 05 2009

Visual Studio 2008 Document.Save error

Post by Gabhan » Thu Jun 25 2009

Below is the error I get trying to call:

System.IO.FileStream stream = new System.IO.FileStream("test.pdf", FileMode.Create, FileAccess.Write, FileShare.Read);
//this line causes the error below:
pdfCreator1.Document.Save(stream, IacFileSaveOption.acFileSaveAll);

Error:

Amyuni.PDFCreator.IacException: Object reference not set to an instance of an object.
at Amyuni.PDFCreator.IacDocument.Save(Stream stream, IacFileSaveOption option)
at PDFError.Form1.button2_Click(Object sender, EventArgs e) in D:\OriginsDotNet\Sandbox\PDFError\PDFError\Form1.cs:line 39
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

If I run the app in the debugger it runs fine, but if I run it from explorer the above error appears.

I had been using the demo version of the component and recently purchased the full version hoping this would correct the issue, but that seems to make no difference.

Jose
Amyuni Team
Posts: 549
Joined: Tue Oct 01 2002
Contact:

Re: Visual Studio 2008 Document.Save error

Post by Jose » Fri Jul 03 2009

Hello,

This issue is currently being debugged by our devteam. We expected that we will release a “patch” for this issue in the next week or so.

Thanks
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite

Post Reply