我使用pdfdetach实用程序,它将提取PDF文件中的嵌入式对象并将它们转储到当前文件夹。输出可以是任何东西,如.doc文件或其他。我所要做的就是,不管pdfdetach的输出是什么,我都希望它被默认地存储在子目录中而不是当前目录中。
以下是我正在尝试但不起作用的简单路线:
pdfdetach -saveall JSPopupCalendar.pdf > /subfolder/
发布于 2018-09-07 21:39:56
使用"-o“参数。例如pdfdetach -saveall JSPopupCalendar.pdf -o /subfolder
见手册页http://manpages.ubuntu.com/manpages/trusty/man1/pdfdetach.1.html
-saveall保存所有嵌入的文件。这使用与嵌入式文件相关联的文件名(如"-list“开关所打印的)。默认情况下,文件保存在当前目录中;这可以通过"-o“开关进行更改。-o路径设置在使用"-save“开关保存嵌入式文件时使用的文件名,或者"-saveall”使用的目录。
例如,演示如何将KSBASE.WQ2文件从fileAttachment.pdf内部分离出来。
$ pdfdetach -saveall fileAttachment.pdf -o bar
$ find . -ls
384329 0 drwxrwxr-x 3 steve steve 43 Sep 7 17:42 .
9137752 0 drwxrwxr-x 2 steve steve 24 Sep 7 17:42 ./bar
8544834 24 -rw-rw-r-- 1 steve steve 20668 Sep 7 17:42 ./bar/KSBASE.WQ2
384331 80 -rw-rw-r-- 1 steve steve 78950 Nov 2 2017 ./fileAttachment.pdf
$
https://unix.stackexchange.com/questions/467626
复制相似问题