[C#] Example 1: Create a PdfFileSource

PdfFileSource exposes also an additional overload, which allows you to keep the stream you are working with open after disposing the PdfFileSource instance by passing true as a value for the second constructor parameter (leaveStreamOpen).

PdfFileSource inherits from IDisposable. Make sure the object is disposed when you are done with it. The best way to ensure this is handled properly is to wrap it in a using statement.