AppendToFile

Document management

Description

Appends changed objects to the specified source PDF as an incremental update

Use the same file that supplied the selected document through LoadFromFile, LoadFromString, or LoadFromStream

The target bytes must match the loaded source revision. The library rejects differences before appending, even when the file length is unchanged. Close active drawing scopes before calling this function

Use SaveChanges for safe in-place save and automatic reload of the updated xref chain

Syntax

Delphi

Function TPDFlib.AppendToFile(Const FileName: WideString): Integer;

ActiveX

Function PDFlib::AppendToFile(FileName As String) As Long

DLL

int DLAppendToFile(int InstanceID, const wchar_t* FileName);
int DLAppendToFileA(int InstanceID, const char* FileName);

Parameters

FileNameThe source PDF file that receives the incremental update

Return values

0The incremental update could not be appended to the specified file
1Success

Remarks

The selected font, text size, colours, line settings and content layer are the same after the save as before it, so drawing can continue on the selected page without choosing them again

Only objects that were changed or created are written; reading pages, text, images or form fields does not add them to the update

When the document holds signature fields, the modification date is not updated automatically, because the permission check of a signature counts a rewritten information dictionary or metadata stream as a change to the document. A date set with SetInformation is still written