Explorar o código

170110
1.1.170110 release version.

Ray Zhang %!s(int64=9) %!d(string=hai) anos
pai
achega
1d6f3c9724

BIN=BIN
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 37 - 21
Ants Contract/AntsContract.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -10,11 +10,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "505718653.940838"
+            timestampString = "505729887.728875"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "571"
-            endingLineNumber = "571"
+            startingLineNumber = "572"
+            endingLineNumber = "572"
             landmarkName = "@implementation PDFUtils"
             landmarkType = "3">
          </BreakpointContent>
@@ -26,11 +26,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "505718653.940838"
+            timestampString = "505729887.728875"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "519"
-            endingLineNumber = "519"
+            startingLineNumber = "520"
+            endingLineNumber = "520"
             landmarkName = "@implementation PDFUtils"
             landmarkType = "3">
          </BreakpointContent>
@@ -42,11 +42,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "505718653.940838"
+            timestampString = "505729887.728875"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "575"
-            endingLineNumber = "575"
+            startingLineNumber = "576"
+            endingLineNumber = "576"
             landmarkName = "@implementation PDFUtils"
             landmarkType = "3">
          </BreakpointContent>
@@ -58,11 +58,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "505718653.940838"
+            timestampString = "505729887.728875"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "578"
-            endingLineNumber = "578"
+            startingLineNumber = "579"
+            endingLineNumber = "579"
             landmarkName = "@implementation PDFUtils"
             landmarkType = "3">
          </BreakpointContent>
@@ -74,7 +74,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "814"
@@ -88,7 +88,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "836"
@@ -102,7 +102,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "866"
@@ -116,7 +116,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1336"
@@ -130,7 +130,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1093"
@@ -144,7 +144,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
-            timestampString = "505640759.173753"
+            timestampString = "505726864.594865"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "1499"
@@ -158,11 +158,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../RedAnt ERP Mobile/common/PDFUtils.m"
-            timestampString = "505718653.940838"
+            timestampString = "505729887.728875"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "564"
-            endingLineNumber = "564"
+            startingLineNumber = "565"
+            endingLineNumber = "565"
             landmarkName = "@implementation PDFUtils"
             landmarkType = "3">
          </BreakpointContent>
@@ -183,5 +183,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m"
+            timestampString = "505726864.594865"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "538"
+            endingLineNumber = "538"
+            landmarkName = "-Draw:dataSource:ParentRect:startX:startY:flipHeight:range:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 4 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign.xcodeproj/project.pbxproj

@@ -78,6 +78,7 @@
 		7128C3551E12548C00FF635B /* SignatureListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C34F1E12548C00FF635B /* SignatureListViewController.m */; };
 		7128C3561E12548C00FF635B /* SignatureTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7128C3511E12548C00FF635B /* SignatureTableViewCell.m */; };
 		714B87091E24AE0800A40D18 /* Test.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 714B87081E24AE0800A40D18 /* Test.storyboard */; };
+		714B870B1E24CAE300A40D18 /* debug.json in Resources */ = {isa = PBXBuildFile; fileRef = 714B870A1E24CAE200A40D18 /* debug.json */; };
 		717243441E1CCCEC00800678 /* CustomIOSAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 717243431E1CCCEC00800678 /* CustomIOSAlertView.m */; };
 		7172434A1E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */; };
 /* End PBXBuildFile section */
@@ -223,6 +224,7 @@
 		7128C3501E12548C00FF635B /* SignatureTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SignatureTableViewCell.h; path = ../../common/SignatureTableViewCell.h; sourceTree = "<group>"; };
 		7128C3511E12548C00FF635B /* SignatureTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SignatureTableViewCell.m; path = ../../common/SignatureTableViewCell.m; sourceTree = "<group>"; };
 		714B87081E24AE0800A40D18 /* Test.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Test.storyboard; sourceTree = "<group>"; };
+		714B870A1E24CAE200A40D18 /* debug.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = debug.json; sourceTree = "<group>"; };
 		717243421E1CCCEC00800678 /* CustomIOSAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CustomIOSAlertView.h; path = "../../../RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.h"; sourceTree = "<group>"; };
 		717243431E1CCCEC00800678 /* CustomIOSAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CustomIOSAlertView.m; path = "../../../RedAnt ERP Mobile/common/customUI/CustomIOSAlertView.m"; sourceTree = "<group>"; };
 		717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = "GEIC - Home Improvement Contract 2017.pdf"; path = "Granite Expo eSign/GEIC - Home Improvement Contract 2017.pdf"; sourceTree = "<group>"; };
@@ -496,6 +498,7 @@
 			isa = PBXGroup;
 			children = (
 				7115D41E1E13AC0200EF4E4C /* GEIC - Home Improvement Contract 2017.json */,
