We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Html to PDF- Very Slow

I’m converting some HTML to PDF & I found its taking hell of time, sometime 5 mins or 10 mins.
Here is code

private static void GeneratePDF()
Aspose.Pdf.License license = new Aspose.Pdf.License();
license.Embedded = true;
// ExStart:HTMLToPDF
// The path to the documents directory.
string dataDir = @“E:\RND\HeaderAndFooter\42 (1).html”;

        // com.aspose.pdf.HeaderFooter header = new com.aspose.pdf.HeaderFooter();

        HtmlLoadOptions options = new HtmlLoadOptions();

        options.CustomLoaderOfExternalResources = new LoadOptions.ResourceLoadingStrategy(SamePictureLoader);

        Document pdfDocument = new Document(dataDir, options);
         Aspose.Pdf.Forms.Form.FlattenSettings fl = new Aspose.Pdf.Forms.Form.FlattenSettings();


Thanks for contacting support.

Can you please share the input HTML, so that we can test the scenario in our environment. We are sorry for this inconvenience.

42.zip (57.4 KB)
Please find attached zip file.



Thanks for sharing the sample file.

I have tested the scenario and have managed to replicate the same problem. For the sake of correction, I have logged it as PDFNET-43431 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Just to update we bought the licence & I wanted to know if we’ve any update on this issue.


The linked ticket ID PDFNET-43431 is pending for the analysis and not resolved yet. Our product team will investigate as per their development schedules. We will notify you once it is fixed.