谁能告诉我如何使用 PDFtk 删除 PDF 文件的最后一页?
最佳答案
这将创建 outfile.pdf
,其中包含 infile.pdf
pdftk infile.pdf cat 1-r2 output outfile.pdf
参数说明
infile.pdf
是原始pdf文件cat
是操作1-r2
是页面范围
You can reference page numbers in reverse order by prefixing 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 document, 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.
output
会将其输出到特定文件output.pdf
是输出的pdf文件更多示例在这里:https://www.pdflabs.com/docs/pdftk-cli-examples/
https://stackoverflow.com/questions/17705974/