使用 hexapdf 从多个 PDF 文件中提取图像 - hexapdf 没有这样的文件或目录@ rb_sysopen
我在我的硕士论文中,必须从约500个PDF文件中提取图像,为此,有些人向我推荐了Hexapdf。我能够安装Ruby和HexaPDF,因为我没有编码背景,所以我有点卡住了PDF的图像。有技巧吗? 提前致谢。
我尝试使用一个PDF的基本命令,以查看使用“ hexapdf images”之后的pdf名称,但结果是“没有这样的文件或目录 @ rb_sysopen”。
I'm in my master thesis and I have to extract images from about 500 pdf files, some people recommended hexapdf to me for this. I was able to install Ruby and hexapdf and now I'm kinda stuck getting the images out of the pdf's since I don't have a coding background. Any tips?
Thanks in advance.
I tried using the basic command for only one pdf to see what happened by using 'hexapdf images' followed by the pdf name but the result was 'no such file or directory @ rb_sysopen'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您获取
没有此类文件或目录 @ rb_sysopen
,则该信号表明您要打开的文件不存在。听起来这可能是您试图从中提取图像的PDF。我会检查您是否正在遵循 hexapdf文档,并且PDF的路径是正确的。如果带有代码和PDF的文件在同一目录中,并且您正在从该文件运行代码,那么您将执行类似的操作:
如果文件在计算机上的其他地方,则最容易使用完整的文件路径而不是相对文件路径,该路径将取决于您的系统(例如
/users/username/thesis/image_processing/files/files/my_pdf_document_filename.pdf
)。If you're getting
no such file or directory @ rb_sysopen
, then that signals that the file you are trying to open does not exist. It sounds like this is probably the PDF that you are trying to extract images from.I would check that you are following help provided by hexapdf documentation and that the path to your PDF is correct. If the file with your code and the PDF are in the same directory and you are running your code from that file, then you would do something like:
If the file is somewhere else on the machine, it may be easiest to use a full file path instead of a relative file path which will depend on your system and such (e.g.
/Users/username/thesis/image_processing/files/my_pdf_document_filename.pdf
).