-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPDFParser.h
114 lines (76 loc) · 2.4 KB
/
PDFParser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#import <Foundation/Foundation.h>
#import "PDFStream.h"
#import "PDFEncryptionHandler.h"
extern NSString *PDFWrongMagicException;
extern NSString *PDFInvalidFormatException;
extern NSString *PDFParserException;
@interface PDFParser:NSObject
{
CSHandle *fh;
NSMutableDictionary *objdict;
NSMutableArray *unresolved;
NSDictionary *trailerdict;
PDFEncryptionHandler *encryption;
}
+(PDFParser *)parserWithHandle:(CSHandle *)handle;
+(PDFParser *)parserForPath:(NSString *)path;
-(id)initWithHandle:(CSHandle *)handle;
-(void)dealloc;
-(BOOL)isEncrypted;
-(BOOL)needsPassword;
-(BOOL)setPassword:(NSString *)password;
-(NSDictionary *)objectDictionary;
-(NSDictionary *)trailerDictionary;
-(NSDictionary *)rootDictionary;
-(NSDictionary *)infoDictionary;
-(NSData *)permanentID;
-(NSData *)currentID;
-(NSDictionary *)pagesRoot;
-(PDFEncryptionHandler *)encryptionHandler;
-(void)parse;
-(NSDictionary *)parsePDFXref;
-(int)parseSimpleInteger;
-(id)parsePDFObject;
-(id)parsePDFTypeWithParent:(PDFObjectReference *)parent;
-(NSNull *)parsePDFNull;
-(NSNumber *)parsePDFBoolStartingWith:(int)c;
-(NSNumber *)parsePDFNumberStartingWith:(int)c;
-(NSString *)parsePDFWord;
-(NSString *)parsePDFStringWithParent:(PDFObjectReference *)parent;
-(NSData *)parsePDFHexStringStartingWith:(int)c parent:(PDFObjectReference *)parent;
-(NSArray *)parsePDFArrayWithParent:(PDFObjectReference *)parent;
-(NSDictionary *)parsePDFDictionaryWithParent:(PDFObjectReference *)parent;
-(void)resolveIndirectObjects;
-(void)_raiseParserException:(NSString *)error;
@end
@interface PDFString:NSObject <NSCopying>
{
NSData *data;
PDFObjectReference *ref;
PDFParser *parser;
}
-(id)initWithData:(NSData *)bytes parent:(PDFObjectReference *)parent parser:(PDFParser *)owner;
-(void)dealloc;
-(NSData *)data;
-(PDFObjectReference *)reference;
-(NSData *)rawData;
-(NSString *)string;
-(BOOL)isEqual:(id)other;
-(unsigned)hash;
-(id)copyWithZone:(NSZone *)zone;
-(NSString *)description;
@end
@interface PDFObjectReference:NSObject <NSCopying>
{
int num,gen;
}
+(PDFObjectReference *)referenceWithNumber:(int)objnum generation:(int)objgen;
+(PDFObjectReference *)referenceWithNumberObject:(NSNumber *)objnum generationObject:(NSNumber *)objgen;
-(id)initWithNumber:(int)objnum generation:(int)objgen;
-(int)number;
-(int)generation;
-(BOOL)isEqual:(id)other;
-(unsigned)hash;
-(id)copyWithZone:(NSZone *)zone;
-(NSString *)description;
@end