pdftk - 一个不错的pdf文档合并工具

本文详细介绍了使用pdftk命令行工具进行PDF文档操作的方法,包括合并、解密、加密、页面删除、压缩解除、修复及元数据提取等功能。适合需要批量处理PDF文件的技术人员参考。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 没有直观的操作界面,需要在命令行进行操作( 将pdftk.exe放在要处理的pdf文档所在的目录下):

    开始->运行->cmd->(用cd命令切换到pdf文档和pdftk.exe所在的目录下)

    合并sourse1.pdf和sourse2.pdf文档到target.pdf:
    >pdftk sourse1.pdf sourse2.pdf cat output target.pdf
    或者:
    >pdftk A=sourse1.pdf B=sourse2.pdf cat A B output target.pdf

    将目录中所有的pdf合并到target.pdf(用通配符*):
    >pdftk *.pdf cat output target.pdf


其他功能:
(1) Decrypt a PDF:
    >pdftk secured.pdf input_pw foopass output unsecured.pdf

(2) Encrypt a PDF using 128-bit strength (the default),  with-hold all permissions (the default)
    >pdftk 1.pdf output 1.128.pdf owner_pw foopass

(3) Same as above, except password 'baz' must also be used to open output PDF
    >pdftk 1.pdf output 1.128.pdf owner_pw foo user_pw baz

(4) Same as above, except printing is allowed (once the PDF is open)
    >pdftk 1.pdf output 1.128.pdf owner_pw  foo  user_pw  baz allow printing

(5) Remove 'page 13' from in1.pdf to create out1.pdf
    >pdftk in.pdf cat 1-12 14-end output out1.pdf
    or:
    >pdftk A=in1.pdf cat A1-12 A14-end output out1.pdf

(6) Apply 40-bit encryption to output, revoking all permis-sions(the default). Set the owner PW to 'foopass'.
    >pdftk   1.pdf   2.pdf  cat  output  3.pdf  encrypt_40bit owner_pw foopass

(7) Join two files, one of which requires the password 'foopass'. The output is not encrypted.
    >pdftk A=secured.pdf 2.pdf input_pw A=foopass cat  output 3.pdf

(8) Uncompress  PDF page streams for editing the PDF in a text editor (e.g., vim, emacs)
    >pdftk doc.pdf output doc.unc.pdf uncompress

(9) Repair a PDF's corrupted XREF table and stream lengths, if possible pdftk broken.pdf output fixed.pdf Burst  a  single PDF document into pages and dump its data to doc_data.txt
     >pdftk mydoc.pdf burst

(10) Burst  a  single  PDF document into encrypted pages. Allow low-quality printing
     >pdftk  mydoc.pdf  burst owner_pw foopass allow Degraded-Printing

(11) Write a report on PDF document metadata and bookmarks to report.txt
     >pdftk mydoc.pdf dump_data output report.txt


优快云下载:http://download.youkuaiyun.com/source/122282 


转载于:https://www.cnblogs.com/happyhippy/archive/2007/04/06/710934.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值