PdfWriter.GetInstance throws System.NullReferenceException
问题 I'm trying to create a pdf document using iTextSharp 5.3.4 using the following Document document = new Document(); FileStream stm = new FileStream(filename, FileMode.Create); PdfWriter writer = PdfWriter.GetInstance(document, stm); I'm getting a System.NullReferenceException with the 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