I have converted *.docx documents to *.pdf format with Aspose.Words and the result documents have a few inconsistencies.
The most affected pages:
_WordArt All text effects.docx
- 3: WordArt with the Glow effect differs from the original document.
- 5: WordArt with the 3-D format Soft Bevel effect differs from original document.
WordArt Preset Styles.docx
- 5: WordArt with the Preset Soft Bevel style effect differs from the original document.
_All SmartArt styles.docx
- 23-27: SmartArt with the 3-D styles differ from the original document.
There are screenshots of these issues in the attached archive, as well as, the documents.
Code sample:
var doc = new Document(inputFile);
doc.Save(outputFile, SaveFormat.Pdf);
I use Aspose.Words.dll 25.2.0.0.
test24.zip (1.2 MB)
@licenses
It seems you are experiencing issues with the conversion of WordArt and SmartArt effects when using Aspose.Words to convert your .docx
documents to PDF format. Specifically, you mentioned inconsistencies with the Glow effect, Soft Bevel effect, and 3-D styles on certain pages.
To address these issues, you can try the following approaches:
-
Update Aspose.Words: Ensure you are using the latest version of Aspose.Words. Sometimes, rendering issues are resolved in newer releases, so updating to the latest version may help.
-
Use PdfSaveOptions: When saving your document to PDF, you can customize the PdfSaveOptions
to improve rendering. For example, you can enable or adjust the DmlEffectsRenderingMode
to control how DrawingML effects are rendered. Here’s a code snippet to illustrate this:
var doc = new Document(inputFile);
var saveOptions = new PdfSaveOptions
{
DmlEffectsRenderingMode = DmlEffectsRenderingMode.Fine // or Simplified
};
doc.Save(outputFile, saveOptions);
-
Check for Warnings: Implement a warning callback to capture any rendering warnings that may occur during the conversion process. This can help identify specific issues related to unsupported features or effects:
HandleDocumentWarnings callback = new HandleDocumentWarnings();
doc.WarningCallback = callback;
doc.Save(outputFile, saveOptions);
foreach (WarningInfo warning in callback.Warnings)
{
Console.WriteLine(warning.Description);
}
-
Test with Different Rendering Modes: Experiment with different rendering modes for DML effects. You can set the DmlEffectsRenderingMode
to None
, Simplified
, or Fine
to see which option yields the best results for your specific document.
-
Review Documentation: Consult the Aspose documentation for any specific notes on rendering WordArt and SmartArt, as there may be additional settings or considerations that apply to your case.
If these suggestions do not resolve the issues, consider reaching out to Aspose support with detailed examples and screenshots of the discrepancies for further assistance.
Feel free to ask if you have any more questions or need further clarification!
Sources:
I use the latest version of Aspose.Words already and there are no warnings (IWarningCallback).
I also tried DmlEffectsRenderingMode.Fine and there are no differences in the result documents.
@licenses
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-27893,WORDSNET-27894,WORDSNET-27895
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.