After converting XPS to PDF some graphic elements are broken

Hello,

I have XPS file with following content:

image.png (5.4 KB)

After converting it to PDF, one of the paths is broken:

image.png (14.4 KB)

Here is my input XPS file:
XPSTEST.7z (73.6 KB)

Code used for conversion:

using System.Diagnostics;
using System.IO;
using Aspose.Pdf;
using AsposeExportTest;

AsposeLicensing.EnsureLicense();

var outputFileName = "result.pdf";

if (File.Exists(outputFileName))
{
    File.Delete(outputFileName);
}

using (var xpsStream = File.OpenRead("XPSTEST.xps"))
{
    using (var document = new Document(xpsStream, new XpsLoadOptions()))
    {
        document.Save(outputFileName);
    }
}

var psi = new ProcessStartInfo
{
    FileName = outputFileName,
    UseShellExecute = true,
};

Process.Start(psi);

Used following project configuration, Latest Aspose.PDF 23.12.0

  <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net6.0-windows</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <UseWpf>true</UseWpf>
    </PropertyGroup>

    <ItemGroup>
      <PackageReference Include="Aspose.PDF" Version="23.12.0" />
    </ItemGroup>

Is that a bug in Aspose.PDF? Can I somehow workaround this?

Best regards,
MR

@michalrakoczy

Instead of Aspose.PDF, can you please try using Aspose.Pdf.Drawing package. We tested with it in our environment and did not face any issues.
output.pdf (68.4 KB)

@asad.ali Your output.pdf is also broken. Please take a look what happened with the line connecting two shapes.

Aspose.Pdf.Drawing didn’t help.

We have a WPF application responsible for drawing complex 2D diagrams. We export them to XPS and afterwards from XPS to PDF.

@michalrakoczy

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): PDFNET-56294

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 PDFNET-56294) have been fixed in Aspose.PDF for .NET 24.2.

Tested with 24.2. Works fine.

Thank you.

@michalrakoczy

Thanks for the feedback. Please feel free to create a new topic in case you need further assistance.