Post not yet marked as solved
Post marked as unsolved with 0 replies, 303 views
Hi,I want to create a PDF where the pages have different sizes. If needed I could set a common mediaBox and just specific bleed and crop boxes for each page. Here is how I create the context and a pageif let context = CGContext(url as CFURL, mediaBox: nil, nil) {
var pageDescription: [CFString:Any] = [:]
pageDescription[kCGPDFContextMediaBox] = mediaBox
pageDescription[kCGPDFContextBleedBox] = mediaBox
pageDescription[kCGPDFContextCropBox] = cropBox
context.beginPDFPage(pageDescription as CFDictionary)Sadly it looks like nothing is stored in the PDF.I am able to add these informations if I load the document into a PDFDocument after printing, but there must be a direct way, right?All the best Christoph