SetAuthor
IPDFDocument4 :: General document management :: Document properties

See Also Example
Collapse All

This method sets additional information about the author of the current PDF document.

Syntax

HRESULT SetAuthor (
BSTR author,
FontCharset charset
)
Parameters
author
ASCII text string containing the author

charset
Character set of the text

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Example

Setting Document Properties

Delphi
[copy to clipboard]
// PDF object is supposed to be created
PDF.ShowText('Hello, World!');
PDF.SetAuthor('Doe, John', fcANSI);
PDF.SetCreator('MyApplication v.1.0', fcANSI);
PDF.SetKeywords('key,words', fcANSI);
PDF.SetProducer('MyEngine v.2.1', fcANSI);
PDF.SetSubject('Test', fcANSI);
PDF.SetTitle('John's biography', fcANSI);
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->ShowText("Hello, World!");
PDF->SetAuthor("Doe, John", fcANSI);
PDF->SetCreator("MyApplication v.1.0", fcANSI);
PDF->SetKeywords("key,words", fcANSI);
PDF->SetProducer("MyEngine v.2.1", fcANSI);
PDF->SetSubject("Test", fcANSI);
PDF->SetTitle("John's biography", fcANSI);
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.ShowText("Hello, World!");
PDF.SetAuthor("Doe, John", FontCharset.fcANSI);
PDF.SetCreator("MyApplication v.1.0", FontCharset.fcANSI);
PDF.SetKeywords("key,words", FontCharset.fcANSI);
PDF.SetProducer("MyEngine v.2.1", FontCharset.fcANSI);
PDF.SetSubject("Test", FontCharset.fcANSI);
PDF.SetTitle("John's biography", FontCharset.fcANSI);
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.ShowText "Hello, World!"
PDF.SetAuthor "Doe, John", 0 'FontCharset.fcANSI
PDF.SetCreator "MyApplication v.1.0", 0
PDF.SetKeywords "key,words", 0
PDF.SetProducer "MyEngine v.2.1", 0
PDF.SetSubject "Test", 0
PDF.SetTitle "John's biography", 0
PDF.SaveToFile "test.pdf", true

See Also

Reference