02-03-2006, 11:23
|
billrob458
Joined on 02-02-2006
Posts 1
|
"Invalid File Format" in web application
|
 
 
|
|
|
I am trying to open a PDF from inside a web application. I am using the same code block, same references as my console application to generate an image, but it isn't working.
Any thoughts? Or what could I do next to debug this problem?
Thanks,
bill
RasterSupport.Unlock(RasterSupportType.Pdf, "<same key code from console application>"); Leadtools.Codecs.RasterCodecs codec = new RasterCodecs();
codec.Options.Pdf.Load.XResolution = 300; codec.Options.Pdf.Load.YResolution = 300;
string s = @"c:\inetpub\wwwroot\fimanagement\bob.pdf";
IRasterImage image = codec.Load( s );
codec.Save( image, response.BaseStream, RasterImageFormat.Jpeg, 24 );
return;
[ApplicationException: Invalid file format] Leadtools.Kernel.ErrorMethods.L_CheckError(Int32 ret) Leadtools.Codecs.RasterCodecs.GetInformation(String fileName, Stream stream, Boolean totalPages) Leadtools.Codecs.RasterCodecs.Load(LoadParams loadParams) Leadtools.Codecs.RasterCodecs.Load(String fileName, Int32 bitsPerPixel, CodecsLoadByteOrder order, Int32 firstPage, Int32 lastPage) Leadtools.Codecs.RasterCodecs.Load(String fileName) JHA.API.DocGenerator.DocGeneratorAPI.CreateSampleDocumentAsJpg(Guid fiID, String docType, BinaryWriter response, FILineAttributeGroup[] formatGroups) in c:\code\jha\api\docgenerator\docgeneratorapi.cs:909 JHA.Web.BankManagement.classes.DocFormattingPreviewHandler.ServePreviewPdf(HttpResponse response) in c:\inetpub\wwwroot\fimanagement\classes\docformattingpreviewhandler.cs:50 JHA.Web.BankManagement.classes.DocFormattingPreviewHandler.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\fimanagement\classes\docformattingpreviewhandler.cs:30 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
|
|
|
|
|
Report
|
|
|
|