-
-
Notifications
You must be signed in to change notification settings - Fork 131
Closed
Labels
Description
I recently tried the external pdf document api and it appears that it adds an empty page before.
let document = PDFDocument(format: format)
// meta data
document.info.title = "Title"
document.info.subject = "Subject"
if let bundleName = Bundle.main.infoDictionary!["CFBundleName"] as? String {
document.info.author = bundleName
}
if let externalReportURL = Bundle.main.url(forResource: "Cover", withExtension: "pdf") {
let coverDocument = PDFExternalDocument(url:externalReportURL, pages: 1)
document.add(externalDocument: coverDocument)
}
let generator = PDFGenerator(document: document)
try? generator.generateURL(filename: "report.pdf")