I have a Word template file that I have tried to save as PDF. A number of headings that have a white font have disappeared. Also, in the header section, the text has been right-aligned instead of left. What is wrong?
The code I used is:
oDoc = New Aspose.Words.Document("c:\temp\PT Plan Layout.dot")
Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream()
oDoc.Save(stream, Aspose.Words.SaveFormat.AsposePdf)
' Seek to the beginning so it can be read by XmlDocument.
stream.Seek(0, System.IO.SeekOrigin.Begin)
' Load the document into an XmlDocument
Dim xmlDoc As XmlDocument = New XmlDocument()
xmlDoc.Load(stream)
' Save the XML
xmlDoc.Save("c:\temp\PullThrough.xml")
' Load the XML document into Aspose.Pdf
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()
' Make sure the images that were saved by Aspose.Words into Windows temporary
' folder are automatically deleted by Aspose.Pdf when they are no longer needed.
pdf.IsImagesInXmlDeleteNeeded = True
pdf.BindXML(xmlDoc, Nothing)
' Now produce the PDF file.
pdf.Save("c:\temp\Pullthrough.pdf")
I have attached the Word template file, the XML generated from it, and the resulting PDF.
We are using Aspose.PDF 3.2.2.0 and Aspose.Words 4.0.3.0
I posted this in the Aspose.PDF forum. Thye used ASpose.Words v4.1.1.0 and that resolved the font color problem. However the alignment problem remains in the XML file.