//
//  PDFPage.h
//  pdftest
//
//  Created by Ray on 10/11/16.
//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "UIKit/UIDocument.h"
#import "PDFDrawable.h"
@interface PDFPage : NSObject<PDFDrawableDelegate>
@property (nonatomic,strong) NSMutableDictionary* pageTemplate;
@property double margin_left;
@property double margin_right;
@property double margin_top;
@property double margin_bottom;

@property (nonatomic,strong) NSMutableDictionary* header;
@property (nonatomic,strong) NSMutableDictionary* footer;

@property CGRect rect;
@property CGRect drawable_rect;
@property double pos_x;
@property double pos_y;
@property double header_height;
-(instancetype) init:(NSMutableDictionary *)page size:(CGRect)rect;
-(void) Draw:(CGContextRef) context dataSource:(NSMutableDictionary*)data;
-(int) QueryPageCount:(CGContextRef) context dataSource:(NSMutableDictionary*)data;

@property (nonatomic,strong) NSMutableDictionary* data;

@property int pagecount;
-(void) DirectDraw:(CGContextRef) context page:(CGPDFPageRef)page;
-(void) DirectDraw:(CGContextRef) context drawable:(PDFDrawable*)drawable_obj;
@end
