FileName
IPDFDocument3 :: General document methods

See Also Example
Collapse All

This property gets or sets the file name for a PDF document.

Syntax

BSTR FileName { get; set; }
Value
String with the document's file name

Remarks

The FileName property contains the name of a PDF document. The FileName property is not used when GenerateInMemoryFile is VARIANT_TRUE, because the PDF document is stored in memory only.

Equivalent in new interface: IPDFDocument4::SaveToFile.

Example

How to Use the FileName Property

Delphi
[copy to clipboard]
{ PDF object is supposed to be created                 }
PDF.StartEngine('demo', 'demo');
PDF.AutoLaunch := false;
PDF.FileName := 'Report.pdf';
PDF.Resolution = 96;

PDF.BeginDoc;
{ Here we create our document and fill its contents.  }
PDF.EndDoc;

{ Now the file is created on the disk and we can       }
{ copy/move it, send as email attach or anything else. }
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->StartEngine("demo", "demo");
PDF->AutoLaunch = FALSE;
PDF->FileName = "Report.pdf";
PDF->Resolution = 96;

PDF->BeginDoc();
// Here we create our document and fill its contents.
PDF->EndDoc();

// Now the file is created on the disk and we can
// copy/move it, send as email attach or anything else.
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.StartEngine("demo", "demo");
PDF.AutoLaunch = false;
PDF.FileName = "Report.pdf";
PDF.Resolution = 96;

PDF.BeginDoc();
// Here we create our document and fill its contents.
PDF.EndDoc();

// Now the file is created on the disk and we can
// copy/move it, send as email attach or anything else.
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.StartEngine "demo", "demo"
PDF.AutoLaunch = False
PDF.FileName = "Report.pdf"
PDF.Resolution = 96

PDF.BeginDoc
' Here we create our document and fill its contents.
PDF.EndDoc

' Now the file is created on the disk and we can
' copy/move it, send as email attach or anything else.

See Also

Reference