Frameworks
React Native
Flutter
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
Use PDFNet saving APIs from PTPDFDoc
class to save PDF documents on local storage.
To save a PDF document to path use (void)SaveToFile:(NSString *)path flags:(unsigned int)flags
:
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. See complete list of saving modes.
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.
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 https://groups.google.com/forum/#!msg/pdfnet-sdk/GZwt_U16ipw/zhq43GQnNlYJ).
LINEARIZED
)The linearized format is preferred for file streaming situations, such as when you want to upload a PDF document. A linearized PDF file is a PDF file that is structured in a way that allows the first page of the PDF file to be displayed in a user's device before the entire file is downloaded from the Web server. If you're developing a system that creates large PDF files for delivery to client, you should try to make sure that your system can generate linearized PDF files. Your users might become frustrated and impatient if your system creates large PDF files that are not linearized, because it could take 30 seconds or even longer for a user's device to display a large PDF file that is not linearized. PDF linearization is also know as 'fast web view'.
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales