Hi,
I’m trying to convert a html file (see attachment) to PDF but it doesn’t give me the right result.
the html contains long image and it can’t fit in one page. As a result Aspose.Words only take the first page only and truncated the rest. When I opened the same file in Word 2013 it is seperated in multiple pages, till all fit in. The code i’m using:
Dim wordDocument As New Document
Dim docBuilder As New DocumentBuilder(wordDocument)
docBuilder.InsertHtml(tekst)
For Each curTable As Aspose.Words.Tables.Table In wordDocument.GetChildNodes(NodeType.Table, True)
curTable.PreferredWidth = Aspose.Words.Tables.PreferredWidth.FromPercent(100)
curTable.AllowAutoFit = True
curTable.AutoFit(Aspose.Words.Tables.AutoFitBehavior.AutoFitToWindow)
Next
Dim paragraphs As NodeCollection = wordDocument.GetChildNodes(NodeType.Paragraph, True)
For Each currenParagraph As Aspose.Words.Paragraph In paragraphs currenParagraph.ParagraphFormat.NoSpaceBetweenParagraphsOfSameStyle = True
currenParagraph.ParagraphFormat.SpaceAfter = 0
currenParagraph.ParagraphFormat.SpaceBefore = 0
Next
wordDocument.TrackRevisions = False
wordDocument.AcceptAllRevisions()
wordDocument.Save(filename, Aspose.Words.SaveFormat.Pdf)
Any idea how to fix this?
Thank’s a lot in advance.
Cheers,
inoel