I have tried converting a word document(.Docx) to PDF format using ASPOSE.PDF and also i changes the font name, using following is the code.
string File = "D:\\Test-Word1.Docx";
Aspose.Words.Document doc = new Aspose.Words.Document(File);
FontChanger changer = new FontChanger();
doc.Accept(changer);
System.IO.MemoryStream pdfOoutStream = new System.IO.MemoryStream();
doc.Save(pdfOoutStream, Aspose.Words.SaveFormat.Pdf);
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(pdfOoutStream);
byte[] docBytes = null;
pdfOoutStream = new System.IO.MemoryStream();
pdfDocument.Save(pdfOoutStream);
docBytes = pdfOoutStream.ToArray();
FileStream output = new FileStream("D:\\Test-PDF1.pdf", FileMode.Create,
FileAccess.Write);
// Write byte array contents in the output file stream
output.Write(docBytes, 0, docBytes.Length);
// Close output file
output.Close();
and i found it converted PDF document is triggeres one empty page in middle of document. I have attached the same project with documents.
Please give me a solution asap.
Note: Please include the reference dll Aspose.Words.14.12.0 and Aspose.Pdf.8.2.0 for run the application.
Thanks in advance.