Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Common
Collapse All

This method saves a new PDF document that will contain specified pages only.

Syntax

HRESULT SaveRangeToFile (
BSTR name,
LONG startPageIndex,
LONG endPageIndex,
VARIANT_BOOL autolaunch
)
Parameters
name
Name of the file

startPageIndex
The index of a start page

endPageIndex
The index of an end page

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 open some PDF document. }
PDF.Open('some.pdf', '');

{ Let's assume that this PDF has 10 pages }
PDF.SaveRangeToFile('part1.pdf', 0, 4, false);
PDF.SaveRangeToFile('part2.pdf', 5, 9, false);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->SetLicenseData("demo", "demo");

// Here we open some PDF document.
PDF->Open("some.pdf", "");

// Let's assume that this PDF has 10 pages
PDF->SaveRangeToFile("part1.pdf", 0, 4, false);
PDF->SaveRangeToFile("part2.pdf", 5, 9, false);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.SetLicenseData("demo", "demo");

// Here we open some PDF document.
PDF.Open("some.pdf", "");

// Let's assume that this PDF has 10 pages
PDF.SaveRangeToFile("part1.pdf", 0, 4, false);
PDF.SaveRangeToFile("part2.pdf", 5, 9, false);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.SetLicenseData "demo", "demo"

' Here we open some PDF document.
PDF.Open "some.pdf", ""

' Let's assume that this PDF has 10 pages
PDF.SaveRangeToFile "part1.pdf", 0, 4, false
PDF.SaveRangeToFile "part2.pdf", 5, 9, false

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots