We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Corrupt PDF in .NET Core

For some licensing reasons I am forced to use Aspose.PDF version 18.9.1.

This minimal example produces corrupt PDF with .NET Core, but valid PDF with .NET Framework.

var editor = new PdfPageEditor();
editor.BindPdf("input.pdf");
editor.Save("output.pdf");

Any workarounds?

@kristofferjalen

Could you please share your sample PDF document with us as well. We will test the scenario in our environment and address it accordingly. Also, please share the .NET Core version that you are using.

Here is a sample PDF document: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf

.NET Core version is 5.0:

 <Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

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

</Project>

@kristofferjalen

Please note that the older versions lack the support for 5.0 .NET Core. Please try to use .NET Core 2.0/2.1 or upgrade to the 21.3v of the API which has most stable support for .NET Core 3.1 or 5.0. In case you still face any issue, please feel free to let us know.