public class

ComparisonDocument

extends Object
implements Parcelable
java.lang.Object
   ↳ com.pspdfkit.document.processor.ComparisonDocument

Class Overview

This class holds the data used for document comparison. Use this class to provide documents when comparing them with the show(FragmentActivity, PdfActivityConfiguration, ComparisonDocument, ComparisonDocument, File, ComparisonDialogListener) method.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ComparisonDocument> CREATOR
Public Constructors
ComparisonDocument(DocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class.
ComparisonDocument(ParcelableDocumentSource documentSource, int pageIndex, int lineColor)
Creates and initializes a ComparisonDocument class.
Public Methods
int describeContents()
DocumentSource getDocumentSource()
Returns the DocumentSource used by this comparison document.
int getLineColor()
Returns the color used for tinting strokes of the document when performing comparison.
int getPageIndex()
Returns the index of the page to use for comparison within the document.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<ComparisonDocument> CREATOR

Public Constructors

public ComparisonDocument (DocumentSource documentSource, int pageIndex, int lineColor)

Creates and initializes a ComparisonDocument class. This is a convenience override for ComparisonDocument(ParcelableDocumentSource, int, int), and will convert the given documentSource to a ParcelableDocumentSource. This method will throw an exception if documentSource is not parcelable.

Parameters
documentSource The DocumentSource to use for comparison.
pageIndex The 0-based index of the page to use for comparison.
lineColor The color to use for tinting the page content while comparing.

public ComparisonDocument (ParcelableDocumentSource documentSource, int pageIndex, int lineColor)

Creates and initializes a ComparisonDocument class.

Parameters
documentSource The DocumentSource to use for comparison.
pageIndex The 0-based index of the page to use for comparison.
lineColor The color to use for tinting the page content while comparing.

Public Methods

public int describeContents ()

public DocumentSource getDocumentSource ()

Returns the DocumentSource used by this comparison document. This source will be used to laod the document when performing point selection for document alignment, and when creating the final comparison document.

Returns

public int getLineColor ()

Returns the color used for tinting strokes of the document when performing comparison.

Returns
  • Stroke color for the compared content.

public int getPageIndex ()

Returns the index of the page to use for comparison within the document.

Returns
  • The 0-based page index in the comparison document to be compared.

public void writeToParcel (Parcel dest, int flags)