Hello there,
We are using Aspose.Total version 10.9.0.0 and are having the following issue when converting a Word Document to PDF.
As you can see from the attached images, the column headings in the table for the PDF version are being truncated and forced onto a new line but are rendering correctly in the word version.
Code being called
private static byte[] ConvertWordToPdf(byte[] file)
{
var stream = GetFileAsStream(file);
var document = new Document(stream);
document.UpdateFields();
if (document.OriginalLoadFormat == LoadFormat.Mhtml)
{
stream = new MemoryStream();
document.Save(stream, SaveFormat.Docx);
document = new Document(stream);
}
stream = new MemoryStream();
document.Save(stream, SaveFormat.Pdf);
file = stream.ToArray();
return file;
}
What can we do to resolve this issue?
Many Thanks.
Hi David,
We are sorry for the inconvenience. We will appreciate it if you please share your source Document here, so we will look into it and guide you accordingly.
Furthermore, your issue pertains to Aspose.Words for .NET, so I am moving your post to the related forum.
Best Regards,
Hi David,
Thanks for your inquiry. Unfortunately, it is difficult to say what the problem is without the input document. Could you please attach your input Word document here for testing? We will investigate the issue on our side and provide you more information.
Hi there, sorry about the delayed response. I have attached both a docx and the generated pdf of this document. Notice the last four columns of the grid in the pdf have queer wrapping in their headers.
Hi David,
Thanks for sharing the detail. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14031. You will be notified via this forum thread once this issue is resolved.
We apologize for your inconvenience.
Thanks for the swift reply