Hi guys,
I’m trying to use Aspose.Words to fill a docx template, and then to save it to pdf. I’ve encountered problems in convertion of line end characters.
First, I have a template docx file (Test.docx), in which I replace some fields with multiline texts, using Aspose.Words with the following code (VB.Net):
Dim r As New Run(node.Document, "first line")
node.ParentNode.InsertAfter(r, node)
r = New Run(node.Document, ControlChar.LineBreakChar & "second line")
node.ParentNode.AppendChild(r)
r = New Run(node.Document, ControlChar.LineBreakChar & "third line")
node.ParentNode.AppendChild(r)
node.Remove()
where “node” is the original node, which I’m going to replace.
After these replacements I save the file as docx to a new file name (result.docx). I checked its xml structure, and it looks similar to the files made by MS Word 2010.
Finally I convert the above result.docx file to pdf, using Aspose.Words.Save method. Its result is the attached result.pdf file.
The problem is, that the pdf file (result.pdf) has some “black squares” at the beginning of the new lines created by the above code.
I used Visual Studio 2008, Aspose for Framework 2 (version 10.5.0.0) for creating the file, on a Windows XP machine and Office 2003 installed.
Would you please be so kind to check this problem and help me to resolve it.
Please find attached the referenced files.
Many thanks and all the best,
Eva Balint.