I'm using Aspose.words and aspose.pdf together to convert word documents to pdf for final delivery to our customers. Everything is working great except for the fact that after I convert a word doc to a pdf, its adding page numbers in the footer even though page numbers are not present in the word document. We do not want page numbers showing up in the document unless they are in the source document to start with.
I couldn't find anything in the forums about, removing, hiding, deleting page numbers.
Worst case scenario, if I can't remove them, I would settle for being able to change the color to match the background color so they are not visible. Please provide me with a working solution.
Below, you will find the code I'm using for the conversion, its pretty straight forward I think...
'Set the license (must be a the start for each process that access Aspose.Words):
Dim wordsLicense As Aspose.Words.License = New Aspose.Words.License()
wordsLicense.SetLicense("Aspose.Words.lic") 'Must be in the bin directory of host application
'Set the license (must be a the start for each process that access Aspose.Pdf):
Dim pdfLicense As Aspose.Pdf.License = New Aspose.Pdf.License()
pdfLicense.SetLicense("Aspose.Pdf.lic") 'Must be in the bin directory of host application
'Create a word document from the LegalDocument.DocumentFile Byte() property:
Dim wordDoc As New Aspose.Words.Document(New MemoryStream(Me.DocumentFile))
'Save the Word Document in XML Format that can be handled by Aspose.Pdf:
Dim xmlStream As New MemoryStream()
wordDoc.Save(xmlStream, Aspose.Words.SaveFormat.AsposePdf)
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf()
pdf.BindXML(xmlStream, Nothing)
'Added these two lines to Speed up the conversion from doc to pdf:
pdf.IsTruetypeFontMapCached = True
pdf.TruetypeFontMapPath = System.IO.Path.GetTempPath()
'Finally, get the pdf bytes:
pdf.Save(filePath)