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

Free Support Forum - aspose.com

Can't render a pdf page in .net 6.0

Hi,

Since I’m working to update my app to .net 6.0, this call stopped working “ConvertToPNGMemoryStream” and raises this exception:

_ = new Aspose.Pdf.Document(System.IO.File.OpenRead(“sample.pdf”)).Pages[1].ConvertToPNGMemoryStream();

This exception was originally thrown at this call stack:
#=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zm2cl7e0sXMFI6CAz8GMWXa_CMUfb(byte[])
#=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zPVpv3SzZ1CG$Di_ZuxYXoFoj07C2.#=zxt3_HDWhjN$4oMngrT44m9fvCgAl(#=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zPVpv3SzZ1CG$Di_ZuxYXoFoj07C2.#=zs8gGwxHrwrLZ9DXJuKXjng$xZuQI)
#=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zTqtbr11T7uz9hvN15ZLrQ0E=(string)
#=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zqIcwKZMDy3Q8$arprL6dpBZ2D5JB(string)
#=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zAdY_up4H0SHCQ_WxCsKHAaiqiR0f()
#=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zHJlfs2Em$KlgrYM_MYqEa2_WTDpn(string)
#=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zeipXVKFia$bbNYxCsJFt9FUXD$7u(object, System.ResolveEventArgs)
System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(System.ResolveEventHandler, System.Reflection.RuntimeAssembly, string)
System.Runtime.Loader.AssemblyLoadContext.OnResourceResolve(System.Reflection.RuntimeAssembly, string)
System.Reflection.RuntimeAssembly.GetManifestResourceStream(string)

I’m using Aspose.PDF 21.9.0 .

Could you fix that please ?

BR,

Yassine

@YassineL

Can you please share the used sample code and source file. We will be able to investigate that on our end on provision of requested information.

ConsoleApp43.zip (2.5 KB)

Hi @mudassir.fayyaz .

Please find attached the sample code.

@YassineL

A ticket with ID PDFNET-50644 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.