ExtractFilePagesEx
Document manipulation, Extraction, Page manipulation
Description
Similar to the ExtractFilePages function but is able to generate smaller output files using cross reference streams rather than a cross reference table.
Options can be logically OR'd to together to invoke multiple options.
For example Options = 3 ( 1 + 2) will Use a cross reference stream (smaller output file size) and also Remove all AcroForm and XFA based FormFields as well as Usage Rights
Syntax
Delphi
function TPDFlib.ExtractFilePagesEx(Const InputFileName, Password, OutputFileName, RangeList: WideString; Options: Integer): Integer;ActiveX
Function PDFlib::ExtractFilePagesEx(InputFileName As String, Password As String, OutputFileName As String, RangeList As String, Options As Long) As LongDLL
int DLExtractFilePagesEx(int InstanceID, wchar_t * InputFileName, wchar_t * Password, wchar_t * OutputFileName, wchar_t * RangeList, int Options);Parameters
| InputFileName | The path and name of the document that contains the pages to extract. The password to use when opening the document. |
|---|---|
| Password | |
| OutputFileName | The path and name of the document to create containing the extracted pages. The pages to extract, for example "10,15,18-20,25-35". Invalid characters will be ignored. Reversed page ranges such as "5-1" will be accepted. Duplicate page numbers will be accepted but if a change is made to such a page the same changes will appear on the duplicate pages. The list of pages will not be sorted so the resulting document will have the pages in the specified order. |
| RangeList | |
| Options | 0 = Use a cross reference table 1 = Use a cross reference stream (smaller output file size) 2 = Remove all AcroForm and XFA based FormFields as well as Usage Rights |
Return values
| 0 | The pages could not be extracted. Use the LastErrorCode function to determine the cause of the failure. |
|---|---|
| 1 | The pages were extracted successfully |