Hi,
Our requirement is to convert a HTML file into PDF on Android devices. We searched the products available in aspose.com and figured out only Aspose.Word for Android will have this feature. Surprizingly, Aspose.Pdf for Android does not have this feature. Are we correct in this understanding?
When we used Aspose.Word for Android to convert HTML to PDF, the quality of PDF files are not that great and compromized on various areas. We are not sure if the problem is with the conversion or the way HTML is downloaded. Can somebody help us here?
I am attaching the converted PDF file and the source of the content is from http://mobile.nytimes.com/. We managed to converted the relative path to images/CSS in the downloaded HTML to absolute path.
Regards,
Ritesh
Hi Ritesh,
Please accpet my apologies for late response.
Thanks for your inquiry. We are working over your query and will update you asap.
Hi Ritesh,
Thanks for your inquiry.
Please note that it is not guaranteed that when you convert a Html file using Aspose.Words for Android, the output Word/Pdf document will look exactly the same as the Html file. This is because Aspose.Words was originally designed to work with Microsoft Word documents and Html documents are quite different. Please consult the articles mentioned in the following page:
http://www.aspose.com/docs/display/wordsandroid/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format
I have also attached a Pdf document i.e. generated using Aspose.Words for Android 1.5 on my side here for your reference. Could you please create screenshots showing the problematic areas in attached .pdf for our reference. We will investigate the issues further on our end and provide you more information.
Moreover, I am afraid, Html to Pdf conversion is not supported by Aspose.Pdf for Android yet. I am moving this thread in Aspose.Pdf forum where you'll be guided appropriately.
Best regards,
Hi Awais,
Thanks for the response.
The PDF that you attached is very similar to what I could generate. If you see the PDF and the HTML, the major areas of concerns are header and footer. I am attaching screen shots with those areas highlighted.
Apart from this, the fonts and text alignment are also not as per the websites.
Hope to hear from you soon on this.
Regards,
Ritesh
Hi Ritesh,
We are sorry for the inconvenience. As Awais stated above Aspose.Pdf for Android doesn’t support HTML to PDF conversion at the moment. We have logged a new feature requested as PDFANDROID-80 in our issue tracking system for its implementation. We will notify you via this forum thread as soon as it is implemented.
Please feel free to contact us for any further assistance.
Best Regards,
Hi Ritesh,
Thanks for the additional information.
Regarding the incorrect rendering of content placed inside and tags, we have logged an issue in our bug tracking system as WORDSNET-9638. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience
Regarding the fonts issue, please note that Aspose.Words for Android requires TrueType fonts when rendering documents to fixed-page formats such as PDF or XPS. You need to install these fonts onto your android device. Also, please visit the following links for more details:
How Aspose.Words Uses True Type Fonts
How to Specify True Type Fonts Location
I hope, this helps.
Best regards,