Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 如何获得pdf的正文 #455

Open
1 task done
albertcity opened this issue Jan 21, 2025 · 1 comment
Open
1 task done

[Feature] 如何获得pdf的正文 #455

albertcity opened this issue Jan 21, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@albertcity
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Environment

  • OS:
  • Zotero Version:
  • Plugin Version:

Describe the feature request

我想开发一个script,可以自动提取一片论文(pdf格式)的content,并且用chatgpt生成对应的summary和tags。我想知道要如何在action脚本中获得当前pdf的所有正文内容呢?

Describe the solution you'd like

获得pdf正文内容的api。

Anything else?

No response

@albertcity albertcity added the enhancement New feature or request label Jan 21, 2025
@cs-qyzhang
Copy link

cs-qyzhang commented Feb 14, 2025

我已经写了个脚本可以用LLM总结正文:#457。要读取pdf我是这样做的:

let pdfAttachment = await item.getBestAttachment();
let pdfPath = await pdfAttachment.getFilePath();
let fileData = await IOUtils.read(pdfPath);

解析pdf文件我是搭建了http服务,将文件发送给服务器做解析。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants