wpf - PdfWriter.GetInstance throws System.NullReferenceException -


i'm trying create pdf document using itextsharp 5.3.4 using following

document document = new document(); filestream stm = new filestream(filename, filemode.create); pdfwriter writer = pdfwriter.getinstance(document, stm); 

i'm getting system.nullreferenceexception following stack trace:

system.nullreferenceexception occurred hresult=-2147467261 message=la référence d'objet n'est pas définie à une instance d'un objet. source=itextsharp stacktrace:    à itextsharp.text.version.getinstance() innerexception:  

i've verified neither document nor stm null, , if select "continue" in vs12 document created - exception thrown. updated itextsharp 5.4.0 , it's still occurring. can't find information on anywhere - got ideas?

make sure not catching exceptions. nullreferenceexception can 1 caught , handled inside itextsharp, don't care it.
fact can continue supports theory.

change following setting verify:

debug -> exceptions -> remove checkbox in column "thrown" of "common language runtime exceptions".


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -