PdfDocument.DocumentsAreEqual Method (String, String, String)

Compares the data and structure of two PDF documents.

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


public static bool DocumentsAreEqual(
	string firstFile,
	string secondFile,
	string password
Public Shared Function DocumentsAreEqual ( 
	firstFile As String,
	secondFile As String,
	password As String
) As Boolean


Type: System.String
The first PDF document to compare.
Type: System.String
The second PDF document to compare.
Type: System.String
The password that unlocks PDF file with applied password security.

Return Value

Type: Boolean
true if documents are equal; otherwise false


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 files (it's assumed that both files have the same password set or both files have no password set). Please use empty string for password parameter if files 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