Description
I am using Aspose.Words for Java to generate documents with LINQ Reporting Engine. The LINQ expressions are processed correctly when saving the document as DOCX, but when saving as PDF, the expressions are not evaluated, and the raw placeholders appear in the output.
Code Snippet
ReportingEngine reportingEngine = new ReportingEngine();
reportingEngine.buildReport(doc, ds.values().toArray(), ds.keySet().toArray(new String[0]));
SaveOptions saveOptions = SaveOptions.createSaveOptions(SaveFormat.fromName("PDF"));
doc.save(out, saveOptions);
Observed Behavior
- DOCX Output → Works correctly (LINQ expressions are evaluated).
- PDF Output → LINQ expressions remain as placeholders instead of being replaced with actual values.
Additional Notes
- I also tried explicitly calling:
doc.updateFields(); doc.updatePageLayout(); doc.cleanup()
- I attempted using
PdfSaveOptions
with different settings.
But it didn’t solve the issue - the LINQ expressions still remain unprocessed in the PDF.