using inetsoftware.Pdfc; using inetsoftware.Pdfc.Presenter; using System; namespace inetsoftware.PdfcSamples { /// /// A simple sample for printing the result of the comparison of 2 PDF Files /// Expected 2 arguments, the path of the PDF files /// public class SimpleCompareAndPrint { static SimpleCompareAndPrint() { // Activate the license once from environment if required. string key = Environment.GetEnvironmentVariable("PDFC_KEY"); if (!string.IsNullOrEmpty(key)) { PDFC.ActivateLicense(key); } } /// /// Start the sample, to show the printing function of the result of comparison between 2 PDF files /// /// Expected 2 arguments, the path of the PDF files. public static void Main(string[] args) { if (args == null || args.Length != 2) { throw new ArgumentException("Usage: "); } using (new PDFComparer() .AddPresenter(new DifferencesPrintPresenter(null)) // use the default printer .Compare(args[0], args[1])) { } } } }