Beispiel #1
0
        public void TestRetrieveBasicProperties()
        {
            PdfMiniToolsCore.CoreTools  coreTest = new PdfMiniToolsCore.CoreTools();
            Dictionary <String, String> basicPropertiesDictionary = coreTest.RetrieveBasicProperties(@"..\..\Heart_of_Darkness_NT.pdf");

            Assert.True(basicPropertiesDictionary.Count == 4);
            Assert.True(basicPropertiesDictionary.ContainsKey("Page Count"));
            Assert.True(basicPropertiesDictionary.ContainsKey("Encrypted"));
            Assert.True(basicPropertiesDictionary.ContainsKey("Pdf Version"));
            Assert.True(basicPropertiesDictionary.ContainsKey("Rebuilt"));
        }
Beispiel #2
0
        public void TestEvenOddMerge()
        {
            PdfMiniToolsCore.CoreTools coreTest = new PdfMiniToolsCore.CoreTools();
            coreTest.EvenOddMerge(@"..\..\oddpagefile.pdf",
                                  @"..\..\evenpagefile.pdf",
                                  @"..\..\mergedoutput1.pdf",
                                  false);
            Dictionary<String, String> mergedFileInfo = coreTest.RetrieveBasicProperties(@"..\..\mergedoutput1.pdf");
            int pageCount = Convert.ToInt32(mergedFileInfo["Page Count"]);
            Assert.IsTrue(ArePagesIdentical(@"..\..\mergedcontrol.pdf", 1, pageCount,
                                            @"..\..\mergedoutput1.pdf", 1));

            File.Delete(@"..\..\mergedoutput1.pdf");
        }
Beispiel #3
0
        public void TestEvenOddMerge()
        {
            PdfMiniToolsCore.CoreTools coreTest = new PdfMiniToolsCore.CoreTools();
            coreTest.EvenOddMerge(@"..\..\oddpagefile.pdf",
                                  @"..\..\evenpagefile.pdf",
                                  @"..\..\mergedoutput1.pdf",
                                  false);
            Dictionary <String, String> mergedFileInfo = coreTest.RetrieveBasicProperties(@"..\..\mergedoutput1.pdf");
            int pageCount = Convert.ToInt32(mergedFileInfo["Page Count"]);

            Assert.True(ArePagesIdentical(@"..\..\mergedcontrol.pdf", 1, pageCount,
                                          @"..\..\mergedoutput1.pdf", 1));



            File.Delete(@"..\..\mergedoutput1.pdf");
        }
Beispiel #4
0
 public void TestRetrieveBasicProperties()
 {
     PdfMiniToolsCore.CoreTools coreTest = new PdfMiniToolsCore.CoreTools();
     Dictionary<String, String> basicPropertiesDictionary = coreTest.RetrieveBasicProperties(@"..\..\Heart_of_Darkness_NT.pdf");
     Assert.IsTrue(basicPropertiesDictionary.Count == 4);
     Assert.IsTrue(basicPropertiesDictionary.ContainsKey("Page Count"));
     Assert.IsTrue(basicPropertiesDictionary.ContainsKey("Encrypted"));
     Assert.IsTrue(basicPropertiesDictionary.ContainsKey("Pdf Version"));
     Assert.IsTrue(basicPropertiesDictionary.ContainsKey("Rebuilt"));
 }