Spacing is not preserving while converting word to pdf

Hello,

We are trying to convert Word file to pdf but the spacing, page break and text is not preserving exactly same as in word document.

Please let us know what is wrong in word document ?

We know that ASPOSE mimic the word behavior but we want WYSIWYG in word to pdf conversion.

We tried converting each row to a table but while converting to pdf, it is not maintaining the line spacing between tables and merging them in one. refer attachment 2.

output.zip (10.5 KB)

@Sudrashya I have compared PDF document produced by Aspose.Words and PDF document produced by MS Word and they are almost identical. Could you please attach PDF documents produced by Aspose.Words on your side and provide screenshot that will demonstrate the problem? Unfortunately, I do not see problems in the output documents produced on my side.

Hello @alexey.noskov

I acknowledge the document produce by ASPOSE and MS WORD are same, But We want PDF file should looks exactly the same as word document content-wise.

If you see the attachment 2 After converting from word to PDF using MS WORD also the WORD tables are getting merged there.

What better we can do in word document so that we can have same page and content in PDF after converting from WORD document.

Regards
Sudrashya

@Sudrashya As I can see Aspose.Words and MS Word does exactly this - output PDF look the same as the source MS Word document.
However, I see in your document there is hidden content, which is expectedly is not rendered in PDF document. Is this the problem you have encountered? If so, you can specify LayoutOptions.ShowHiddenText to show hidden content upon rendering:

Document doc = new Document(@"C:\Temp\in.doc");
doc.LayoutOptions.ShowHiddenText = true;
doc.Save(@"C:\Temp\out.pdf");

@alexey.noskov

We need our pdf file same as the word file. I am not sure what hidden content are there and how we can remove them?
Could you please let me know?

@Sudrashya The hidden content is the contat that is marked as hidden. For example empty paragraphs between tables in your document are hidden:

If you disable displaying not printable characters in MS Word, the hidden content will not be displayed and the document will look exactly the same as PDF produced by MS Word or Aspose.Words.

@Sudrashya Sure, I have removed the image.