PdfDocument.IsPasswordProtected Method (Stream)

Note: This API is now obsolete.

Determines whether the PDF document is password protected.

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
)
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
) As Boolean

Parameters

documentStream
Type: System.IO.Stream
The stream to read PDF document from.

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