Hello,
we use Gembox.Document v35.0.200.1423 on Windows, .NET Framework 4.7.1
In some cases we get the error when creating a PDF/A 2b document:
System.InvalidOperationException: Bitmap shrinking failed. ‘WPF’ (Windows Presentation Foundation for .NET 7 documentation | Microsoft Learn) was not found on the system. If the platform on which the application is running supports ‘WPF’, make sure that your project uses it. ‘System.Drawing’ (System.Drawing Namespace | Microsoft Learn) was not found on the system. If the platform on which the application is running supports ‘System.Drawing’, make sure that your project uses it. ‘SkiaSharp’ threw an exception of type ‘System.NullReferenceException’ and with message ‘Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.’. For more details about the exception, see the inner exception. ‘ImageSharp’ (GitHub - SixLabors/ImageSharp: 📷 A modern, cross-platform, 2D Graphics library for .NET) was not found on the system. If the platform on which the application is running supports ‘ImageSharp’, make sure that your project uses it. ‘GemBox’ threw an exception of type ‘System.NotSupportedException’ and with message ‘Die angegebene Methode wird nicht unterst tzt.’. —> System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt. bei .
(Stream , Double , Double , Double ) bei . . (
) bei . [TResult](Func2 , String ) --- Ende der internen Ausnahmestapel berwachung --- bei . [T](Exception[] , String ) bei . [TResult](Func
2 , String ) bei . ( ) bei . ( ) bei .
( ) bei . ( ) bei .
( , ) bei . ( , , ) bei .
( , , ) bei . ( , , ) bei . ( , , , , Boolean , Predicate`1
, ) bei .
( , Int32 , , , ,
) bei . ( , , Int32 ) bei . (Int32 , Object , Object ) bei . ( , String , Stream ) bei GemBox.Document.PdfSaveOptions.67tg5rkvl9zwp8v7723mndgzuc3b4vj8 ( , Stream , Boolean ) bei GemBox.Document.PdfSaveOptions.67tg5rkvl9zwp8v7723mndgzuc3b4vj8 (DocumentModel , Stream , String ) bei GemBox.Document.DocumentModel.Save(Stream stream, SaveOptions options)
What is the reason for the exception and what can we do against it?
We intentionally use the .NET standard variant of Gembox.Document because we create the PDFs in a server component and previously had repeated exceptions regarding the WPF dispatcher and it was also the recommendation of Gembox support to use the .NET standard variant. to avoid WPF.
Best regards
Martin Schmeller