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

Free Support Forum - aspose.com

Misformatting of conversion HTML to PDF

We have unexpected results in converting HTML to PDF regarding styling of the PDF.

  • Styling in PDF is not according to HTML styling
  • Pictures do not respect sizing
  • All pictures get underscores

We use:
Aspose.Words v11.3.0.0
Please advise.

Hi Hans,

Thanks for your inquiry. I have managed to reproduce the following issues at my side. I have logged these issues as follow:

WORDSNET-9010 : Aspose.Words.Document does not import the html styles correctly
WORDSNET-9011 : Html to Doc/Docx/Pdf file conversion issue with images (All pictures get underscores)

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

*hansvanoosterom:

  • Pictures do not respect sizing*

I have not found this issue at my end in output Pdf file. It would be great if you please share some more detail about this issue. You have not shared the images used in your html. Please also share images along with html here for testing. I will investigate the issue on my side and provide you more information.

I uploaded the image files. The HTML is already available in the earlier post.

Hi Hans,

Thanks for sharing the image files.

*hansvanoosterom:

  • Pictures do not respect sizing*

I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-9032 in our issue tracking system. I have also linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-9011) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Thank you for the update. We did some testing with the new update. Because we are not eligible for a free upgrade on our licence, we tested with the trial version.

We found a better result based on the new update. There are still some issues however. We would appreciate if you could look into them.

  1. The quality of the logo is not OK
  2. Hyperlinks are not in the correct font color
  3. Offset of the hyperlink text line is off by a few pixels
  4. We suspect bold font is “too bold” to fit, leading to incorrect word wrapping.
  5. The second picture in the example html file is not displayed in the resulting PDF.

Our findings are attached in the examples in the zip file and commented in the PDF file in the zip.

We are looking forward to your response.

Kind regards

Hi Hans,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issues at my side. For the sake of correction, I have logged these issues as follow:

WORDSNET-9307 : HTML to Pdf conversion issue with Image quality
WORDSNET-9308: HTML to Pdf conversion issue with Text rendering (Text “Schadenummer” issue)
WORDSNET-9309 : Hyperlinks color is changed after conversion from HTML to Docx/Pdf
WORDSNET-9310 : Extra empty spaces appear after conversion from Html to Docx/PDF

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

*hansvanoosterom:

  1. Offset of the hyperlink text line is off by a few pixels*

It would be great if you please share some more detail about this issue. I will investigate the issue on my side and provide you more information.

I added an example to explain the issue with the offset. This is typical for hyperlinks we assume, because we see similar behavior in the footer of the HTML and the PDF.

Hi Hans,

Thanks for sharing the detail.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9315. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Hans,

*hansvanoosterom:

  1. The quality of the logo is not OK*

It is to inform you that our development team has completed the work on the issue (WORDSNET-9307) and has come to a conclusion that this issue and the undesired behavior you’re observing is actually not a bug in Aspose.Words. So, we have closed this issue as ‘Not a Bug’. The image quality is good. Please check the image at 200% zoom in Adobe reader.

Moreover, please try using PdfSaveOptions.DownsampleImages = false when saving. By default, images are downsampled when converting to pdf.

We have also noticed that the following issue is not a bug. The output Pdf is close to input html.

WORDSNET-9310 : Extra empty spaces appear after conversion from Html to Docx/PDF

Hi Hans,

*hansvanoosterom:

  1. The second picture in the example html file is not displayed in the resulting PDF.*

I have not found this issue while conversion of Html to Pdf. Please check the attached output Pdf. Could you please share your working environment? I will investigate the issue on my side and provide you more information.

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version

Our working environment consists of:

  • Windows 7 Enterprise SP1
  • 64 bit
  • .Net Framework 4 v4.0.30319

Kind regards.

Hi Hans,

Thanks for sharing the detail. I am using the same operating system and .NET framework. I have attached the output Pdf file with this post for your kind reference. I have used the following code example to convert html to Pdf. The picture is visible in output Pdf file.

var doc = new Document(MyDir + "35021.html");
doc.Save(MyDir + "out.pdf");

Thanks for the quick response. Since we are testing with the trial version: could the trial version be responseable for the behaviour we noticed? Otherwise we wait for a new version with solutions for the other issues we registered before a new test on this issue as well.

Kind regards.

Hi Hans,

Thanks for your inquiry. This issue is not related to evaluation mode. I suggest you please request a free 30-day trial license from here:
https://purchase.aspose.com/temporary-license

Once
you have temporary license, please test your scenarios with latest
version of Aspose.Words for .NET 13.10.0. Please download latest version
of Aspose.Words from here:
https://releases.aspose.com/words/net

Please create separate console application with following lines of code and check the output.

var doc = new Document(MyDir + "35021.html");
doc.Save(MyDir + "out.pdf");

The issues you have found earlier (filed as WORDSNET-9032) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-9010) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-9309) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Could you please inform us on the status of the open issues:

  • 9315 and 9308 (both unresolved status)

Our customer is pressing for a solution.
Would like to hear from you as soon as possible.

Kind regards,

Hans van Oosterom

Hi Hans,

Thanks for your patience.

I am afraid your issues (WORDSNET-9308 and WORDSNET-9315) have now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.

We apologize for your inconvenience.