ExtractFilePages

文档操作、提取、页面操作

描述

从磁盘上的 PDF 文档提取页面范围,并将提取的页面置于新 PDF 文档中

ExtractFilePagesEx 函数能够使用交叉引用流而非交叉引用表来生成更小的输出文件

语法

Delphi

Function TPDFlib.ExtractFilePages(Const InputFileName, Password, OutputFileName, RangeList: WideString): Integer;

ActiveX

Function PDFlib::ExtractFilePages(InputFileName As String, Password As String, OutputFileName As String, RangeList As String) As Long

DLL

int DLExtractFilePages(int InstanceID, const wchar_t * InputFileName, const wchar_t * Password, const wchar_t * OutputFileName, const wchar_t * RangeList);

参数

InputFileName包含待提取页面的文档路径和名称
Password打开文档时使用的密码
OutputFileName要创建并包含提取页面的文档的路径和名称
RangeList要提取的页面,例如 "10,15,18-20,25-35"。无效字符会被忽略。接受 "5-1" 等反向页范围。接受重复页码,但若对此类页面作出更改,相同更改会出现在重复页面上。不会对页面列表排序,因此结果文档将按指定顺序包含页面

返回值

0无法提取页面。请使用 LastErrorCode 函数确定失败原因
1页面已成功提取