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

Free Support Forum - aspose.com

Html tags not workign as expected

Hi,

We are using, aspose.words for html to pdf conversion, we found that few of html tags are not getting applied in generated pdf file.

Please find the attached input(html) and output(pdf) files for reference.

In attached pdf, the right indent(margin-left) not applied, center and right alignemnt is not applied.

Please let us know as what is the issue with the html content.

Thanks in advance!
Shivaji

Hi Shivaji,


Thanks for your inquiry.

Aspose.Words mimics the way the Microsoft Word application works. I converted your Html file to Pdf format using Microsoft Word 2013 and have attached the resultant file (msw-2013.pdf) here for your reference. You can see that Aspose.Words 15.9.0 produces an output (15.9.0.pdf) similar to Microsoft Word.

In case you still see problems in Aspose.Words 15.9.0 generated Pdf, please create comparison screenshot which shows the problematic area in Aspose.Words generated Pdf and attach it here for our reference. We will investigate the issue further on our end and provide you more information.

Best regards,

Hi,

We are using front end UI(Rich Text Editor), to provide the content in the browser using our web application, and send the content to PDF Tool to convert html to PDF, where we dont have control to edit the generated html content from editor. We are not using the microsoft word. and its in JAVA package.

Its like plain html to aspose words.

please advise on this issue. as why the span/dev tags are not considering by aspose.

Thansk.
Shivaji

Hi Shivaji,


Thanks for your inquiry. Please attach your ‘expected Pdf document’ here for our reference. We will investigate the issue on our end and provide you more information.

Best regards,

Hi,

For the expected output, you can just open the attached .txt file and change the extension to .html and try to open in the browser, the same look I want to get it when we convert to PDF.

Thanks,
Shivaji

Hi Shivaji,

Thanks for your inquiry. Please note that it is not guaranteed that the output Word/PDF document will look exactly the same as the input HTML file in web browsers. When you save this .html to .pdf format using Microsoft Word 2013, it does also not apply indentation to the text 'with right intent'. In this case, Aspose.Words mimics Microsoft Word's behavior. Also, there are a few documented limitations when dealing with HTML files. Please check the articles mentioned in the following link:

Load in the HTML (.HTML, .XHTML, .MHTML) Format
Save in the HTML (.HTML, .XHTML, .MHTML) Format

If we can help you with anything else, please feel free to ask.

Best regards,

These all are pointing to .NET packages.
We are using Java package for our pdf converions.

Hi Shivaji,


Thanks for your inquiry. Please check the following Java articles:

Load in the HTML (.HTML, .XHTML, .MHTML) Format
Save in the HTML (.HTML, .XHTML, .MHTML) Format

Best regards,