gpt4 book ai didi

linux - 使用 PDFtk 删除 pdf 文件的最后一页?

转载 作者:IT老高 更新时间:2023-10-28 12:36:58 29 4
gpt4 key购买 nike

谁能告诉我如何使用 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/

关于linux - 使用 PDFtk 删除 pdf 文件的最后一页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17705974/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com