// NOTE: Overlay two PDF files and give the visual color diff between them // Used to review two document revisions or drawing blueprints that are overlayed with updated data private async void ProcessVisualDiff() { var docA = mPDFViewCtrlA.GetDoc(); var docB = mPDFViewCtrlB.GetDoc(); DiffOptions diffOptions = new DiffOptions(); diffOptions.SetColorA(new ColorPt(1, 0, 0)); diffOptions.SetColorB(new ColorPt(0, 0, 0)); diffOptions.SetBlendMode(GStateBlendMode.e_bl_normal); pdftron.PDF.Page docAPage = docA.GetPage(1); pdftron.PDF.Page docBPage = docB.GetPage(1); try { PDFDoc outputDocument = new PDFDoc(); outputDocument.AppendVisualDiff(docAPage, docBPage, diffOptions); Controls.PDFResultDialog contentDialog = new Controls.PDFResultDialog(); var pdfCompare = new PDFCompareResult(outputDocument); pdfCompare.CloseButtonClicked += delegate { contentDialog.Hide(); }; contentDialog.Content = pdfCompare; await contentDialog.ShowAsync(); } catch (Exception ex) { } }
private async void ProcessTextDiff() { var docA = mPDFViewCtrlA.GetDoc(); var docB = mPDFViewCtrlB.GetDoc(); try { PDFDoc outputDocument = new PDFDoc(); outputDocument.AppendTextDiff(docA, docB); Controls.PDFResultDialog contentDialog = new Controls.PDFResultDialog(); var pdfCompare = new PDFCompareResult(outputDocument); pdfCompare.SetPresentationMode(PDFViewCtrlPagePresentationMode.e_facing_continuous); contentDialog.Content = pdfCompare; pdfCompare.CloseButtonClicked += delegate { contentDialog.Hide(); }; await contentDialog.ShowAsync(); } catch (Exception ex) { } }