Compares the data and structure of two PDF documents.

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

Syntax

C#
public static bool DocumentsAreEqual(
	Stream firstDocument,
	Stream secondDocument,
	string password
)
VB
Public Shared Function DocumentsAreEqual ( 
	firstDocument As Stream,
	secondDocument As Stream,
	password As String
) As Boolean

Parameters

firstDocument
Type: System.IO.Stream
The stream to read first PDF document to compare from.
secondDocument
Type: System.IO.Stream
The stream to read second PDF document to compare from.
password
Type: System.String
The password that unlocks PDF document with applied password security.

Return Value

Type: Boolean
true if documents are equal; otherwise false

Remarks

This method is useful for regression tests when you compare two versions of the same document.

Password specified by the password parameter is used for both documents (it's assumed that both documents have the same password set or both documents have no password set). Please use empty string for password parameter if documents being compared are not protected with password.

Differences in CreationDate and ModifiedDate properties, document metadata and file trailer IDs of document being compared do not get taken into account.

See Also