如何在Python中运行PDFbookmarker

问题描述 投票:1回答:1

我正在尝试使用此工具https://github.com/RussellLuo/pdfbookmarker但我不断给出错误消息。

我安装了便携式WinPython,通过pip安装了PyPDF2,下载了add_bookmarks.py脚本并将其粘贴到WinPython目录中,更改了它的执行权限,并且无法正常运行,为什么?

Python 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> add_bookmarks.py <test.pdf> [sample_bookmarks.txt] [FILE-new.pdf]
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    add_bookmarks.py <test.pdf> [sample_bookmarks.txt] [FILE-new.pdf]
NameError: name 'add_bookmarks' is not defined
>>> 
python pdf pypdf2
1个回答
0
投票

最后我使用了另一个:https://github.com/lstolcman/pdf_bookmarks并且它起作用了。

© www.soinside.com 2019 - 2024. All rights reserved.