1

我安装了 docker 并通过它运行 pdf2htmlEX

alias pdf2htmlEX="docker run -ti --rm -v ~/pdf:/pdf bwits/pdf2htmlex pdf2htmlEX"
pdf2htmlEX -h 
pdf2htmlEX --zoom 1.3 test.pdf

这是我的路径和 pdf 包含在里面:

~/Desktop/pdf$ ls 
test.pdf    testpdf.pdf

运行以下命令时:

df2htmlEX --zoom 1.3 test.pdf
df2htmlEX test.pdf
df2htmlEX pdf/test.pdf
df2htmlEX ~pdf/test.pdf

和 test.pdf 之前的完整路径的其他组合我继续无法读取文件错误。

I/O Error: Couldn't open file 'test.pdf': No such file or directory.
Error: Cannot read the file

我不确定权限是否是一个原因,但是在检查用户权限时它具有读写权限:

-rw-r--r--@ 1 test.pdf
-rw-r--r--@ 1 testpdf.pdf

关于为什么找不到或无法读取那里的 pdf 文件的任何想法?我正在尝试将其转换为 .html

4

2 回答 2

2

主机路径应该这样定向。

docker run -ti --rm -v /Users/<path>:/pdf bwits/pdf2htmlex pdf2htmlEX test.pdf

请参考https://docs.docker.com/engine/tutorials/dockervolumes/

于 2016-08-22T07:30:05.163 回答
1

不确定其他人是否遇到了这个问题,但我不清楚文档。

brew install pdf2htmlex

然后重新启动你的终端对我有用。我不确定 docker 旋转 pdf2htmlex 是否需要这样做,但它对我有用。

于 2016-07-08T17:33:36.400 回答