Hi, i have a little bug with my web service WCF and Aspose PDF conversion.
If i do my conversion in application mode it’s working, but when i’m doing the same code in a WCF, System.Drawing crash on a PDF with one image.
ERROR:
à System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
à . (Int32 , Int32 , PixelFormat )
à …ctor( , )
à . ( , )
à …ctor( , , )
à Aspose.Pdf.ImagePlacementAbsorber. (Page , OperatorCollection , Resources )
à Aspose.Pdf.ImagePlacementAbsorber. (Page , OperatorCollection , Resources )
à Aspose.Pdf.ImagePlacementAbsorber.Visit(Page page)
à Aspose.Pdf.Page.Accept(ImagePlacementAbsorber visitor)
à . (String , String )
à . ()
à . ()
à . ()
à . (XmlTextWriter , PdfFormat , Document , Boolean , ConvertErrorAction )
à Aspose.Pdf.Document. (XmlTextWriter , PdfFormat , Boolean , ConvertErrorAction , ConvertTransparencyAction )
à Aspose.Pdf.Document.Convert(String outputLogFileName, PdfFormat format, ConvertErrorAction action, ConvertTransparencyAction transparencyAction)
à Aspose.Pdf.Document.Convert(String outputLogFileName, PdfFormat format, ConvertErrorAction action)
à PDFAServiceTest.Service1.ConvertFile(String fileName, PdfFormat conformance) dans C:\ICO\Apps\Debugger\PDFAServiceTest\PDFAService.svc.vb:ligne 23
à PDFAServiceTest.Service1.ConvertFolder(String folder, PdfFormat conformance) dans C:\ICO\Apps\Debugger\PDFAServiceTest\PDFAService.svc.vb:ligne 8
à SyncInvokeConvertFolder(Object , Object[] , Object[] )
à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
CODE Source in the WCF:
Private Sub ConvertFile(ByVal fileName As String, ByVal conformance As Aspose.Pdf.PdfFormat)
SetLicense()
Dim convertedFileName As String = "C:\test\Conversion\" & New System.IO.FileInfo(fileName).Name
Dim doc As New Aspose.Pdf.Document(fileName)
doc.Metadata.Clear()
doc.Convert("C:\test\Conversion\" & New System.IO.FileInfo(fileName).Name & "_log.xml", conformance, Aspose.Pdf.ConvertErrorAction.None)
doc.Save(convertedFileName, Aspose.Pdf.SaveFormat.Pdf)
End Sub