• API Documentation
  • i-net PDFC
  • i-net /// software
  • inetsoftware.Pdfc
  • PDFComparer
Search Results for

    Show / Hide Table of Contents
    • inetsoftware.Config
      • Configuration
      • ConfigurationManager
    • inetsoftware.Pdfc
      • PDFC
      • PDFComparer
    • inetsoftware.Pdfc.Config
      • DefaultProfileID
      • PDFCProperty
      • PDFCVisibility
    • inetsoftware.Pdfc.Error
      • ExceptionData
      • PresenterExceptionData
    • inetsoftware.Pdfc.Generator.Message
      • InfoData
    • inetsoftware.Pdfc.Generator.Model
      • ModificationType
      • ModificationType.Type
    • inetsoftware.Pdfc.Presenter
      • BasePresenter
      • ConsolePresenter
      • DifferencesPDFPresenter
      • DifferencesPNGPresenter
      • DifferencesPrintPresenter
      • ExportFilePresenter
      • ExportPresenter
      • JsonPresenter
      • ReportPDFPresenter
      • ReportPresenter
    • inetsoftware.Pdfc.Results
      • Diff
      • DiffGroups
      • ResultModel
    • inetsoftware.ProcessBridge
      • ProcessConfig
      • ProcessException
    • inetsoftware.ProcessBridge.Handler
      • BridgedObject
      • RefObject

    Class PDFComparer

    This is the main entry point when using i-net PDFC API. The PDFComparer can compare two files or folders and allows the user to add presenters to show the result.

    Inheritance
    System.Object
    BridgedObject
    PDFComparer
    Inherited Members
    BridgedObject.Equals(Object)
    BridgedObject.GetHashCode()
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: inetsoftware.Pdfc
    Assembly: inetsoftware.Pdfc.dll
    Syntax
    public class PDFComparer : BridgedObject
    Examples

    Typical Usage:

    IDictionary<string,string> profile = new Dictionary<string, string>();
    profile[PDFCProperty.COMPARE_TYPES] = "TEXT";
    
    PDFComparer comparer = new PDFComparer();
    comparer.SetProfile( profile );
    comparer.AddPresenter( new ConsolePresenter() );
    comparer.Compare( "file1.pdf", "file2.pdf" )

    Constructors

    PDFComparer()

    Creates an empty comparer instance.

    Declaration
    public PDFComparer()

    Methods

    AddPresenter(BasePresenter)

    Adds a Presenter to this instance. A presenter is responsible to 'present' the comparison result, like print found differences on the console or create difference images.

    Declaration
    public PDFComparer AddPresenter(BasePresenter presenter)
    Parameters
    Type Name Description
    BasePresenter presenter

    The presenter to add, must not be null.

    Returns
    Type Description
    PDFComparer

    This comparer for a builder pattern.

    BatchCompare(String, String)

    Compare the two given directories located on the file system. Always comparing with the same filename. At least one presenter must registered for BatchCompare because it does not return a result object!

    Declaration
    public void BatchCompare(string directory1, string directory2)
    Parameters
    Type Name Description
    System.String directory1

    The first directory with documents to compare, make sure to have reader plugin for the type of document

    System.String directory2

    The second directory with documents to compare, make sure to have reader plugin for the type of document

    Compare(String, Byte[], String, Byte[])

    Compare the content of two given documents asynchronously. This method call is not blocking. Calls to the ResultModel will block until the comparison has finished.

    Declaration
    public ResultModel Compare(string name1, byte[] content1, string name2, byte[] content2)
    Parameters
    Type Name Description
    System.String name1

    The first document name for logging and error messages.

    System.Byte[] content1

    The content of the first document.

    System.String name2

    The second document name for logging and error messages.

    System.Byte[] content2

    The content of the second document.

    Returns
    Type Description
    ResultModel

    A ResultModel containing result-information about the comparison.

    Compare(String, String)

    Compare the two given files located on the file system asynchronously. This method call is not blocking. Calls to the ResultModel will block until the comparison has finished.

    Declaration
    public ResultModel Compare(string file1, string file2)
    Parameters
    Type Name Description
    System.String file1

    The first document to compare, make sure to have reader plugin for the type of document

    System.String file2

    The second document to compare, make sure to have reader plugin for the type of document

    Returns
    Type Description
    ResultModel

    A ResultModel containing result-information about the comparison.

    GetPresenterExceptions()

    Return the last exception for the presenter.

    Declaration
    public PresenterExceptionData[] GetPresenterExceptions()
    Returns
    Type Description
    PresenterExceptionData[]

    The last exception of the presenter

    LoadProfile(String)

    Load a profile from an XML file and set it in this comparer.

    Declaration
    public PDFComparer LoadProfile(string profileFile)
    Parameters
    Type Name Description
    System.String profileFile

    The file name

    Returns
    Type Description
    PDFComparer

    This comparer for a builder pattern.

    SetProfile(IDictionary<String, String>)

    Set PDFC profile properties.

    Declaration
    public PDFComparer SetProfile(IDictionary<string, string> profile)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> profile

    The key/values of the profile

    Returns
    Type Description
    PDFComparer

    This comparer for a builder pattern.

    See Also
    PDFCProperty

    SetProfile(String)

    Set a default profile with its ID.

    Declaration
    public PDFComparer SetProfile(string profile)
    Parameters
    Type Name Description
    System.String profile

    The ID of an existing profile.

    Returns
    Type Description
    PDFComparer

    This comparer for a builder pattern.

    See Also
    DefaultProfileID

    SetSettings(IDictionary<String, String>)

    Set PDFC setting for visibility output.

    Declaration
    public PDFComparer SetSettings(IDictionary<string, string> setting)
    Parameters
    Type Name Description
    System.Collections.Generic.IDictionary<System.String, System.String> setting

    The key/values of the setting

    Returns
    Type Description
    PDFComparer

    This comparer for a builder pattern.

    See Also
    PDFCVisibility
    In This Article
    • Constructors
      • PDFComparer()
    • Methods
      • AddPresenter(BasePresenter)
      • BatchCompare(String, String)
      • Compare(String, Byte[], String, Byte[])
      • Compare(String, String)
      • GetPresenterExceptions()
      • LoadProfile(String)
      • SetProfile(IDictionary<String, String>)
      • SetProfile(String)
      • SetSettings(IDictionary<String, String>)
    Back to top Copyright © 2010-2025 i-net software GmbH