Dear Sir
We have encountered a new problem recently. When I converted the following document to PDF base on the compoent Aspose.word which version is 24.07, the text box on the icon was missing, as indicated by the * symbol in the red box below.
Even if I upgrade the components to the latest version 25.09, the issue still persists.
original.docx (524.9 KB)
C# code as bellow
var doc = new Document(new MemoryStream(File.ReadAllBytes("c:\\temp\\original.docx")));
//doc.Save("d:\\dest.docx", SaveFormat.Docx);
var options = new Aspose.Words.Saving.PdfSaveOptions();
options.DownsampleOptions.Resolution = 180;
options.EncryptionDetails = new PdfEncryptionDetails("123456", "110", PdfPermissions.DisallowAll);
options.EncryptionDetails.Permissions = PdfPermissions.ModifyContents;
SaveOutputParameters rlt = null;
try
{
///hide the comment
doc.LayoutOptions.RevisionOptions.ShowRevisionMarks = false;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;
doc.LayoutOptions.CommentDisplayMode = Aspose.Words.Layout.CommentDisplayMode.Hide;
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
MemoryStream output = new MemoryStream();
//rlt = doc.Save(output, options);
rlt = doc.Save("c:\\temp\\original.docx.pdf", options);
}
catch (Exception ex)
{
}
@wengyeung
Issue Summary
When converting a DOCX file that contains a textbox anchored to a chart to PDF with Aspose.Words .NET (v24.07 → v25.09) the textbox disappears (the PDF shows a “*” placeholder instead).
Why it Happens
Aspose.Words renders charts as drawing objects. A textbox that is grouped or anchored to the chart is treated as part of the chart’s drawing canvas.
In versions prior to v25.10 the rendering engine skipped the floating textbox inside that canvas, which resulted in the missing content you see.
Immediate Work‑around (No code change)
- Open the DOCX in Microsoft Word.
- Ungroup the textbox from the chart (right‑click the chart → Group → Ungroup).
- Save the document and run the conversion again.
This forces Aspose.Words to treat the textbox as an independent shape, which it can render correctly.
Recommended Permanent Fix
Upgrade to Aspose.Words .NET v25.10 (or any later release).
From v25.10 the library includes a fix for rendering floating textboxes that are anchored to chart objects.
// Example with the latest version (v25.10+)
var doc = new Document(@"c:\temp\original.docx");
// Optional: Ensure layout is up‑to‑date before saving
doc.UpdatePageLayout();
var pdfOptions = new Aspose.Words.Saving.PdfSaveOptions
{
DownsampleOptions = { Resolution = 180 },
EncryptionDetails = new PdfEncryptionDetails("123456", "110", PdfPermissions.ModifyContents)
};
doc.Save(@"c:\temp\original.pdf", pdfOptions);
Additional Settings you may keep
Setting |
Description |
DownsampleOptions.Resolution |
Controls image down‑sampling (your 180 dpi is fine). |
EncryptionDetails |
PDF encryption – keep as‑is if you need it. |
LayoutOptions |
Your revision/comments settings are unrelated to the missing textbox. |
Verify the Fix
- Run the code above after upgrading.
- Open the resulting PDF – the textbox should now appear exactly as in the Word document.
If the Problem Persists
Please provide the following so we can investigate further:
Item |
Why we need it |
Exact Aspose.Words version (full build number, e.g., 25.10.0.0 ) |
To confirm the fix is present. |
A minimal reproducible DOCX (you can remove any confidential content) |
Allows our QA team to replicate the issue quickly. |
Operating System & .NET runtime (e.g., Windows 10, .NET 6) |
Some rendering differences can be environment‑specific. |
Any custom PdfSaveOptions not shown in the snippet (e.g., ExportDocumentStructure ) |
To rule out side‑effects from other options. |
You can attach the files directly to the forum post or send them via the Aspose support ticket system.
References
We hope this resolves the missing‑textbox issue. If you need further assistance, just let us know!
@wengyeung
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-28617
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.
The issues you have found earlier (filed as WORDSNET-28617) have been fixed in this Aspose.Words for .NET 25.10 update also available on NuGet.