We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Save As Word DOCX Document to PDF File & Prevent Text Overlapping using Aspose.Words for .NET (C#)

Hi,

I use latest version of Aspose.Word (20.3) and having problem when converting this document to PDF.
File location here http://macroviewdownloads.s3.amazonaws.com/TempFiles/copyaspdf/UDN2.docx
The texts are overlapping with each other.
PDFresult.PNG (23.8 KB)

Tried all the 3 codes below but still same issue.

  • Code 1 -
string tempPDFFilename = @"E:\Test Area\Word\UDN2.pdf";
string wordFilename = @"E:\Test Area\Word\UDN2.docx";
var doc = new Aspose.Words.Document(wordFilename);
doc.Save(tempPDFFilename);
  • Code 2 -
string tempPDFFilename = @"E:\Test Area\Word\UDN2.pdf";
string wordFilename = @"E:\Test Area\Word\UDN2.docx";
var doc = new Aspose.Words.Document(wordFilename);
PdfSaveOptions pso = new PdfSaveOptions();
pso.Compliance = PdfCompliance.PdfA1b; // tried all the options Pdf15, Pdf17, PdfA1a, PdfA1b
doc.Save(tempPDFFilename, pso);
  • Code 3 -
string tempPDFFilename = @"E:\Test Area\Word\UDN2.pdf";
string wordFilename = @"E:\Test Area\Word\UDN2.docx";
Stream stream = File.OpenRead(wordFilename);
var doc = new Aspose.Words.Document(stream, new Aspose.Words.LoadOptions(Aspose.Words.LoadFormat.Docx, null, null));
MemoryStream pdfStream = new MemoryStream();
doc.Save(pdfStream, Aspose.Words.SaveFormat.Pdf);
pdfStream.Position = 0;
File.WriteAllBytes(tempPDFFilename, pdfStream.ToArray());

Thanks.

@macroview,

Thanks for reporting this problem to us. We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20086. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Thank you for quick response and looking into this problem.