VintaSoft Imaging .NET SDK 11.0
Vintasoft.Imaging.Pdf Namespace / PdfDocument Class / PdfDocument Constructor / PdfDocument Constructor(Stream,PdfFormat,EncryptionSystem,Boolean)
The stream with PDF document.
Format of new PDF document.
Encryption system of new PDF document.
The flag indicating whether the stream dispose after use, or not.



In This Topic
    PdfDocument Constructor(Stream,PdfFormat,EncryptionSystem,Boolean)
    In This Topic
    Initializes a new instance of the PdfDocument class from the specified stream.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal stream As Stream, _
       ByVal format As PdfFormat, _
       ByVal encryptionSystem As EncryptionSystem, _
       ByVal disposeStreamAfterUse As Boolean _
    )
    public PdfDocument( 
       Stream stream,
       PdfFormat format,
       EncryptionSystem encryptionSystem,
       bool disposeStreamAfterUse
    )
    public: PdfDocument( 
       Stream* stream,
       PdfFormat* format,
       EncryptionSystem* encryptionSystem,
       bool disposeStreamAfterUse
    )
    public:
    PdfDocument( 
       Stream^ stream,
       PdfFormat^ format,
       EncryptionSystem^ encryptionSystem,
       bool disposeStreamAfterUse
    )

    Parameters

    stream
    The stream with PDF document.
    format
    Format of new PDF document.
    encryptionSystem
    Encryption system of new PDF document.
    disposeStreamAfterUse
    The flag indicating whether the stream dispose after use, or not.
    Exceptions
    ExceptionDescription
    Thrown if stream data is not correct.
    Thrown if format is PdfFormat.Pdf_A. Use ConvertDocument(PdfDocumentConformance) method to convert document to PDF/A.
    Remarks
    This constructor opens an existing PDF document from the stream with access mode of the stream if stream length is 0.
    This constructor creates new PDF document in the stream if stream length is 0. Stream must have read-write access.
    Requirements

    Target Platforms: .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also