PdfDocument.DocumentsAreEqual Method (String, String)

Compares the data and structure of two not encrypted PDF documents.

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

Syntax

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

Parameters

firstFile
Type: System.String
The name of the first PDF file.
secondFile
Type: System.String
The name of the second PDF file.

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.

This method can only compare not encrypted files. To compare encrypted documents please use an overload that accepts parameter of PdfDecryptionHandler type.

This method ignores time-dependent document properties like CreationDate and ModifiedDate. Document metadata, trailer IDs and some other auto-generated properties are also get ignored.

See Also