Test.zip (2.7 MB)
When saving an HTML file as PDF, white space/lines is added after every return.
Is there a way to avoid this behaviour.
C#
Document document = new Document(src.FileInfo.FullName);
PdfSaveOptions options = new PdfSaveOptions { Compliance = PdfCompliance.PdfA1a, EmbedFullFonts = true };
Sample HTML files en PDF output are attachedimage003.jpg (2.4 KB)
test.pdf (2.7 MB)
document.Save(dest.FileInfo.FullName, options);
@DirkMolman,
After an initial test with the licensed latest (21.3) version of Aspose.Words for .NET, we were unable to reproduce this issue on our end. Please see the following output PDF file which was generated on our end:
Code used to produce above PDF file is as follows:
Document doc = new Document("C:\\temp\\test\\test.htm");
PdfSaveOptions options = new PdfSaveOptions { Compliance = PdfCompliance.PdfA1a, EmbedFullFonts = true };
doc.Save("C:\\Temp\\test\\21.3.pdf", options);
Please make sure that the latest versions of following fonts are installed on your machine for the correct rendering of this HTML to PDF:
- Times New Roman
- Calibri
- Verdana
- Arial