|
|
@@ -67,9 +67,9 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-+(NSMutableDictionary*) loadControl:(NSString*)templateName
|
|
|
++(NSMutableDictionary*) loadControl:(NSString*)path
|
|
|
{
|
|
|
- NSString *path = [[NSBundle mainBundle] pathForResource:templateName ofType:nil];
|
|
|
+// NSString *path = [[NSBundle mainBundle] pathForResource:templateName ofType:nil];
|
|
|
NSData *data = [NSData dataWithContentsOfFile:path];
|
|
|
NSMutableDictionary *ret = [[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil] mutableCopy];
|
|
|
return ret;
|
|
|
@@ -114,7 +114,7 @@
|
|
|
NSString *newFilePath=[saveDirectory stringByAppendingPathComponent:saveFileName];
|
|
|
*/
|
|
|
|
|
|
- NSString *default_path = [[NSBundle mainBundle] pathForResource:file ofType:nil];
|
|
|
+ NSString *default_path = file;//[[NSBundle mainBundle] pathForResource:file ofType:nil];
|
|
|
// const char *filename=[default_path UTF8String];
|
|
|
|
|
|
NSLog(@"%@",default_path);
|
|
|
@@ -389,12 +389,14 @@ isnew:(bool)isNewDocument
|
|
|
[control_drawable setMargin_top:margin_top];
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- CGRect bg_rect= text_rect;
|
|
|
- PDFDrawable * rect_drawable = [[RectDrawable alloc] init:bg_rect color:@"0x0000ff"];
|
|
|
- if(rect_drawable)
|
|
|
- [pdfPage DirectDraw:pdfContext drawable:rect_drawable];
|
|
|
+ if(!isNewDocument)
|
|
|
+ {
|
|
|
+ CGRect bg_rect= text_rect;
|
|
|
+ PDFDrawable * rect_drawable = [[RectDrawable alloc] init:bg_rect color:@"0xffcc66"];
|
|
|
+ if(rect_drawable)
|
|
|
+ [pdfPage DirectDraw:pdfContext drawable:rect_drawable];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else if([control_type isEqualToString:@"Check"])
|
|
|
{
|