OCKDocument Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in OCKDocument.h

The OCKDocument class defines a document object that contains a title, page header, and elements. It supports exporting to an HTML or PDF file.

– initWithTitle:elements:

Initializer for an OCKDocument object.

- (instancetype)initWithTitle:(nullable NSString *)title elements:(nullable NSArray<id<OCKDocumentElement> > *)elements

Parameters

title

Title of the document.

elements

An array of elements to be included in the document.

Return Value

An initialized OCKDocument instance.

Declared In

OCKDocument.h

  title

Title of the document; printed in large font at the beginging of the document.

@property (nonatomic, copy, nullable) NSString *title

Declared In

OCKDocument.h

  pageHeader

The page header string will be printed in every PDF page above other content. It can be used to help identify the source of a file. For example, @“App Name: ABC, User ID: 123456”;

@property (nonatomic, copy, nullable) NSString *pageHeader

Declared In

OCKDocument.h

  elements

Elements in the document.

@property (nonatomic, copy, nullable) NSArray<id<OCKDocumentElement> > *elements

Declared In

OCKDocument.h

  HTMLContent

Document content in HTML format.

@property (nonatomic, copy, readonly) NSString *HTMLContent

Declared In

OCKDocument.h

– createPDFDataWithCompletion:

Create PDF file using data from the current document object.

- (void)createPDFDataWithCompletion:(void ( ^ ) ( NSData *PDFdata , NSError *_Nullable error ))completion

Parameters

completion

PDF data creation completion callback.

Declared In

OCKDocument.h