PSPDFDocumentSaveStrategy

Objective-C

enum PSPDFDocumentSaveStrategy {}

Swift

@frozen enum SaveStrategy : Int

Document saving strategy.

  • Fast save operation, appends new data. File grows with every save.

    Declaration

    Objective-C

    PSPDFDocumentSaveStrategyAppend

    Swift

    case append = 0
  • Slower operation, rewrites file, removes unreferenced objects.

    Declaration

    Objective-C

    PSPDFDocumentSaveStrategyRewrite

    Swift

    case rewrite = 1
  • Optimizes the file size and rewrites the file. This is the slowest option of the three, but it offers the smallest file size. If you need to optimize for saving performance, use PSPDFDocumentSaveStrategyAppend instead.

    Declaration

    Objective-C

    PSPDFDocumentSaveStrategyRewriteAndOptimizeFileSize

    Swift

    case rewriteAndOptimizeFileSize = 2