StoreCustomDataFromFileA

Document properties

Description

O sufixo A indica o ponto de entrada ANSI (char) da DLL; a superfície ActiveX/COM expõe apenas a forma Unicode. O comportamento é idêntico ao de StoreCustomDataFromFile e os argumentos de cadeia de caracteres são interpretados com base na página de código atual definida por SetAnsiMode

Saves custom data from a file into the PDF under a key name. This data can later be retrieved using RetrieveCustomDataToString or RetrieveCustomDataToFile. The storage type (string, stream or compressed stream) and location (Document Information Dictionary or Document Catalog) can be set. If the location is the Document Catalog any storage type can be used, but the key must have a special prefix assigned to you by Adobe. If the location is the Document Information Dictionary any key apart from the standard keys can be used, but only strings can be used.

Syntax

Delphi

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

DLL

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

Parameters

KeyThe key to store the data under. If the location is the Document Information Dictionary then the key cannot be "Author", "Title", "Subject", "Keywords", "Creator" or "Producer". Any other key can be used but keys should be chosen with care so they make sense to the user. 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.
FileNameThe path and name of the file containing the data to store in the PDF under the specified key.
Location1 = Armazenar os dados no Document Information Dictionary 2 = Armazenar os dados no Document Catalog
Options0 = Armazenar os dados como uma string (a única opção disponível se a localização for o Document Information Dictionary) 1 = Armazenar os dados num fluxo 2 = Armazenar os dados num fluxo comprimido

Return values

0The file containing the data could not be opened, or the Key parameter was invalid
1The data was stored successfully