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

Free Support Forum - aspose.com

PDF results are html content and not original content

Hi Team,

The conversion of attached input file bestellung_-_ch35388_1.htm results html tags of pdf and not original content of html file.
Using aspose.words.dll version is
Please find the attached output file and sample code base for your reference.
Please suggest on this issue.
Test.zip (69.5 KB)


@Kofax_Business_Communications The problem occurs because Encoding is specified improperly. The file is in Unicode encoding, but in your code utf-8 encoding is specified. You can either sepcify encoding like the following:

 loadOptions.Encoding = System.Text.Encoding.Unicode;

Or simply leave it unspecified, in this case, Aspose.Words automatically detects encoding and loads your document properly.

Hi Team,

The attached html file is able to convert to pdf after changing encoding to “Unicode” as suggested.
There is data loss in conversion pdf file.
Please find the attached input file, outputfile and sample code for your reference.
Please check this issue.
Test.zip (76.5 KB)


@Kofax_Business_Communications As I can see there is no data loss in the converted PDF document. Formatting of the table is changed because it does not fit the page size. If you make page size bigger then the table will look exactly the same as in the browser. For example you can use the following code:

doc.FirstSection.PageSetup.Orientation = Orientation.Landscape;
doc.FirstSection.PageSetup.PaperSize = PaperSize.A3;