我有一个由多个文档组合而成的大PDF。
如何使用关键字分隔符将PDF拆分回多个文档?
发布于 2015-08-17 01:12:24
请看一下关于如何将PDF分成多个文件的指南
// Used to register all DLL assemblies.
WorkRegistry.Reset();
String inputFilePath = Program.RootPath + "\\" + "1.pdf";
String outputFileName = "Output";
int[] splitIndex = new int[3] { 1, 3, 5 }; // Valid value for each index: 1 to (Page Count - 1).
// Create output PDF file path list
List<String> outputFilePaths = new List<String>();
for (int i = 0; i <= splitIndex.Length; i++)
{
outputFilePaths.Add(Program.RootPath + "\\" + outputFileName + "_" + i.ToString() + ".pdf");
}
// Split input PDF file to 4 files:
// File 0: page 0.
// File 1: page 1 ~ 2.
// File 2: page 3 ~ 4.
// File 3: page 5 ~ the last page.
PDFDocument.SplitDocument(inputFilePath, splitIndex, outputFilePaths.ToArray());https://stackoverflow.com/questions/27831572
复制相似问题