SaveToFile
IPDFDocument4 :: General document management :: Common

See Also Example
Collapse All

This method saves a PDF document to the file specified.

Syntax

HRESULT SaveToFile (
BSTR name,
VARIANT_BOOL autolaunch
)
Parameters
name
Name of the file

autolaunch
If VARIANT_TRUE, then the file saved will be opened in the default PDF viewer.

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

Example

Saving to a File

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.SetLicenseData('demo', 'demo');

{ Here we create our document and fill its contents. }
PDF.ShowText('Hello, World!');

PDF.SaveToFile('test.pdf', false);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->SetLicenseData("demo", "demo");

// Here we create our document and fill its contents.
PDF->ShowText("Hello, World!");

PDF->SaveToFile("test.pdf", false);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.SetLicenseData("demo", "demo");

// Here we create our document and fill it's contents.
PDF.ShowText("Hello, World!");

PDF.SaveToFile("test.pdf", false);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.SetLicenseData "demo", "demo"

' Here we create our document and fill it's contents.
PDF.ShowText "Hello, World!"

PDF.SaveToFile "test.pdf", false

See Also

Reference