PdfDocument.IsPasswordProtected Method (Stream, PdfConfigurationOptions)

Docotic.Pdf library help > BitMiracle.Docotic.Pdf > PdfDocument Class > PdfDocument Methods > IsPasswordProtected Method > IsPasswordProtected Method (Stream, PdfConfigurationOptions)

Note: This API is now obsolete.

Determines whether the PDF document is password protected using specified configuration options.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
[ObsoleteAttribute("This method is obsolete and will be removed in the next version of the library. Please use GetEncryptionInfo instead.")]
public static bool IsPasswordProtected(
	Stream documentStream,
	PdfConfigurationOptions options
)
VB
<ObsoleteAttribute("This method is obsolete and will be removed in the next version of the library. Please use GetEncryptionInfo instead.")>
Public Shared Function IsPasswordProtected ( 
	documentStream As Stream,
	options As PdfConfigurationOptions
) As Boolean

Parameters

documentStream
Type: System.IO.Stream
The stream to read PDF document from.
options
Type: BitMiracle.Docotic.Pdf.PdfConfigurationOptions
The configuration options.

Return Value

Type: Boolean
true if PDF document is password protected; otherwise, false.

Remarks

The documentStream must be a stream that supports reading and seeking. Otherwise, the method throws an exception of PdfException type.

See Also