|
@@ -201,19 +201,30 @@ static NSString * const KMTableColumnSizeID = @"size";
|
|
|
self.addFiles = files;
|
|
|
self.editType = KMPDFPageEditMerge;
|
|
|
_lockFilePathArr = [[NSMutableArray alloc] init];
|
|
|
+ _files = [[NSMutableArray alloc] init];
|
|
|
|
|
|
}
|
|
|
return self;
|
|
|
}
|
|
|
|
|
|
-- (id)initWithPDFDocument:(PDFDocument *)document
|
|
|
+- (id)initWithPDFDocument:(PDFDocument *)document password:(NSString *)password
|
|
|
{
|
|
|
if (self = [super initWithWindowNibName:@"KMPDFEditAppendWindow"]) {
|
|
|
|
|
|
- self.PDFDocument = document;
|
|
|
+// self.PDFDocument = document;
|
|
|
+ self.PDFDocument = [[PDFDocument alloc] init];
|
|
|
self.editType = KMPDFPageEditAppend;
|
|
|
_lockFilePathArr = [[NSMutableArray alloc] init];
|
|
|
-
|
|
|
+ _files = [[NSMutableArray alloc] init];
|
|
|
+
|
|
|
+ KMFileAttribute *file = [[KMFileAttribute alloc] init];
|
|
|
+ file.myPDFDocument = document;
|
|
|
+ file.filePath = document.documentURL.path;
|
|
|
+ if (password && password.length > 0) {
|
|
|
+ file.password = password;
|
|
|
+ file.isLocked = YES;
|
|
|
+ }
|
|
|
+ [self.files addObject:file];
|
|
|
}
|
|
|
return self;
|
|
|
}
|
|
@@ -322,7 +333,7 @@ static NSString * const KMTableColumnSizeID = @"size";
|
|
|
self.tableView.rowHeight = 76;
|
|
|
|
|
|
_insertIndexSet = [[NSMutableIndexSet alloc] init];
|
|
|
- _files = [[NSMutableArray alloc] init];
|
|
|
+
|
|
|
[self addFiles:_addFiles];
|
|
|
|
|
|
[_progress setHidden:YES];
|