linux - 将 PDF 与文件名中的空格结合起来
问题描述
我有一个目录,其中包含许多文件名中有空格的 PDF。
file 1.pdf
file 2.pdf
file 3.pdf
# And so on
我在那个目录中运行了这个命令。
pdftk `ls -v` cat output combined-report.pdf
但是终端吐出一堆这样的错误。
Error: Unable to find file.
Error: Failed to open PDF file:
file
Error: Unable to find file.
Error: Failed to open PDF file:
1.pdf
如何pdftk
在 Arch Linux 中使用或任何其他包组合 PDF?为了澄清,我想按打印的顺序组合文件ls -v
解决方案
只需在创建组合 pdf 时使用通配符,例如:
pdftk *.pdf cat output newfile.pdf
或者你可以使用这样的东西:
pdftk file\ 1.pdf file\ 2.pdf cat output newfile.pdf
推荐阅读
- haskell - Using makeLens with Gloss gives "can't load framework: OpenGL (not found)"
- javascript - leaflet heatmap.js legend and tooltip
- python - Return a previous function inside function
- python - How to aggregate values from multiple columns from a Pandas DataFrameGroupBy object?
- pandas - How to add subtotals in a multi_index dataframe
- java - 更改焦点 JComboBox (Java Swing/AWT) 的默认颜色
- electron - Debugging Worker thread in electron
- javascript - Undefined Array in Javascript
- django - Django url dispatch error - AttributeError: 'WSGIRequest' object has no attribute 'data'
- python - Is there a way to guarantee that coroutines have been started before doing something that will allow them to finish?