Some test text!

keyboard_arrow_down

Get started

keyboard_arrow_down

Document viewer

keyboard_arrow_down

Tools UI Library

keyboard_arrow_down

Document viewer components

keyboard_arrow_down

Conversion

keyboard_arrow_down

Advanced customization

keyboard_arrow_down

Other topics

Saving PDF documentsDocument locking
keyboard_arrow_down

Other frameworks

keyboard_arrow_down

FAQ

keyboard_arrow_down

PDF Processing API

Saving PDF documentskeyboard_arrow_down

Saving PDF documents

In this document
chevron_rightSave by path
chevron_rightSaving modes
chevron_rightSave with remove unused objects (
chevron_rightSave incrementally (
chevron_rightSave in linearized format (

Use PDFNet saving APIs from PTPDFDoc class to save PDF documents on local storage.

linkSave by path

To save a PDF document to path use (void)SaveToFile:(NSString *)path flags:(unsigned int)flags:

[pdfDoc Lock];
[pdfDoc SaveToFile:docPath flags:0];
[pdfDoc Unlock];

linkSaving modes

There are a few ways to save a PDF document on permanent storage such as save with remove unused objects, save incrementally, and save in linearized format. To see complete list of saving modes check here.

linkSave with remove unused objects (REMOVE_UNUSED)

This mode is optimized in terms of storage volume as it rearranges the PDF document and removes unused objects. As a result, the output file may be improved in terms of rendering too, although the saving process itself may take longer compared to other modes.

linkSave incrementally (INCREMENTAL)

Use the incremental mode if you are concerned about saving time. If you use this mode, any changes to the document, even deleting annotations, will result in appending to the PDF file. Note that it is not possible to incrementally save the document if the underlying file has an XRef table that had to be repaired when the file was opened (see http://www.pdftron.com/kb_corrupt_xref).

linkSave in linearized format (LINEARIZED)

The linearized format is preferred for file streaming, for example when you want to upload a PDF document.