Export to PDF not showing correct background page information

Using Aspose.Diagram (24.9.0)

I’m trying to export .vsdx to .pdf using the code snippet in Convert Visio to PDF format|Documentation.

I’m encountering a problem with the export function: it’s not correctly processing the background data for each foreground page. All of my foreground pages share a common background page, which includes a border and text formulas designed to dynamically update specific text elements on each page. In the example I’ve provided, the “Tab Name” field should display “Uno,” “Dos,” and “Tres” for the corresponding pages. However, it is incorrectly showing “Border” for all the pages instead.

Also, the pdf export is including all background pages. Is it possible to have a trigger to include/exclude background pages? If we were to have it match the export file by Visio, it should be excluded by default.

I’ve attached my samples.
ExportByVisio.pdf is exported using the Visio app and it’s the result I wanted.
ExportByAspose.pdf is the pdf created using the code snippet sample.
Sample.vsdx is the Visio file I’m trying to export.
AsposeSample.zip (1.8 MB)

@ger.vue
Thanks for the template file and output pdf.
Please try this sample code to set SaveForegroundPagesOnly to true before saving to pdf:

        Aspose.Diagram.Saving.PdfSaveOptions opts = new Aspose.Diagram.Saving.PdfSaveOptions();
        opts.SaveForegroundPagesOnly = true;

We reproduced the problem you mentioned by converting your template vsdx file to PDF.
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): DIAGRAMNET-53582

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.

Thanks, the SaveForegroundPagesOnly options works.

@ger.vue
It is great that you were able to resolve this issue on your end. In case you have further inquiries or may need any help in future, please let us know by posting a new thread in Aspose.Diagram’ forum.
The issue of DIAGRAMNET-53582 has been resolved now.
The fix will be included in an upcoming release (Aspose.Diagram v24.11) that we plan to release in the first half of november 2024. You will be notified when the next version is released.
Thanks.

The issues you have found earlier (filed as DIAGRAMNET-53582) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou