For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a new blank PDF document on iOS

To create a new document as a blank PDF.

// use the empty constructor to create a blank PDF
PTPDFDoc *doc = [[PTPDFDoc alloc] init];

// optionally perform some document processing using read write operations 
// found under 'Editing Page Content' or 'Page Manipulation'

// save the document to the filesystem
[doc SaveToFile: output_filename flags: e_ptlinearized];

// optionally save the document to a memory buffer
NSData *buf = [doc SaveToBuf: e_ptlinearized];
// use the empty constructor to create a blank PDF
let doc: PTPDFDoc = PTPDFDoc();

// optionally perform some document processing using read write operations 
// found under 'Editing Page Content' or 'Page Manipulation'

// save the document to the filesystem
doc.save(toFile: output_filename, flags: e_ptlinearized)

// optionally save the document to a memory buffer
let buf: Data = doc.save(toBuf: e_ptlinearized.rawValue)

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.

Last updated

Was this helpful?