Dogovir.docx (90.4 KB)
Hello Aspose Team,
We’ve encountered an issue while converting certain .docx files to .pdf format using Aspose.Words for .NET. The problem appears consistently with specific documents, while others convert without issues.
I’ve attached an example document and a minimal .NET test application to help you reproduce the problem. Please investigate and let us know the cause and any recommended solutions or workarounds.
Thank you for your assistance.
Best regards,
Oleh
@Oleh96khomyn
Hello Oleh,
It seems you are experiencing issues with converting specific DOCX files to PDF using Aspose.Words for .NET. This is a known scenario where certain documents may not convert properly while others do.
Here are some steps you can take to troubleshoot and potentially resolve the issue:
-
Update to the Latest Version: Ensure you are using the latest version of Aspose.Words for .NET. There have been numerous updates and bug fixes that may resolve your issue. The latest version can be found on the Aspose website.
-
Test with a Simple Conversion: You can try using a simple C# code snippet to perform the conversion. Here’s an example:
Document doc = new Document(@"C:\Path\To\Your\Document.docx");
doc.Save(@"C:\Path\To\Output\Document.pdf");
Replace the paths with the actual paths to your files. This will help determine if the issue is with the specific document or your implementation.
-
Check Document Content: Sometimes, specific content or formatting in the DOCX file can cause conversion issues. If possible, try simplifying the document by removing complex elements (like images, tables, or special formatting) to see if that resolves the issue.
-
Contact Support: If the problem persists, consider reaching out to Aspose support with the specific document and a minimal test application. They can provide more targeted assistance.
By following these steps, you should be able to identify the cause of the conversion issue or find a workaround. If you have any further questions or need additional assistance, feel free to ask!
Best regards.
https://drive.google.com/file/d/1JxqdjeET0upwa238PSqlX7VCSKAKuAKd/view?usp=sharing
adding test application to reproduce
@Oleh96khomyn
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-28049
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@Oleh96khomyn Could you please clarify what particular issues you mean? We see several issues in this metafile:
- Garbled text. This is encoding issue. Metafile itself doesn’t contains information about the encoding and current system encoding is used. I.e. MS Word with English locale shows garbled text the same way as Aspose.Words. Proper text will be displayed on Russian (or Ukrainian) locale. We do not support this feature yet and always use Latin encoding.
- Most of the text is rendered as italic whereas MS Word shows it with regular style. This seems to be a bug.
- Differences in line width, in Aspose.Words output lines are thicker. This is expected behavior. By default Aspose.Words renders metafile according to size on the page with 96 dpi. I.e. it is rendered the same way it is shown in MS Word on 100% zoom. This behavior is controlled by
PdfSaveOptions.MetafileRenderingOptions.EmulateRenderingToSizeOnPage
and PdfSaveOptions.MetafileRenderingOptions.EmulateRenderingToSizeOnPageResolution
.
Thank you for your response.
We’ve further investigated the file and confirmed that it comes from an external source. When opening it in any online or non-desktop viewer, the content breaks as well. Therefore, the issue is not related to Aspose.
The ticket can be closed.
Best regards,
Oleh
1 Like