Significant increase in PDF to HTML export in 24.11

Hi,

Out initial testing of 24.11 shows a significant increase in times when saving as HTML for some documents. In one case it was over twice as long. I cannot share that particular document but you can see something similar (50% longer) with the example file here:

PDFURIActions.Yes.pdf (259.7 KB)

Code is similar to below:


					Aspose.Pdf.HtmlSaveOptions aspPdfHtmlSaveOptions = new Aspose.Pdf.HtmlSaveOptions(Aspose.Pdf.HtmlDocumentType.Html5);

					aspPdfHtmlSaveOptions.RasterImagesSavingMode = Aspose.Pdf.HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
					aspPdfHtmlSaveOptions.PartsEmbeddingMode = Aspose.Pdf.HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;

					Aspose.Pdf.SaveOptions.BorderPartStyle aspPdfBorderPartStyle = new Aspose.Pdf.SaveOptions.BorderPartStyle();
					aspPdfBorderPartStyle.LineType = Aspose.Pdf.SaveOptions.HtmlBorderLineType.Solid;
					aspPdfBorderPartStyle.Color = System.Drawing.Color.LightGray;
					aspPdfHtmlSaveOptions.PageBorderIfAny = new Aspose.Pdf.HtmlSaveOptions.BorderInfo(aspPdfBorderPartStyle);

                    aspPdfDocument.Save(FilePathDestination, aspPdfHtmlSaveOptions);

The only change was the update from 24.10 to 24.11

Is there a reason for this increase in rendering time? Can we overcome this via a setting?

@GaryO
Running the below code in a .Net 6 project on Windows

var doc = new Document(dataDir + "PDFURIActions.Yes.pdf");
var aspPdfHtmlSaveOptions = new Aspose.Pdf.HtmlSaveOptions(Aspose.Pdf.HtmlDocumentType.Html5);

aspPdfHtmlSaveOptions.RasterImagesSavingMode = Aspose.Pdf.HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
aspPdfHtmlSaveOptions.PartsEmbeddingMode = Aspose.Pdf.HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;

var aspPdfBorderPartStyle = new Aspose.Pdf.SaveOptions.BorderPartStyle();
aspPdfBorderPartStyle.LineType = Aspose.Pdf.SaveOptions.HtmlBorderLineType.Solid;
aspPdfBorderPartStyle.Color = System.Drawing.Color.LightGray;
aspPdfHtmlSaveOptions.PageBorderIfAny = new Aspose.Pdf.HtmlSaveOptions.BorderInfo(aspPdfBorderPartStyle);

doc.Save(dataDir + "PDFURIActions_out.html", aspPdfHtmlSaveOptions);

I got a 10-15% difference in execution time for 24.11 and 24.10 packages.

Is the difference the same or bigger in your environment?
If it is bigger, please specify what you use.

Hi Sergei,

It’s really document dependant on the amount of extra time taken. The process is part of some code running in MS Outlook on the UI thread which maybe placing extra constraints on memory. It happens in Windows 10 and 11.

We are using the separate 4.0 DLL builds. When run, the whole process for some documents takes anything from 50% to 200% longer on some files. The files in question seem to be graphics intensive. The sample document sent for example got from 10s to 15s with the only difference being the Aspose PDF library going from 24.10 to 24.11. And the only thing the library is doing is the same code provided, ie exporting the PDF to HTML

Also of note, while this is happening, Outlook starts to behave erratically with with focus being lost and regained etc which did not occur in 24.10. Could there be some garbage collection being triggered or other handles being cleared etc that weren’t happening in 24.10? Is there a way to make it run as 24.10?

As i said there’s no code change, simply changing from 24.10 to 24.11 makes a large impact

@GaryO

Do I understand correctly that you download them from Download .NET Component DLL to Process PDF | Aspose.PDF API ?
(and don’t use nuget package.)

@GaryO
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-58694

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Yes, we used the separate direct download as we need support for <4.8.1

@GaryO
I looked, the task has already been assigned to the developer.

Hi,

I have tested 24.12 and it seems to be back to similar performance to 24.10.

Was there an issue with 24.11?

@GaryO
In release 24.12, tasks were closed, including those related to performance (Aspose.PDF for .NET 24.12).
Perhaps these changes affected your case. I will write to the developer who was assigned the task.
Thank you for writing to us.