PdfWriter.GetInstance抛出System.NullReferenceException [英] PdfWriter.GetInstance throws System.NullRef

https://www.it1352.com/950570.html

解决方案
Make sure you are not catching all exceptions. This NullReferenceException can very well be one that is already caught and handled inside iTextSharp, so you don’t care about it.
The fact that you can continue supports this theory.

Change the following setting to verify:

在这里插入图片描述

Debug -> Exceptions -> Remove the checkbox in the column “Thrown” of “Common Language Runtime Exceptions”.