Dynamically creating PDF document with PSPDFKit

1.5k views Asked by At

I am using PSPDFKit as an image editor.

How do I create a new PSPDFDocument with a certain width/height? Also, how do I dynamically add pages to PDPDFDocument?

Maybe the answer is that I need to dynamically create a blank PDF myself every time I want to edit an image. I was hoping it was built in.

1

There are 1 answers

1
steipete On BEST ANSWER

You can both create new empty files and add/remove documents using PSPDFProcessor. Use the HTML conversion with an empty string to get a blank page; and the generatePDFFromDocument: methods to modify existing documents.