예제 #1
0
        public static void Case4(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "filePDF2_pdf was compared with filePDF5_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDF2.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDF5.pdf";

            Comparing.ProcessComparing("Comparison with the odd pages (case 4): ", SourceFileName, TargetFileName, ResultPath);
        }
        public static void Case1(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "Source1_pdf was compared with Target1_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.Source1.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.Target1.pdf";

            Comparing.ProcessComparing("Comparison of a simple text (case 1): ", SourceFileName, TargetFileName, ResultPath);
        }
        public static void DefaultSettings(string dir)
        {
            string ResultPath = String.Format(@"{0}/{1}", dir,
                                              "DefaultSettings - filePDFSourceWithCountPages5_pdf was compared with filePDFTargetWithCountPages5_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFSourceWithCountPages5.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFTargetWithCountPages5.pdf";

            Comparing.ProcessComparing("Comparison pdf using DefaultSettings: ", SourceFileName, TargetFileName, ResultPath);
        }
        public static void Case3_Reverse(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "filePDF2_pdf was compared with filePDF1_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDF2.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDF1.pdf";

            Comparing.ProcessComparing("Comparison of a simple text (case 1, reverse): ", SourceFileName, TargetFileName,
                                       ResultPath);
        }
예제 #5
0
        public static void Case1(string dir)
        {
            string ResultPath = String.Format(@"{0}/{1}", dir,
                                              "filePDFWithTable1_pdf was compared with filePDFWithTable2_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFWithTable1.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFWithTable2.pdf";

            Comparing.ProcessComparing("Comparison of a document with tables (case 1): ", SourceFileName, TargetFileName,
                                       ResultPath);
        }
        public static void Case1(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "xForm1_pdf was compared with xForm2_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.xForm1.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.xForm2.pdf";

            Comparing.ProcessComparing("Comparison of a document with xForms (case 1): ", SourceFileName, TargetFileName,
                                       ResultPath, new PdfComparisonSettings {
                ComparisonDepth = ComparisonDepth.Words
            });
        }
        public static void DocumentsWithXFormsWhenDeletionRowsWereMovedToNextNewPage(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "SourceWith2PagesFirstIs3_pdf was compared with TargetWith2PagesFirstIs3_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.SourceWith2PagesFirstIs3.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.TargetWith2PagesFirstIs3.pdf";

            PdfComparisonSettings comparisonSettings = new PdfComparisonSettings();

            Comparing.ProcessComparing("Comparison of a document with xForms when deletion rows were moved to next new page: ", SourceFileName, TargetFileName,
                                       ResultPath, new PdfComparisonSettings {
                ComparisonDepth = ComparisonDepth.Chars
            });
        }
        public static void DocumentsWithXFormsWhenDeletionAndInsertionRows(string dir)
        {
            string ResultPath     = String.Format(@"{0}/{1}", dir, "TargetWith2PagesFirstIs3_pdf was compared with SourceWith2PagesFirstIs3_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.TargetWith2PagesFirstIs3.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.SourceWith2PagesFirstIs3.pdf";

            PdfComparisonSettings comparisonSettings = new PdfComparisonSettings();

            Comparing.ProcessComparing("Comparison of a document with xForms contains deletion and insertion rows: ", SourceFileName, TargetFileName,
                                       ResultPath, new PdfComparisonSettings {
                ComparisonDepth = ComparisonDepth.Chars
            });
        }
        public static void ComparisonDepthIsChars(string dir)
        {
            string ResultPath = String.Format(@"{0}/{1}", dir,
                                              "ComparisonDepthIsChars - Source1_pdf was compared with Target1_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.Source1.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.Target1.pdf";

            PdfComparisonSettings settings = new PdfComparisonSettings()
            {
                ComparisonDepth = ComparisonDepth.Chars
            };

            Comparing.ProcessComparing("Comparison pdf using setting of ComparisonDepth equal Chars: ", SourceFileName,
                                       TargetFileName, ResultPath, settings);
        }
        public static void ShowDeletedContentIsFalse(string dir)
        {
            string ResultPath = String.Format(@"{0}/{1}", dir,
                                              "ShowDeletedContentIsFalse - filePDFSourceWithCountPages5_pdf was compared with filePDFTargetWithCountPages5_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFSourceWithCountPages5.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFTargetWithCountPages5.pdf";

            PdfComparisonSettings settings = new PdfComparisonSettings()
            {
                ShowDeletedContent = false
            };

            Comparing.ProcessComparing("Comparison pdf using setting of ShowDeletedContent equal false: ", SourceFileName,
                                       TargetFileName, ResultPath, settings);
        }
        public static void DeletedItemsStyleIsDefined(string dir)
        {
            string ResultPath = String.Format(@"{0}/{1}", dir,
                                              "DeletedItemsStyleIsDefined - filePDFSourceWithCountPages5_pdf was compared with filePDFTargetWithCountPages5_pdf.pdf");
            string SourceFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFSourceWithCountPages5.pdf";
            string TargetFileName = "GroupDocs.Comparison.Samples.Pdf.data.filePDFTargetWithCountPages5.pdf";

            PdfComparisonSettings settings = new PdfComparisonSettings()
            {
                DeletedItemsStyle = new StyleSettings()
                {
                    Color = Color.Tomato,
                    BeginSeparatorString = "{",
                    EndSeparatorString   = "}"
                }
            };

            Comparing.ProcessComparing("Comparison pdf using setting of InsertedItemsStyle: ", SourceFileName, TargetFileName,
                                       ResultPath, settings);
        }