PDFMultiDocumentGenerator
public class PDFMultiDocumentGenerator : PDFGeneratorProtocol
Generates a PDF from multiple PDFDocument by appending them.
-
Instance of
Progressused to track and control the multi-document generationDeclaration
Swift
public let progress: Progress -
Instances of
Progessused to track and control each individual document generationDeclaration
Swift
public let progresses: [Progress] -
Flag to enable or disable the debug overlay
Declaration
Swift
public var debug: Bool -
Initializes a new multi-document generator for generating the giving documents.
It will use the page layout of the first document.
The instance property
progressis initialized to the total document count.Declaration
Swift
public init(documents: [PDFDocument] = [])Parameters
documentsArray of
PDFDocumentinstances, which will all be rendered into a single PDF context -
nodoc
Declaration
Swift
public func generateURL(filename: String) throws -> URL -
nodoc
Declaration
Swift
public func generate(to target: URL) throws -
Creates a file at the given file URL, generates the PDF context data and writes the result idata nto the file.
Throws
Exception, if something went wrong
Declaration
Swift
public func generate(to target: URL, info: PDFInfo?) throws -
nodoc
Declaration
Swift
public func generateData() throws -> Data
View on GitHub
Install in Dash