+				714B870A1E24CAE200A40D18 /* debug.json */,
 				717243491E1E208F00800678 /* GEIC - Home Improvement Contract 2017.pdf */,
 			);
 			name = "pdf resource";
@@ -577,6 +580,7 @@
 				714B87091E24AE0800A40D18 /* Test.storyboard in Resources */,
 				7128C27D1E12500B00FF635B /* signature.storyboard in Resources */,
 				7128C2E81E12511B00FF635B /* LICENSE in Resources */,
+				714B870B1E24CAE300A40D18 /* debug.json in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 5 - 0
Ants Contract/Granite Expo eSign/Granite Expo eSign/GEIC - Home Improvement Contract 2017.json

@@ -408,6 +408,7 @@
         },
         "control_20": {
             "type": "Label",
+            "textAlignment":"center",
             "required": true,
             "pos_x": 543,
             "pos_y": 917,
@@ -667,6 +668,7 @@
         },
         "control_19": {
             "type": "Label",
+            "textAlignment":"center",
             "required": true,
             "pos_x": 543,
             "pos_y": 917,
@@ -776,6 +778,7 @@
         },
         "control_9": {
             "type": "Label",
+            "textAlignment":"center",
             "required": true,
             "pos_x": 543,
             "pos_y": 917,
@@ -888,6 +891,7 @@
         },
         "control_9": {
             "type": "Label",
+            "textAlignment":"center",
             "required": true,
             "pos_x": 543,
             "pos_y": 917,
@@ -945,6 +949,7 @@
         },
         "control_4": {
             "type": "Label",
+            "textAlignment":"center",
             "required": true,
             "pos_x": 543,
             "pos_y": 917,

+ 1 - 1
Ants Contract/Granite Expo eSign/Granite Expo eSign/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundleShortVersionString</key>
 	<string>1.1</string>
 	<key>CFBundleVersion</key>
-	<string>170109</string>
+	<string>170110</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>NSAppTransportSecurity</key>

+ 2 - 2
Ants Contract/Granite Expo eSign/Granite Expo eSign/config.h

@@ -17,13 +17,13 @@
 
 //#define ENCRYPT_OFF
 
-#define NO_SAVE_VERIFY true
+#define NO_SAVE_VERIFY false
 
 #define DEBUG_PDFSIG false
 
 #define PDF_DEBUG false
 
-#define test_server
+//#define test_server
 
 #ifdef test_server
     #define  URL_ERR_LOG  @""

+ 973 - 0
Ants Contract/Granite Expo eSign/debug.json

@@ -0,0 +1,973 @@
+{
+    "count": 5,
+    "signature_name": [
+                       "Customer Initial",
+                       "Decision Maker",
+                       "Agent Of Contractor",
+                       "Homeowner",
+                       "Homeowner Print Name",
+                       "Date"
+                       ],
+    "page_0": {
+        "count": 21,
+        "control_0": {
+            "type": "Ignor",
+            "required": false,
+            "pos_x": 122,
+            "pos_y": 132,
+            "width": 522,
+            "height": 80,
+            "field": "team",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 8,
+            "cadedate": [
+                         [
+                          [
+                           "T&C",
+                           "Tan & Chan Construction Lic. B1010166, 2827 22nd Street, Oakland, CA 94606"
+                           ],
+                          [
+                           127,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "W",
+                           "WMA Construction Lic. B988052, 2888 Darius Way, San Leandro, CA 94577"
+                           ],
+                          [
+                           236,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "X",
+                           "JimXu Builder Lic. B975007, 1034 Sutter St. #5, San Francisco, CA 94109"
+                           ],
+                          [
+                           336,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "F",
+                           "F Huang Construction Inc. Lic. B1011198, 3726 Rosalee Court, Castro Valley, CA 94546"
+                           ],
+                          [
+                           428,
+                           143
+                           ]
+                          ],
+                         [
+                          [
+                           "GE",
+                           "Granite Expo Installation Inc. Lic. B896945, 3401 Mandela Pkwy, Oakland, CA 94608"
+                           ],
+                          [
+                           533,
+                           143
+                           ]
+                          ]
+                         ],
+            "value": []
+        },
+        "control_1": {
+            "aname": "Customer Name",
+            "type": "TextView","margin_left":"4",
+            
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 253,
+            "width": 183,
+            "height": 30,
+            "field": "customer_name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_2": {
+            "aname": "Job Date",
+            "type": "DatePicker","margin_left":"4",
+            "required": false,
+            "pos_x": 488,
+            "pos_y": 253,
+            "width": 156,
+            "height": 30,
+            "field": "job_date",
+            "value": "12/09/2016"
+        },
+        "control_3": {
+            "aname": "Jobsite Address",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "pos_x": 248,
+            "pos_y": 285,
+            "width": 397,
+            "height": 15,
+            "field": "job_addr",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_15": {
+            "aname": "Jobsite City",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "pos_x": 248,
+            "pos_y": 300,
+            "width": 152,
+            "height": 15,
+            "field": "job_city",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_16": {
+            "aname": "Jobsite State",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "pos_x": 432,
+            "pos_y": 300,
+            "width": 115,
+            "height": 15,
+            "field": "job_state",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_17": {
+            "aname": "Jobsite Zipcode",
+            "type": "TextView","margin_left":"1",
+            "required": true,
+            "pos_x": 570,
+            "pos_y": 300,
+            "width": 74,
+            "height": 15,
+            "field": "job_zip",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_4": {
+            "aname": "Telephone",
+            "format": "us_tel",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 317,
+            "width": 183,
+            "height": 30,
+            "field": "tel",
+            "value": "1 (555) 444 3333-12345"
+        },
+        "control_5": {
+            "aname": "Today's Date","margin_left":"4",
+            "type": "DatePicker",
+            "required": true,
+            "pos_x": 488,
+            "pos_y": 317,
+            "width": 156,
+            "height": 30,
+            "field": "today_date",
+            "value": "12/09/2016"
+        },
+        "control_6": {
+            "aname": "Contract Price",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 222,
+            "pos_y": 349,
+            "width": 183,
+            "value_type":"float",
+            "height": 30,
+            "prefix_str":"$ ",
+            "field": "contract_price",
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 2,
+                    "item_0": {
+                        "control": "control_7",
+                        "value": "*0.1"
+                    },
+                    "item_1": {
+                        "control": "control_8",
+                        "value": "*0.9"
+                    }
+                }
+            },
+            "value": "$ 1234.56"
+        },
+        "control_7": {
+            "aname": "Labor Deposit",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "pos_x": 488,
+            "pos_y": 349,
+            "width": 85,
+            "height": 30,
+            "field": "labor_deposit",
+            "value_type":"float",
+            "prefix_str":"$ ",
+            "disable": true,
+            "action": {
+                "set_val": {
+                    "condition": "true",
+                    "count": 1,
+                    "item_0": {
+                        "control": "control_8",
+                        "value": "control_6-control_7"
+                    }
+                }
+            },
+            "value": "234.00"
+        },
+        "control_18": {
+            "type": "Check",
+            "required": true,
+            "pos_x": 584,
+            "pos_y": 355,
+            "width": 40,
+            "height": 20,
+            "field": "deposit_percent",
+            "title": "team button",
+            "single_select": true,
+            "show_detail": false,
+            "size": "10",
+            "cadedate": [
+                         [
+                          [
+                           "10%"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "disable": [
+                                      "control_7"
+                                      ],
+                          "set_val": {
+                          "condition": "true",
+                          "count": 2,
+                          "item_0": {
+                          "control": "control_7",
+                          "value": "*0.1"
+                          },
+                          "item_1": {
+                          "control": "control_8",
+                          "value": "*0.9"
+                          }
+                          }
+                          }
+                          ],
+                         [
+                          [
+                           "Other"
+                           ],
+                          [],
+                          {
+                          "memo": "action",
+                          "enable": [
+                                     "control_7"
+                                     ]
+                          }
+                          ]
+                         ],
+            "value": [
+                      0
+                      ]
+        },
+        "control_8": {
+            "aname": "Balance on Account",
+            "type": "TextView","margin_left":"4",
+            "required": true,
+            "value_type":"float",
+            "pos_x": 222,
+            "pos_y": 382,
+            "width": 183,
+            "height": 40,
+            "field": "balance",
+            "disable": true,
+            "value": "999.00"
+        },
+        "control_9": {
+            "aname": "Service",
+            "type": "Check",
+            "required": true,
+            "pos_x": 122,
+            "pos_y": 538,
+            "width": 522,
+            "height": 70,
+            "field": "service",
+            "title": "service button",
+            "single_select": false,
+            "show_detail": false,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          [
+                           "Installation of Cabinetry.",
+                           ""
+                           ],
+                          [
+                           133,
+                           545
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Granite, Marble or Quartz Countertop(s).",
+                           ""
+                           ],
+                          [
+                           133,
+                           557
+                           ]
+                          ],
+                         [
+                          [
+                           "Installation of Plywood.",
+                           ""
+                           ],
+                          [
+                           133,
+                           569
+                           ]
+                          ],
+                         [
+                          [
+                           "Demolition Work.",
+                           ""
+                           ],
+                          [
+                           133,
+                           581
+                           ]
+                          ],
+                         [
+                          [
+                           "Other / Include Description:",
+                           ""
+                           ],
+                          [
+                           133,
+                           593
+                           ]
+                          ]
+                         ],
+            "value": [0,1,2,3,4]
+        },
+        "control_10": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 693,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_11": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 730,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_12": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 779,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_13": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 795,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_14": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 844,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_20": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_19": {
+            
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        }
+    },
+    "page_1": {
+        "count": 21,
+        "control_0": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 79,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_1": {
+            "aname": "Decision Maker",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 230,
+            "pos_y": 87,
+            "width": 200,
+            "height": 20,
+            "name": "Decision Maker",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_2": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 148,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_3": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 168,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_4": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 195,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_5": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 232,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_6": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 280,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_7": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 307,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_8": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 333,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_20": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 370,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_9": {
+            "aname": "Joint Seams Option",
+            "type": "Check",
+            "required": true,
+            "pos_x": 135,
+            "pos_y": 463,
+            "width": 475,
+            "height": 50,
+            "field": "joint_seams",
+            "title": "joint seams",
+            "single_select": true,
+            "show_detail": true,
+            "marker_size": 6,
+            "cadedate": [
+                         [
+                          [
+                           "OPTION A:",
+                           "Unpolished joint seams, which the Undersigned understands may not be smooth."
+                           ],
+                          [
+                           149,
+                           476
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION B",
+                           "Polished joint seams, which the Undersigned understands that color dullness or shade variation may occur."
+                           ],
+                          [
+                           149,
+                           488
+                           ]
+                          ],
+                         [
+                          [
+                           "OPTION C",
+                           "The Decision Maker will determine on-site with the assistance of the Contractor."
+                           ],
+                          [
+                           149,
+                           499
+                           ]
+                          ]
+                         ],
+            "value": [2]
+        },
+        "control_10": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 408,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_11": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 434,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_12": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 495,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_13": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 533,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_14": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 592,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_15": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 609,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_16": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 626,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_19": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_18": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        }
+    },
+    "page_2": {
+        "count": 10,
+        "control_0": {
+            "aname": "Agent Signature",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 143,
+            "pos_y": 746,
+            "width": 200,
+            "height": 45,
+            "name": "Agent Of Contractor",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_1": {
+            "aname": "Homeowner Signature",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 385,
+            "pos_y": 746,
+            "width": 240,
+            "height": 45,
+            "name": "Homeowner",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_2": {
+            "aname": "Agent Name",
+            "type": "TextView",
+            "textAlignment":"center",
+            "size":"10",
+            "required": true,
+            "pos_x": 194,
+            "pos_y": 803,
+            "width": 160,
+            "height": 14,
+            "field": "agent_name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_3": {
+            "aname": "Print Name",
+            "type": "TextView",
+            "textAlignment":"center",
+            "size":"10",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 803,
+            "width": 165,
+            "height": 14,
+            "field": "customer_name_1",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_4": {
+            "type": "Ignor",
+            "required": false,
+            "pos_x": 194,
+            "pos_y": 818,
+            "width": 160,
+            "height": 14,
+            "field": "signor_name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_5": {
+            "aname": "Homeowner Name",
+            "type": "TextView",
+            "textAlignment":"center",
+            "required": true,
+            "size":"10",
+            "pos_x": 472,
+            "pos_y": 818,
+            "width": 165,
+            "height": 14,
+            "field": "owner_name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_6": {
+            "aname": "Telephone Number",
+            "format": "us_tel",
+            "type": "TextView",
+            "textAlignment":"center",
+            "size":"10",
+            "required": true,
+            "pos_x": 472,
+            "pos_y": 834,
+            "width": 165,
+            "height": 14,
+            "field": "tel1",
+            "value": "1 (555) 444 3333-12345"
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        }
+    },
+    "page_3": {
+        "count": 10,
+        "control_0": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 644,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_1": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 660,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_2": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 687,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_3": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 724,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_4": {
+            "aname": "Initial",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 615,
+            "pos_y": 762,
+            "width": 30,
+            "height": 15,
+            "name": "Customer Initial",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_5": {
+            "aname": "Homeowner Signature",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 132,
+            "pos_y": 808,
+            "width": 185,
+            "height": 24,
+            "name": "Homeowner",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_6": {
+            "aname": "Handwrite Print name",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 352,
+            "pos_y": 808,
+            "width": 183,
+            "height": 24,
+            "name": "Homeowner Print Name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_7": {
+            "aname": "Handwrite Date",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 566,
+            "pos_y": 808,
+            "width": 60,
+            "height": 24,
+            "name": "Date",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_9": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_8": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        }
+    },
+    "page_4": {
+        "count": 5,
+        "control_0": {
+            "aname": "Homeowner Signature",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 127,
+            "pos_y": 537,
+            "width": 146,
+            "height": 40,
+            "name": "Homeowner",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_1": {
+            "aname": "Handwrite Print Name",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 326,
+            "pos_y": 537,
+            "width": 148,
+            "height": 40,
+            "name": "Homeowner Print Name",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_2": {
+            "aname": "Handwrite date",
+            "type": "Signature",
+            "required": true,
+            "pos_x": 546,
+            "pos_y": 537,
+            "width": 75,
+            "height": 40,
+            "name": "Date",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_4": {
+            "type": "Label",
+            "textAlignment":"center",
+            "required": true,
+            "pos_x": 543,
+            "pos_y": 917,
+            "width": 64,
+            "size": "8",
+            "height": 11,
+            "field": "doc_number",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        },
+        "control_3": {
+            "type": "Image",
+            "required": true,
+            "pos_x": 500,
+            "pos_y": 898,
+            "width": 150,
+            "height": 22,
+            "name": "BarCode",
+            "value": "TEST TEXT VIEW VALUE , length test 123 456 789 000- abcdefg hijklmn opqrstuv wxyz"
+        }
+    }
+}

+ 61 - 58
Ants Contract/common/AppDelegate.m

@@ -37,66 +37,69 @@
     printf("function test======================");
 //    NSString* pdffile = [PDFUtils SavePDF:nil source:nil window_rect:CGRectMake(0, 0, 768, 960)];
 
-    //[PDFUtils leak_test];
+//    [PDFUtils leak_test];
     
 
-    //获取路径
-//    
-//    NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//坐标
-//    
-//    NSString *saveDirectory=[paths objectAtIndex:0];
-//    
-//    NSString *saveFileName=[NSString stringWithFormat:@"%@.pdf",[[NSUUID UUID ] UUIDString] ] ;;
-//    
-//    NSString *newFilePath=[saveDirectory stringByAppendingPathComponent:saveFileName];
-//    
-//    const char *filename=[newFilePath UTF8String];
-//    
-//    NSLog(@"%@",newFilePath);
-//    //设置页面大小 Letter纸
-//    
-//
-//    
-//    
-//    CFStringRef path;
-//    
-//    CFURLRef url;
-//    
-//    path=CFStringCreateWithCString(NULL, filename, kCFStringEncodingUTF8);
-//    
-//    url=CFURLCreateWithFileSystemPath(NULL, path, kCFURLPOSIXPathStyle, 0);
-//    
-//    CFBridgingRelease(path);
-//    // CGPDFCONTEXTCREATE
-//    
-//    
-//    CGContextRef pdfContext;
-//    CGRect docsize = CGRectMake(0, 0, 612, 1008);
-//    
-//    
-//    CFMutableDictionaryRef myDictionary = NULL;
-//    myDictionary= CFDictionaryCreateMutable(NULL,
-//                                            0,
-//                                            &kCFTypeDictionaryKeyCallBacks,
-//                                            &kCFTypeDictionaryValueCallBacks);
-//
-//    CFDictionarySetValue(myDictionary, kCGPDFContextOwnerPassword, CFSTR("usai2010"));
-//    CFDictionarySetValue(myDictionary, kCGPDFContextAllowsPrinting, kCFBooleanTrue);
-//    CFDictionarySetValue(myDictionary, kCGPDFContextAllowsCopying, kCFBooleanFalse);
-//    
-//    
-//    
-//    pdfContext=CGPDFContextCreateWithURL(url, &docsize,myDictionary);
-//    
-//    CFRelease(myDictionary);
-//    CFBridgingRelease(url);
-//    
-//    
-//    
-//
-//    CGContextRelease(pdfContext);
-//
-//    
+//    获取路径
+    
+    NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//坐标
+    
+    NSString *saveDirectory=[paths objectAtIndex:0];
+    
+    NSString *saveFileName=[NSString stringWithFormat:@"%@.pdf",[[NSUUID UUID ] UUIDString] ] ;;
+    
+    NSString *newFilePath=[saveDirectory stringByAppendingPathComponent:saveFileName];
+    
+    const char *filename=[newFilePath UTF8String];
+    
+    NSLog(@"%@",newFilePath);
+    //设置页面大小 Letter纸
+    
+
+    
+    
+    CFStringRef path;
+    
+    CFURLRef url;
+    
+    path=CFStringCreateWithCString(NULL, filename, kCFStringEncodingUTF8);
+    
+    url=CFURLCreateWithFileSystemPath(NULL, path, kCFURLPOSIXPathStyle, 0);
+    
+    CFRelease(path);
+    // CGPDFCONTEXTCREATE
+    
+    
+    CGContextRef pdfContext;
+    CGRect docsize = CGRectMake(0, 0, 612, 1008);
+    
+    
+    CFMutableDictionaryRef myDictionary = NULL;
+    myDictionary= CFDictionaryCreateMutable(NULL,
+                                            0,
+                                            NULL,
+                                            NULL);
+
+    CFDictionarySetValue(myDictionary, kCGPDFContextOwnerPassword, CFSTR("usai2010"));
+    CFDictionarySetValue(myDictionary, kCGPDFContextAllowsPrinting, kCFBooleanTrue);
+    CFDictionarySetValue(myDictionary, kCGPDFContextAllowsCopying, kCFBooleanFalse);
+    
+    
+    
+    pdfContext=CGPDFContextCreateWithURL(url, &docsize,myDictionary);
+    
+    CFRelease(myDictionary);
+    CFRelease(url);
+    CGContextBeginPage(pdfContext, &docsize);
+//    cgpdfpage
+    
+    CGContextEndPage(pdfContext);
+    
+    CGPDFContextClose(pdfContext);
+
+    CGContextRelease(pdfContext);
+
+    
 
     
     return ;

+ 7 - 3
Ants Contract/common/DocumentPageViewController.m

@@ -305,12 +305,16 @@
     if([self verifyData]==false)
         return;
     
+    NSString* pdffile = nil;
+    NSString* zipfile = nil;
     
-    NSString* pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960)];
-    
+   // for(int l=0;l<1;l++)
+    {
+     pdffile = [PDFUtils SavePDF:self.controlTemplate source:self.document window_rect:CGRectMake(0, 0, 768, 960)];
     
-    NSString* zipfile=[ACNetwork prepareUploadFile:pdffile json:self.controlTemplate];
     
+     zipfile=[ACNetwork prepareUploadFile:pdffile json:self.controlTemplate];
+    }
     
     
     

+ 3 - 1
Ants Contract/common/RootViewController.m

@@ -134,6 +134,7 @@
             {
                 DocumentPageViewController* dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"DocumentPageViewController" ];
                 
+//                dvc.templateName = @"debug.json";
                 dvc.templateName = @"GEIC - Home Improvement Contract 2017.json";
                 dvc.pdfName = @"GEIC - Home Improvement Contract 2017.pdf";
                 dvc.docment_id = json[@"doc_number"];
@@ -290,7 +291,8 @@
 
 -(void) previewPDF:(NSString*)file
 {
-    return;
+//    return;
+    
     NSString* name=@"";//[self.content_data[indexPath.row] valueForKey:@"tear_name"];
     NSString* url= file;//[self.content_data[indexPath.row] valueForKey:@"pdf_path"];