Browse Source

compdfkit(win)

liuaoran 1 year ago
parent
commit
bdb08d3c70

+ 20 - 19
Demo/Examples/Samples/HeaderFooterTest/HeaderFooterTest.cs

@@ -38,38 +38,37 @@ namespace HeaderFooterTest
             #region Add common header and footer
             if (AddCommonHeaderFooter(document))
             {
-                Console.WriteLine("Add common header and footer done.\n");
+                Console.WriteLine("Add common header and footer done.");
             }
             else
             {
-                Console.WriteLine("Add common header and footer failed.\n");
-            }
-            Console.WriteLine();
+                Console.WriteLine("Add common header and footer failed.");
+            } 
             #endregion
-
+            Console.WriteLine("--------------------");
             #region Add page header and footer 
             if (AddPageHeaderFooter(document))
             {
-                Console.WriteLine("Add page header and footer done.\n");
+                Console.WriteLine("Add page header and footer done.");
             }
             else
             {
-                Console.WriteLine("Add page header and footer failed.\n");
-            }
-            Console.WriteLine();
+                Console.WriteLine("Add page header and footer failed.");
+            } 
             #endregion
+            Console.WriteLine("--------------------");
 
             #region Edit header and footer 
             if (EditHeaderFooter(document))
             {
-                Console.WriteLine("Edit header and footer done.\n");
+                Console.WriteLine("Edit header and footer done.");
             }
             else
             {
-                Console.WriteLine("Edit header and footer failed.\n");
-            }
-            Console.WriteLine();
+                Console.WriteLine("Edit header and footer failed.");
+            } 
             #endregion
+            Console.WriteLine("--------------------");
 
             #region Delete header and footer 
             if (DeleteHeaderFooter(document))
@@ -116,7 +115,7 @@ namespace HeaderFooterTest
             headerFooter.Update();
 
             // Save to pointed path so you can observe the effect.
-            string addHeaderFooterPath = outputPath + "\\Blank Page_AddCommonHeaderFooter.pdf";
+            string addHeaderFooterPath = outputPath + "\\AddCommonHeaderFooterTest.pdf";
 
             if (document.WriteToFilePath(addHeaderFooterPath))
             {
@@ -152,7 +151,7 @@ namespace HeaderFooterTest
             headerFooter.Update();
 
             // Save to pointed path so you can observe the effect.
-            string addHeaderFooterPath = outputPath + "\\Blank Page_AddPageHeaderFooter.pdf";
+            string addHeaderFooterPath = outputPath + "\\AddPageHeaderFooterTest.pdf";
 
             if (document.WriteToFilePath(addHeaderFooterPath))
             {
@@ -175,7 +174,7 @@ namespace HeaderFooterTest
 
             if (headerFooter.GetText(0) != string.Empty)
             {
-                Console.WriteLine("Get head and footer 0 succeeded, text is {0}", headerFooter.GetText(0));
+                Console.WriteLine("Get old head and footer 0 succeeded, text is {0}", headerFooter.GetText(0));
             }
             else
             {
@@ -183,11 +182,13 @@ namespace HeaderFooterTest
                 return false;
             }
 
-            headerFooter.SetText(0, "PDF SDK");
+            headerFooter.SetText(0, "ComPDFKit Samples");
 
             headerFooter.Update();
 
-            string editHeaderFooterPath = outputPath + "\\Blank Page_EditHeaderFooter.pdf";
+            Console.WriteLine("Change head and footer 0 succeeded, new text is {0}", headerFooter.GetText(0));
+
+            string editHeaderFooterPath = outputPath + "\\EditHeaderFooterTest.pdf";
 
             if (document.WriteToFilePath(editHeaderFooterPath))
             {
@@ -206,7 +207,7 @@ namespace HeaderFooterTest
 
             headerFooter.Clear();
 
-            string deleteHeaderFooterPath = outputPath + "\\Blank Page_DeleteHeaderFooter.pdf";
+            string deleteHeaderFooterPath = outputPath + "\\DeleteHeaderFooterTest.pdf";
 
             if (document.WriteToFilePath(deleteHeaderFooterPath))
             {

BIN
Demo/Examples/Samples/Output/Bates/Blank Page_AddBates.pdf


BIN
Demo/Examples/Samples/Output/HeaderFooter/Blank Page_AddCommonHeaderFooter.pdf


BIN
Demo/Examples/Samples/Output/HeaderFooter/Blank Page_AddHeaderFooter.pdf


BIN
Demo/Examples/Samples/Output/HeaderFooter/Blank Page_AddPageHeaderFooter.pdf


BIN
Demo/Examples/Samples/Output/HeaderFooter/Blank Page_DeleteHeaderFooter.pdf


BIN
Demo/Examples/Samples/Output/HeaderFooter/Blank Page_EditHeaderFooter.pdf