I have installed the latest version of Ghostscript, and the latest version of Gflax.
My ASP.net code is as follows:
Code: Select all
'Initialise
Dim graphicsCom As Object
'Create the graphics object
graphicsCom = Server.CreateObject("GflAx.GflAx")
with graphicsCom
.EpsDpi = 72
.page = 1
.LoadBitmap(server.MapPath("test.pdf"))
.Saveformat = 3
.saveBitmap(server.MapPath("newPDF"))
end with
'Clean up
graphicsCom = Nothing
Code: Select all
Server Error in '/' Application.
Unknown format
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Unknown format
Source Error:
Line 10: .EpsDpi = 72
Line 11: .page = 1
Line 12: .LoadBitmap(server.MapPath("test.pdf"))
Line 13: .Saveformat = 3
Line 14: .saveBitmap(server.MapPath("newPDF"))
Source File: c:\inetpub\wwwroot\pdfToSWF\default.aspx Line: 12
Stack Trace: [COMException (0x80004005): Unknown format]
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +791
Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) +23
ASP.default_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in c:\inetpub\wwwroot\pdfToSWF\default.aspx:12
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Thanks for any help.
Tom[/quote]