2

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.

Paul Knopf
  • 9,568
  • 23
  • 77
  • 142

1 Answers1

1

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.

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
steipete
  • 7,581
  • 5
  • 47
  • 81
  • Hi steipete, can you please give few lines of code to add new pages to existing PDF.?? thanks in advance. – hpp Jun 07 '14 at 10:32