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

# Convert doxc to pdf

Hello

I am trying to convert docx to pdf using the aspose library for word, and save option to convert the document to pdf

Unfortunately some parts of document, does not displayed or they have not the correct format

I attached an image of my word document
image.png (5.9 KB)

and a result of this is

image.png (5.93 KB)
image.png (700 Bytes)

@constantinos29071977 Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.

Dear sir

please find attached the word document

01.docx (79.9 KB)

Regards

@constantinos29071977 Thank you for additional information. I have converted you document to PDF on my side and as I can see the result is the same as produced by MS Word. Could you please attach the output document produced on your side with both MS Word and Aspose.Words, so I can compare the results?
Also, while conversion I have noticed the following fonts are not available on my side:

• Intrum Sans
• Intrum Sans Medium
• OCR-B
• Roman 10cpi
• Helvetica

Could you please attach these fonts too?

Unfortunately i don’t have this font that you are mention

01.pdf (89.5 KB)
01.docx (2.6 MB)

this is my method where i am using in order to convert the word to pdf

Public Function ConvertToPdf(ByVal documentToConvert As String) As String
Dim ASPOSEDoc As Document = New Document(documentToConvert)
Dim convertedFile = Path.ChangeExtension(documentToConvert, “.pdf”)
’ save as pdf
Try
ASPOSEDoc.Save(convertedFile, SaveFormat.Pdf)
Finally
End Try

Return convertedFile

@constantinos29071977 Thank you for additional information. As I can see you are using old 17.3 version of Aspose.Words. I cannot reproduce the problem using the latest 22.3 version of Aspose.Words for .NET. Please try with the latest version on your side and let me know if the problem still persist.

Hello again

even i upgrade the library the issue still exist

02.pdf (88.4 KB)

@constantinos29071977 Could you please save the result document to DOCX format, then convert it to PDF using MS Word on your side and attach both documents here? I will compare results once again.
Also, I have checked your PDF document and as I can see Cambria font used in your document is substituted with Times New Roman. This might cause difference in layout. You can detect font substitutions by implementing IWarningCallback like in the documentation.

dear sir

pdf result
02.pdf (88.4 KB)
docx
01.docx (80.5 KB)

@constantinos29071977 Thank you for additional information. Unfortunately, I still cannot reproduce the problem on my side. I have tried simple conversion the DOCX document to PDF and the output looks exactly as output PDF generated by MS Words on my side:

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


Please try calling Document.UpdatePageLayout() method before saving the document to PDF and let me know if this fixed the problem on your side.

Unfortunately the issue is still exist
can you please give more guidelines in order to pass this gap ?

please find the docx attached with transformation of all fonts to Arial

03.docx (41.9 KB)

Regards

@constantinos29071977 Thank you for additional information. At last I have managed to reproduce the problem. It has been logged as WORDSNET-23655. We will keep you informed and let you know once it is resolved.

Any update ?

@constantinos29071977 Unfortunately, the issue has been postponed. The issue occurs because missing table column width data stored in the document are not re-calculated correctly by Aspose.Words. The issue is related to another WORDSNET-832 defect.
Postponing until the logic supporting tables with grid/width implemented per WORDSNET-832 is released.

Hello again

How long do you think it would take the issue to be solved

Regards

@constantinos29071977 Unfortunately, currently we cannot provide you any estimate because WORDSNET-832 is a very complex issue related to predicting MS Word behavior in table grid calculation, which is not always obvious.