Feb 16, 2015 at 6:44 AM
Edited Feb 16, 2015 at 8:44 AM
I been looking to try this library with vb.net
I have this code:
Dim s As String = "C:\Users\AlbertKallal\Desktop\Deskhold\2013_salaryreport.pdf"
Dim gVER As GhostscriptVersionInfo
gVER = GhostscriptVersionInfo.GetLastInstalledVersion(GhostscriptLicense.GPL, GhostscriptLicense.GPL)
Dim gPDF As New GhostscriptRasterizer
I keep getting this exception:
An error occurred when call to 'gsapi_init_with_args' is made: -15"
I also tried this for the open method:
gPDF.Open(s, gVER, False)
I installed this via NuGet into vs2013 (Ghostscript.NET.1.2.0).
I tried setting the project framework to 4.5, 4, and also set target CPU to x86. (none of these changes made any difference)
Any tips or suggestions to get the above code to run?
My first goal would be to simply obtain the number of pages in the pdf file. (gPDF.PageCount), but I cannot get past the “open” command. Do I need to set any of the custom switches before attempting the open method?
edit: adding this:
It now works. The fix was to install ghostscript again, and THEN force the project to x64.__
Hope the above helps anyone receiving the above message.
I consider this "resolved".
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada