RetrieveCustomDataToFileA

Document properties

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to RetrieveCustomDataToFile and string arguments are interpreted using the current SetAnsiMode code page

Retrieves custom data from the PDF that was previously stored with StoreCustomDataFromString or StoreCustomDataFromFile. The retrieved data is written to the specified file.

Syntax

Delphi

Function DLRetrieveCustomDataToFileA(InstanceID: Integer; Key, FileName: PAnsiChar; Location: Integer): Integer;

DLL

int DLRetrieveCustomDataToFileA(int InstanceID, const char * Key, const char * FileName, int Location);

Parameters

KeyThe key that the data was stored under. If the location is the Document Catalog then the key must have a special prefix assigned to you by Adobe to avoid conflicts with other software. If the location is the Document Information Dictionary any key can be used but should be chosen with care so they make sense to the user
FileNameThe path and file name of the file to save the retrieved data to.
Location1 = Retrieve the data from the Document Information Dictionary 2 = Retrieve the data from the Document Catalog

Return values

0There was no data stored in the specified key, or the file to save the data to already exists and could not be overwritten
1The data was retrieved and written to the specified file successfully