SaveToFileOptions

Document management

Description

This page describes SaveToFileOptions in PDF Library for Delphi, which belongs to the "Document management" topic. API names, parameters, class names, file names, and literals are kept exactly as they are to correspond fully with the Delphi library and DLL entry points.

Please review the syntax, parameters, and return value before calling the function.

Syntax

Delphi

Function TPDFlib.SaveToFileOptions(Const FileName: WideString; Const Options: TPDFlibSaveOptions): Integer;

Behavior

When both Options.Linearize and Options.PackObjectStreams are true, the final PDF keeps Fast Web View ordering while packing eligible second-section objects and writing a compressed main xref stream. The temporary packed save is read safely before the same destination path is replaced by the linearized result

Parameters

FileName is the destination path. Options controls compression, linearization, modification-date retention, content optimization, garbage collection, and object stream packing

Return Value

Returns 1 when the save and every requested post-processing stage succeed, otherwise 0

Remarks

Object stream linearization requires PDF 1.5 or later. Encrypted input retains direct objects during the linearization stage