Vsdx with background: save to PDF creates two pages instead of one with applied background

Hi,

We use Aspose.Diagram 24.8 for .NET. We have a vsdx with a background page that we want to convert to PDF using the following code:

using (var stream = new MemoryStream(bytes))
{
var diagram = new Diagram(stream);

using (var saveStream = new MemoryStream())
{
    diagram.Save(saveStream, SaveFileFormat.Pdf);
    return saveStream.ToArray();
}

}

The generated pdf will contain two pages, for the two pages in the vsdx, one is the foreground, the other the background. We would like to get single page, with the background applied (just like the standard visio action save as > pdf). How can we achieve this? Find the vsdx attached.

Best Regards,
Reto

F10 F+C 02 PRO Subprozess Cash Management.zip (84.9 KB)

@IOZ
Thanks for the template vsdx file.
Please try to set save foreground page only before saving to pdf as this sample code:

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

Thanks.

Hi Philip,

This removes the background, which we do not want. we want the background applied when we create the pdf, but not as a seperate page in the pdf. Please see the attachment for the desired result (created using save as > pdf in visio)

F10 F+C 02 PRO Subprozess Cash Management.pdf (103.6 KB)

@IOZ
We reproduced the problems you mentioned by converting your template Vsdx file to Pdf.
We found an issue that some text is missing on the first page of the application background section when saving 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-53530

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.

1 Like

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