Create a new blank PDF document on iOS

To create a new document as a blank PDF.

1// use the empty constructor to create a blank PDF
2PTPDFDoc *doc = [[PTPDFDoc alloc] init];
3
4// optionally perform some document processing using read write operations
5// found under 'Editing Page Content' or 'Page Manipulation'
6
7// save the document to the filesystem
8[doc SaveToFile: output_filename flags: e_ptlinearized];
9
10// optionally save the document to a memory buffer
11NSData *buf = [doc SaveToBuf: e_ptlinearized];

Read & write a PDF file from/to memory buffer
Full source code which illustrates how to read/write a PDF document from/to memory buffer. This is useful for applications that work with dynamic PDF documents that don't need to be saved/read from a disk.

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales