Conversion from PDF to HTML using Avenir font returns blank document

Converting a PDF document in an Avenir font to HTML returns a blank document.


Do you have a resolution for this problem?

Regards, Janet

Hi Janet,


Thanks for using our API’s.

Can you please share the resource PDF files causing this issue, so that we can test the scenario in our environment. We are sorry for this inconvenience.

Hi


I’ve attached the edited PDF file (removed all personalization).

Thanks!
Janet

Hi Jenet,


Thanks for sharing your sample PDF document. I have tested the PDF to HTML scenario using following sample code snippet with Aspose.Pdf for Java 11.3.0 and unable to notice the reported issue. Please download the latest version of Aspose.Pdf for Java and try this sample code snippet, it will resolve the issues.

// Load source PDF file<o:p></o:p>

com.aspose.pdf.Document doc = new com.aspose.pdf.Document("AlpResumeEdited.pdf");

// Instantiate HTML Save options object

HtmlSaveOptions newOptions = new HtmlSaveOptions();

// Enable option to embed all resources inside the HTML

newOptions.PartsEmbeddingMode = HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;

// This is just optimization for IE and can be omitted

newOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;

newOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;

newOptions.FontSavingMode = HtmlSaveOptions.FontSavingModes.SaveInAllFormats;

// Output file path

String outHtmlFile = "Single_output.html";

// Save the output file

doc.save(outHtmlFile, newOptions);


We are sorry for the inconvenience caused.

Best Regards,

Hi Tilal,


I can confirm that the problem with the Avenir font has been fixed in Aspose-PDF version 11.3.0.

Thank you!

JanetF

Hi Janet,


Thanks for your feedback. It is good to know that you have managed to resolve the issue with new release.

Please keep using our API and feel free to contact us for any further assistance.

Best Regards,