SetInformationA
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 SetInformation and string arguments are interpreted using the current SetAnsiMode code page
Set the properties of the selected document.
For the CreationDate and ModDate (modification date) properties, the format of the date should be:
D:YYYYMMDDHHmmSSOHH'mm'
where
YYYY shall be the year
MM shall be the month (01-12) DD shall be the day (01-31) HH shall be the hour (00-23)
mm shall be the minute (00-59) SS shall be the second (00-59)
O shall be the relationship of local time to Universal Time (UT) using a +, - or Z character
HH followed by APOSTROPHE (U+0027) (') shall be the absolute value of the offset from UT in hours (00-23)
mm followed by an optional APOSTROPHE (U+0027) (') shall be the absolute value of the offset from UT in minutes (00-59)
Syntax
Delphi
Function DLSetInformationA(InstanceID, Key: Integer; NewValue: PAnsiChar): Integer;
DLL
int DLSetInformationA(int InstanceID, int Key, const char * NewValue);
Parameters
| Key | The property to set: 0 = PDF Version 1 = Author 2 = Title 3 = Subject 4 = Keywords 5 = Creator 6 = Producer 7 = CreationDate 8 = ModDate 9 = XMP dc:subject |
|---|---|
| NewValue | The new value of the specified property. |
When Key is 0, NewValue selects the full-save PDF target version. For PDF 1.3, 1.4, 1.5, 1.6, and 1.7 targets, SaveToFile, SaveToString, and SaveToStream keep the emitted file within that selected version. If the document still contains a feature that requires a newer PDF version, saving fails and LastErrorCode returns 602.
Return values
| 0 | The specified information could not be set. Use the LastErrorCode function to determine the reason for failure. |
|---|---|
| 1 | The specified information was set successfully |