I'm having this problem too. This is the code I'm using:
string file = @"C:\test\untitled.pdf";
if (File.Exists(file))
{
MergeDocument document = new MergeDocument(file);
}
I just downloaded the eval in the hopes of using this software to fill PDF forms; but I'm not getting very far.
The pdf was created with Acrobat 9 Pro. This is the exception details:
ceTe.DynamicPDF.Merger.PdfParsingException was unhandled
Message="There was end error while parsing the input PDF file. The PDF is likely corrupt or invalid."
Source="ceTe.DynamicPDF.35"
StackTrace:
at ceTe.DynamicPDF.Merger.PdfDocument.g()
at ceTe.DynamicPDF.Merger.PdfDocument..ctor(cc A_0, String A_1)
at ceTe.DynamicPDF.Merger.PdfDocument..ctor(String filePath)
at ceTe.DynamicPDF.Merger.MergeDocument..ctor(String filePath)
at PRI.DynamicPDF.FrontEnd.MainForm.openButton_Click(Object sender, EventArgs e) in C:\Documents and Settings\peter.ritchie\SoDe\PRI.DynamicPDF\PRI.DynamicPDF.FrontEnd\MainForm.cs:line 26
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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.
FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at PRI.DynamicPDF.FrontEnd.Program.Main() in C:\Documents and Settings\peter.ritchie\SoDe\PRI.DynamicPDF\PRI.DynamicPDF.FrontEnd\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.NullReferenceException
Message="Object reference not set to an instance of an object."
Source="ceTe.DynamicPDF.35"
StackTrace:
at zz93.ch.a(i5 A_0)
InnerException: