Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Warning Handler callback not firing??

$
0
0
Hello

I am attempting to convert epub documents to PDF using the code outlined below.  During the conversion of this particular EPUB document, there are a heap of first chance exceptions in the output window (A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll) being generated by Aspose.Pdf.  I assume there there should be some warnings or errors generated by Aspose.Pdf, but there are no calls to the callback.

This is a problem because this conversion or a 1.3MB EPUB took 2 hours to load and I want visibility of the conversion and any issues.

My questions are:
  • Do I have the WarningHandler wired up correctly?
  • What sort of internal Aspose.Pdf warnings does the callback get called for?
I appreciate your time in reply.


static void Convert(Stream in, Stream out)
{
var epubload = new EpubLoadOptions {WarningHandler = new HandleDocumentWarnings()};
        // Create Document object
         var epub = new Aspose.Pdf.Document(sourceFile, epubload);

.... // Code omitted for clarity
}

public class HandleDocumentWarnings : IWarningCallback
    {
        public void Warning(WarningInfo info)
        {

        }

        ReturnAction IWarningCallback.Warning(WarningInfo warning)
        {
            return ReturnAction.Continue; 
        }
    }

Viewing all articles
Browse latest Browse all 3131

Trending Articles