How to convert pdf to html for mobile device?

Hey,


Is there any optimizing that i can do to convert pdf to html for mobile usage? the default output is ok for desktop browser, but for mobile browser, looks bad.

Hello There,


Thanks for contacting support.

The HTML obtained after converting PDF, often does not look good on several browsers (e.g IE 6-8, Mobile Browsers, etc), because required fonts cannot be loaded in them. In order to ensure maximum browsers compatibility, you can generate 3 sets of fonts by Aspose.Pdf for .NET. For more information you may visit “Generate 3 Sets of Fonts” article in API documentation.

pyaspose:
but for mobile browser, looks bad.

Would you please explain more that in which reference generated HTML looks bad in mobile by sharing sample HTML file? This way we can also observe the scenario in our environment and address it accordingly.


Best Regards,

Hey,


I have uploaded the pdf and the output html file, It look ok in desktop browsers. but for mobile devices, the screen is small, and the text is also small, can aspose optimize the display for mobile browsers?

thanks

Hi,

Thanks for sharing the sample file.

I have tested the scenario using following code snippet and when viewing the resultant HTML on iPhone 6 plus running iOS 9.3.5 and as per my observations, the layout of file is correct but the table borders are not rendering. For the sake of correction, I have logged it as PDFNET-42737 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time.

Besides this, please note that we already have logged a feature request to generate responsive output from PDF file as PDFNET-41302. We will further look into the details of this requirement and will keep you updated on the status of correction. However for your reference, I have attached the output generated over my end.

We are sorry for this inconvenience.

[Java]

// Load source PDF file
Document pdfDocument = new Document("C:\\pdftest\\test.pdf");
// Instantiate HTML Save options object
com.aspose.pdf.HtmlSaveOptions newOptions = new com.aspose.pdf.HtmlSaveOptions();
// Enable option to embed all resources inside the HTML
newOptions.PartsEmbeddingMode = com.aspose.pdf.HtmlSaveOptions.PartsEmbeddingModes.EmbedAllIntoHtml;
// This is just optimization for IE and can be omitted
newOptions.LettersPositioningMethod = LettersPositioningMethods.UseEmUnitsAndCompensationOfRoundingErrorsInCss;
newOptions.RasterImagesSavingMode = com.aspose.pdf.HtmlSaveOptions.RasterImagesSavingModes.AsEmbeddedPartsOfPngPageBackground;
newOptions.FontSavingMode = com.aspose.pdf.HtmlSaveOptions.FontSavingModes. SaveInAllFormats;
// Save the output file
pdfDocument.save("C:\\pdftest\\test_converted.html", newOptions);

Hi,

Is there any updated on this issue?

Thanks,

Andrew

@ADnn,

The linked ticket ID PDFJAVA-36748 is pending for the analysis and not resolved yet. Our product team will investigate as per their development schedules. We will let you know once a significant progress has been made in this regard.

Hi,

Is there some news about ticket PDFJAVA-36748 for responsive HTML result?
Kind regards.

Samuel

@samuelpetit

Thanks for your inquiry.

As issue was logged under free support model and has low priority, we regret to share that it is not yet resolved. Please note that there is large number pending issues in the queue and issues under free support model are resolved on first come first serve basis unlike the priority support model where issues have high precedence. As soon as we have some definite updates regarding resolution progress, we will surely inform you. Please spare us little time.

We are sorry for the inconvenience.

It seems this is not yet resolved. Can you please confirm?

@HemantJain

The issue is not yet resolved due to other high priority issues. However, we will surely inform you as soon as it is resolved. Please spare us little time.

We are sorry for the inconvenience.