Hi all,
I'm new to PDFSharp & MigraDoc. After playing with it for the past couple of weeks I find it to be one of the strongest .NET PDF libraries (open source) out there! It totally rocks!!!
Now for business...
We are using the WPF versions of the PDFSharp & MigraDoc assemblies (
not the GDI+ ones).
We have a requirement to export PDF pages as images (full size, thumbnails etc.), JPEG format is preferred. I know that PDFSharp & MigraDoc do not have this ability (opening a PDF file and saving the pages as images), but I've seen the GhostScript example, compiled it successfully and ran it. I, of course, added the file '
gsdll32.dll' to the working directory of the example (bin\Debug or bin\Release).
The Demo failed (and still fails) with the following exception (the error is coming from within the '
gsdll32.dll' file):
Code:
{System.InvalidOperationException: Ghostscript failed with error code -100.
at PdfSharp.Ghostscript.GS.PdfToPng(String filename, Int32 page, Int32 resolution) in C:\Users\omri\Documents\Visual Studio 2010\PDFsharp\code\PdfSharp.Ghostscript\Ghostscript\GS.cs:line 212
at UseGhostscript.Program.Main()
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()}
We did not find and solution to it during the past days.
We initially thought it's related to the WPF build, but the GDI+ build results in the same exception.
We are using Windows 7 & Windows server 2K8.
If anyone encountered the same issue and resolved it - please share.
Thanks,
Omri