DcsEncodeParameter

protocol DcsEncodeParameter

A protocol for image encoding and decoding.

DcsPNGEncodeParameter: NSObject

A class for PNG encoding and decoding.

DcsJPEGEncodeParameter: NSObject

A class for JPEG encoding and decoding.

Property Description
(nonatomic, assign) CGFloat quality Returns or sets the quality of JPEG files. Value ranges from 0.1 to 1.0 and the default value is 0.75.

DcsPDFEncodeParameter: NSObject

A class for PDF encoding and decoding.

Property Description
(nonatomic,strong) NSString * author Returns or sets the name of the author that creates the PDF document. The default value is nil.
(nonatomic,strong) NSString * creator Returns or sets the name of the application that created the original document. The default value is nil.
(nonatomic,strong) NSString * subject Returns or sets the subject of the PDF document. The default value is nil.
(nonatomic,strong) NSString * keywords Returns or sets the keywords associated with the PDF document. The default value is nil.
(nonatomic,strong) NSString * title Returns or sets the title of the PDF document. The default value is nil.
(nonatomic,assign) CGSize pageSize Returns or sets the page size of the PDF document. The default value is Letter (612, 792).
(nonatomic, assign) CGSize pageSize
Description Returns or sets the page size of the PDF document. The default value is Letter(612, 792).
Remarks The common page size settings are A3(842,1191), A4(595, 842), Letter(612,792), Legal(612,1008), etc. The unit of width and height is pt (1 pt = 1/72 inch).

Example

DcsPDFEncodeParameter  *PDFEncodeParameter = [[DcsPDFEncodeParameter alloc]init];

PDFEncodeParameter.pageSize = CGSizeMake(595,842);  

/* Common page size settings:

    A3(842,1191), A4(595, 842),Letter(612,792), Legal(612,1008), etc.

 * The unit is pt(1 pt = 1/72 inch).

 */

[_DcsViewer.io uploadAsync:UplaodIndices uploadConfig:uploadConf encodeParameter: PDFEncodeParameter successCallback:^(NSData* data){NSLog(@"UploadAsync succeed!");} failureCallback:^(id userData, DcsException *exception){

            NSLog(@"UploadAsync failed, exception: %@,%@", [exception name],[exception reason]);} progressUpdateCallback:^BOOL(NSInteger progress){NSLog(@"UploadAsync in progress: %ld percents done", progress);return YES;}];

Is this page helpful?