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

Free Support Forum - aspose.com

The content aligned differently from Word to PDF conversion

Hello,

We are using Aspose.Word.dll version 15.7.0.0 with Visual Studio 2010 to create word document and generate PDF based on the same document object.

We are generating word document based of data entered by users.

We are using content in the table format. When I compared generated word document to PDF documents the word wrapping is different. Attached Source.docx and Destination.pdf. I removed rest of the content due to privacy.
Issues from sample

(1) The Header Category in word document while It is “Catego (next line) ry” in PDF
(2) The header in third column wrapped differently
(3) The header and content in 4th columns wrapped differently.

How do we generate PDF exact copy of source word?

Thank you
Akshay Patel

Hi Akshay,

Thanks for your inquiry. I have tested the scenario using latest version of Aspose.Words for .NET 15.8.0 and have not found the shared issue. Please use Aspose.Words for .NET 15.8.0. I have attached the output document with this post for your kind reference.

Hello Tahir,

Thank you for quick response.
I tried Aspose.Words for .NET 15.8.0 and the issue is not resolved. Attached full word (FullSource.docx) and generated PDF file (FullDestination.pdf) based on word. I sent you partial content of the word document last time.

Thank you
Akshay Patel

I am using following code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aspose.Words;
using Aspose.Words.Reporting;


namespace AsposeWordToPdf
{
class Program
{
static void Main(string[] args)
{
string InDocx = @“C:\Sample\AsposeWordToPdf\documents\FullSource.docx”;
string outPdf = @“C:\Sample\AsposeWordToPdf\documents\FullDestination.pdf”;
ConvertWordToPDF(InDocx, outPdf);
}

static public void ConvertWordToPDF(string InDocx, string outPdf)
{
Document doc = new Document(InDocx);
// wait for doc to save
System.Threading.Thread.Sleep(500);
doc.Save(outPdf);
}
}
}


Hi Akshay,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12487. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-12487) have been fixed in this Aspose.Words for .NET 17.3.0 update and this Aspose.Words for Java 17.3.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.