I’m evaluating your product and I’m trying to print a simple pdf document with your API using.
.net 5.0 console app
Gembox.PDF version 17.0.1158
Here’s the error:
System.NullReferenceException: Object reference not set to an instance of an object.
at ↨☼:slight_smile:…ctor(☼▬:slight_smile:→:slight_smile: , ↓→ , Boolean)
at↨☼:slight_smile:.(PdfPage , DrawingContext , ↨☼:slight_smile: )
at GemBox.Pdf.PdfDocument.ktm3ttmlywtl2umptgpdf3th2yxdf47r↓►:slight_smile:(Int32 , Object , Object )
at ♫§→.(♫►→ , Int32 , Object )
at ♫§→..GetPage(Int32 )
at System.Windows.Xps.Serialization.XpsOMDocumentPaginatorSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
at System.Windows.Xps.Serialization.XpsOMDocumentPaginatorSerializer.SerializeObject(Object serializedObject)
at System.Windows.Xps.Serialization.XpsOMSerializationManager.SaveAsXaml(Object serializedObject)
at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
at System.Windows.Xps.XpsDocumentWriter.Write(DocumentPaginator documentPaginator, PrintTicket printTicket)
at ▬→..↓►:slight_smile:(♫►→ )
at ♫§→§→↓►:slight_smile:(♫►→ , String , Stream )
at GemBox.Pdf.PdfDocument.Print(String printerName, PrintOptions options)
at GemBox.Pdf.PdfDocument.Print(String printerName)
Here’s my code:
I’ve added usewpf set tot true and specifying the net version with windows like net5.0-windows7.0.
I would appreciate any help.
Patrick