|
|
@@ -257,12 +257,13 @@
|
|
|
|
|
|
|
|
|
CFDictionarySetValue(myDictionary, kCGPDFContextOwnerPassword, CFSTR("usai2010"));
|
|
|
+// CFDictionarySetValue(myDictionary, kCGPDFContextUserPassword, CFSTR("usai2010"));
|
|
|
CFDictionarySetValue(myDictionary, kCGPDFContextAllowsPrinting, kCFBooleanTrue);
|
|
|
CFDictionarySetValue(myDictionary, kCGPDFContextAllowsCopying, kCFBooleanFalse);
|
|
|
|
|
|
//
|
|
|
|
|
|
- pdfContext=CGPDFContextCreateWithURL(url, &docsize,myDictionary);
|
|
|
+ pdfContext=CGPDFContextCreateWithURL(url, &docsize,nil);
|
|
|
|
|
|
CFRelease(myDictionary);
|
|
|
CFRelease(url);
|
|
|
@@ -271,7 +272,7 @@
|
|
|
|
|
|
|
|
|
size_t page_count=CGPDFDocumentGetNumberOfPages(document);
|
|
|
- for(int i=1;i<=page_count*0;i++)
|
|
|
+ for(int i=1;i<=page_count;i++)
|
|
|
{
|
|
|
int p = (i+4)%5+1;
|
|
|
NSMutableDictionary* page_control=controlTemplate[[NSString stringWithFormat:@"page_%d",p-1]];
|
|
|
@@ -309,6 +310,7 @@
|
|
|
}
|
|
|
else if([control_type isEqualToString:@"TextView"]||[control_type isEqualToString:@"Label"]||[control_type isEqualToString:@"DatePicker"])
|
|
|
{
|
|
|
+ continue;
|
|
|
|
|
|
NSString* value = control[@"value"];
|
|
|
if(value.length==0)
|
|
|
@@ -339,6 +341,7 @@
|
|
|
NSArray* marker=cadedate[[value[c] intValue]];
|
|
|
if(marker.count>=3)
|
|
|
{
|
|
|
+ continue;
|
|
|
NSString* value = marker[0][0];
|
|
|
if(value.length==0)
|
|
|
continue;
|
|
|
@@ -350,6 +353,7 @@
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ continue;
|
|
|
CGRect marker_rect= CGRectMake([marker[1][0] floatValue] ,[marker[1][1] floatValue], marker_size, marker_size);
|
|
|
PDFDrawable * marker_drawable = [[RectDrawable alloc] init:[self WindowRect2PDFRect:marker_rect pdf_rect:papersize window_size:window_rect.size] color:@"0x000000"];
|
|
|
if(marker_drawable)
|