【问题标题】:pdf2htmlEX cannot open or read filepdf2htmlEX 无法打开或读取文件
【发布时间】:2016-11-11 06:17:19
【问题描述】:

我安装了 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

【问题讨论】:

  • 使用 Fedora 28,我遇到了同样的问题。罪魁祸首是 SELinux。

标签: docker pdf-generation pdf-to-html pdf2htmlex


【解决方案1】:

主机路径应该这样定向。

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

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

【讨论】:

    【解决方案2】:

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

    brew install pdf2htmlex
    

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

    【讨论】:

      猜你喜欢
      • 2011-11-19
      • 2021-12-10
      • 1970-01-01
      • 2022-08-13
      • 2019-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-07
      相关资源
      最近更新 更多