The "File not found" error is likely referring to a missing DLL. It likely has to do with either what DLLs you have referenced, or at least what DLLs you have copied into your application Bin. Without being able to test the solution directly (as a small sample application), it's difficult to say exactly what file may be missing. My first guess would be one of the file filter DLLs.
I would find out if this is a DLL issue by trying to run the project from the LEADTOOLS Bin directory. By outputting the EXE there, you'd have access to all of the DLLs. If this makes the application work, you can use Microsoft's Process Explorer utility to find out what DLL is missing from your local Bin directory by seeing what DLLs were loaded. A process of elimination would tell you what to add. If this doesn't fix the issue, then there could be something in the logic of the code that's missing.
If you have an application that you can't easily output to the LEADTOOLS Bin directory, copying ALL of the DLLs into the local Bin would serve the same purpose.
In looking at your code, I am seeing two things that are of interest to me. First, I see that you're initializing the DocumentPage.Image to null. I wasn't sure if this was acceptible or not, so I checked out the documentation for the
Image property. It indicates that this is optional. The remarks also walk through a scenario where it is initialized, and the
PdfDocumentOptions.ImageOverText is set to true. I don't see you setting this property either way with the given options, so I'm not sure if this may be causing issues as well.
If you continue to have issues with this, it would be helpful if you could provide a small sample project that isolates this issue so we can test this out here as well.
***********
NOTE: If you are attaching a project or file to the forums...
1.) Zip the file(s) up.
2.) Make sure it is less than 5 MB. If it is larger, please send an email to
support@leadtools.com and we'll send you FTP instructions.
3.) Remove ANY AND ALL unlock codes/license files and LEADTOOLS DLLs.
4.) Do not click the preview button, the attachment will not show up when you post it.
If you do not wish to post your file(s) on the forum since they are publicly viewable, please send an email to
support@leadtools.com and make sure that you include a link to this forum post.
***********
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.