我有一个 192 页的 PDF 文件,我想要每 8 页提取并保存一次 PDF 文件。
意思是,第 1 页到第 8 页应该保存在单独的文件中,第 9 页到第 16 页依此类推。
每个文件应有 8 页。因此 192/8=24 个文件。每个保存的文件应有 8 页。
谢谢。
答案1
上传文件,然后在“每 X 页拆分”输入框中输入 8。单击“拆分”,然后在任务完成后下载结果。
针对最多 200 页或 50Mb 的文档提供免费服务。
答案2
您还可以使用pdftk要执行此操作并从其命令行界面(例如C:\Program Files (x86)\PDFtk\bin\pdftk.exe
)以下语法将完成您的需要。
我可以确认这是有效的,因为这是我在家里亲自用于此类任务的方法。
CLI 示例
"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" C:\Path\origfilename.pdf cat 1-8 output C:\PathOut\newfilename1-8.pdf
"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" C:\Path\origfilename.pdf cat 9-16 output C:\PathOut\newfilename9-16.pdf
"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" C:\Path\origfilename.pdf cat 17-24 output C:\PathOut\newfilename17-24.pdf
批处理脚本循环示例
这是一种将所有内容放入循环中的方法,使用这个免费工具设置 sourcedir 和 outputdir、设置页码等。根据需要调整变量。
@ECHO ON
SET PDFtk="C:\Program Files (x86)\PDFtk\bin\pdftk.exe"
SET sourcedir=C:\sourcepath
SET outputdir=C:\outputpath
FOR %%A IN (1-8, 9-16, 17-24, 25-32, 33-40,
41-48, 48-56, 57-64, 65-72, 73-80,
81-88, 89-96, 97-104, 105-112, 113-120,
121-128, 129-136, 137-144, 145-152, 153-160,
161-168, 169-176, 177-184, 185-192
)
DO %PDFtk% %sourcedir%\origfilename.pdf cat %%A output %outputdir%\newfilename%%A.pdf
GOTO EOF
更多资源
- pdftk 手册页
pdftk --help
cat [<page ranges>] Assembles (catenates) pages from input PDFs to create a new PDF. Use cat to merge PDF pages or to split PDF pages from documents. You can also use it to rotate PDF pages. Page order in the new PDF is specified by the order of the given page ranges. Page ranges are described like this: <input PDF handle>[<begin page number>[-<end page num- ber>[<qualifier>]]][<page rotation>] Where the handle identifies one of the input PDF files, and the beginning and ending page numbers are one-based refer- ences to pages in the PDF file. The qualifier can be even or odd, and the page rotation can be north, south, east, west, left, right, or down. If a PDF handle is given but no pages are specified, then the entire PDF is used. If no pages are specified for any of the input PDFs, then the input PDFs' bookmarks are also merged and included in the output. If the handle is omitted from the page range, then the pages are taken from the first input PDF. The even qualifier causes pdftk to use only the even-numbered PDF pages, so 1-6even yields pages 2, 4 and 6 in that order. 6-1even yields pages 6, 4 and 2 in that order. The odd qualifier works similarly to the even. The page rotation setting can cause pdftk to rotate pages and documents. Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down make rela- tive adjustments to a page's rotation. If no arguments are passed to cat, then pdftk combines all input PDFs in the order they were given to create the output. NOTES: * <end page number> may be less than <begin page number>. * The keyword end may be used to reference the final page of a document instead of a page number. * Reference a single page by omitting the ending page number. * The handle may be used alone to represent the entire PDF document, e.g., B1-end is the same as B. * You can reference page numbers in reverse order by prefix- ing them with the letter r. For example, page r1 is the last page of the document, r2 is the next-to-last page of the doc- ument, and rend is the first page of the document. You can use this prefix in ranges, too, for example r3-r1 is the last three pages of a PDF. Page Range Examples without Handles: 1-endeast - rotate entire document 90 degrees 5 11 20 - take single pages from input PDF 5-25oddwest - take odd pages in range, rotate 90 degrees 6-1 - reverse pages in range from input PDF Page Range Examples Using Handles: Say A=in1.pdf B=in2.pdf, then: A1-21 - take range from in1.pdf Bend-1odd - take all odd pages from in2.pdf in reverse order A72 - take a single page from in1.pdf A1-21 Beven A72 - assemble pages from both in1.pdf and in2.pdf Awest - rotate entire in1.pdf document 90 degrees B - use all of in2.pdf A2-30evenleft - take the even pages from the range, remove 90 degrees from each page's rotation A A - catenate in1.pdf with in1.pdf Aevenwest Aoddeast - apply rotations to even pages, odd pages from in1.pdf Awest Bwest Bdown - catenate rotated documents shuffle [<page ranges>] Collates pages from input PDFs to create a new PDF. Works like the cat operation except that it takes one page at a time from each page range to assemble the output PDF. If one range runs out of pages, it continues with the remaining ranges. Ranges can use all of the features described above for cat, like reverse page ranges, multiple ranges from a single PDF, and page rotation. This feature was designed to help collate PDF pages after scanning paper documents.
答案3
找到这个,试一试:
如何分割 PDF 文件 https://helpx.adobe.com/acrobat/how-to/split-pdf-document.html
答案4
你可以使用 PDFsam,它是免费的开源软件。这里有一个简单的教程如何分割 PDF 文件使用 PDFsam。