Extract
内容
[
隐藏
]Extract(string, int, int, string)
从输入文件中提取页面,另存为新的 Pdf 文件。
public bool Extract(string inputFile, int startPage, int endPage, string outputFile)
范围 | 类型 | 描述 |
---|---|---|
inputFile | String | 输入 Pdf 文件路径。 |
startPage | Int32 | 起始页码。 |
endPage | Int32 | 结束页码。 |
outputFile | String | 输出 Pdf 文件路径。 |
返回值
真为成功,或为假。
例子
PdfFileEditor pfe = new PdfFileEditor();
pfe.Extract("input.pdf", 3, 7, "output.pdf");
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
Extract(string, int[], string)
提取数字数组指定的页面,另存为新的 PDF 文件。
public bool Extract(string inputFile, int[] pageNumber, string outputFile)
范围 | 类型 | 描述 |
---|---|---|
inputFile | String | 输入文件路径。 |
pageNumber | Int32[] | 输入文件的页面索引。 |
outputFile | String | 输出文件路径。 |
返回值
如果操作成功则为真。
例子
PdfFileEditor pfe = new PdfFileEditor();
pfe.Extract("input.pdf", new int[] { 3, 5, 7 }, "output.pdf");
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
Extract(Stream, int, int, Stream)
从输入文件中提取页面,另存为新的 Pdf 文件。
public bool Extract(Stream inputStream, int startPage, int endPage, Stream outputStream)
范围 | 类型 | 描述 |
---|---|---|
inputStream | Stream | 输入文件流。 |
startPage | Int32 | 起始页码。 |
endPage | Int32 | 结束页码。 |
outputStream | Stream | 输出 PDF 文件流。 |
返回值
真为成功,或为假。
例子
PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Extract(sourceStream, 1, 3, 6, outStream);
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
Extract(Stream, int[], Stream)
提取数字数组指定的页面,另存为新的 Pdf 文件。
public bool Extract(Stream inputStream, int[] pageNumber, Stream outputStream)
范围 | 类型 | 描述 |
---|---|---|
inputStream | Stream | 输入文件流。 |
pageNumber | Int32[] | 输入文件的页面索引。 |
outputStream | Stream | 输出文件流。 |
返回值
真为成功,或为假。
例子
PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Extract(sourceStream, new int[] { 3, 5, 8 }, outStream);
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
Extract(Stream, int[], HttpResponse)
从源文件中提取指定页面并将结果存储到 HttpResponse 对象中。
public bool Extract(Stream inputStream, int[] pageNumber, HttpResponse response)
范围 | 类型 | 描述 |
---|---|---|
inputStream | Stream | 源文档流。 |
pageNumber | Int32[] | 将被提取的页码数组。 |
response | HttpResponse | 将存储结果的 HttpResponse 对象。 |
返回值
如果操作成功则为真。
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
Extract(string, int[], HttpResponse)
从源文件中提取指定页面并将结果存储到 HttpResponse 对象中。
public bool Extract(string inputFile, int[] pageNumber, HttpResponse response)
范围 | 类型 | 描述 |
---|---|---|
inputFile | String | 源文件路径。 |
pageNumber | Int32[] | 将被提取的页码数组。 |
response | HttpResponse | 将存储结果的 HttpResponse 对象。 |
返回值
如果页面被成功提取,则为 true。
也可以看看
- class PdfFileEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF