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

Free Support Forum - aspose.com

Huge Size After Convert

Dear sirs,

When we use your product to convert a PDF file to HTML, if there was some drawing in PDF file, it convert those drawings to SVG and because of this, a 500K file will about 100Mb after conversion, is there any way to convert those drawing to JPG instead of SVG?

Hi Ross,

Thanks for your inquiry. I’ve tested the scenario with sample PDF documents using Aspose.Pdf for .NET 8.5, but I’m afraid resultant HTML file is approx. 1.5 times larger in size. Can you please share your sample document here so will investigate the issue and will provide you more information accordingly.

Moreover, I’m afraid currently Aspose.Pdf doesn’t support to specify image type during PDF to HTML conversion.

We are sorry for the inconvenience caused.

Best Regards,

the resultant html is not big, the SVG files that this component generates for tables & drawing are huge! I convert these SVG files to PNG and JPG and they became 6k! while the SVG files current size are about 1mb!

I attached sample PDF file to this message, please tell your team to convert SVG files automatically to PNG or JPG, or please add a feature in your Imaging component to convert them manually , your Imaging library currently does not support SVG format!

Kind regards

Hi Ross,

Thanks for providing source document. I’m afraid currently we can’t specify image format during PDF to HTML conversion. We’ve have logged an enhancement request as PDFNEWNET-36009 for the purpose in our issue tracking system. We will keep you updated about the issue progress via this forum thread.

We are sorry for the inconvenience caused.

Best Regards,

Hi Ross,

Thanks for your patience. We have introduced a new feature HtmlSaveOptions.RasterImagesSavingModes. It allows to select target graphic format. Please check a sample code snippet for the purpose. Please also check other enhancements in PDF to HTML conversion. Hopefully it will help you to accomplish the task.

Aspose.Pdf.Document doc = new

HtmlSaveOptions options = new HtmlSaveOptions();

options.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;

//next line is just to make view best for max amount of browsers

// You can comment it out if You want

options.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;

doc.Save("36009.html", options);

Please feel free to contact us for any further assistance.

Best Regards,

The issues you have found earlier (filed as PDFNEWNET-36009) have been fixed in Aspose.Pdf for .NET 9.4.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.