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

[Bug]: 裁剪 PDF 文件首页(使用 pdfplumber 包获取的首页) 标题存在异常 #1115

Open
2 tasks done
kavons opened this issue May 7, 2024 · 0 comments · May be fixed by #1116
Open
2 tasks done

[Bug]: 裁剪 PDF 文件首页(使用 pdfplumber 包获取的首页) 标题存在异常 #1115

kavons opened this issue May 7, 2024 · 0 comments · May be fixed by #1116
Labels
bug Something isn't working

Comments

@kavons
Copy link

kavons commented May 7, 2024

这个bug是否已存在现有issue了?

  • 我确认没有已有issue,且已阅读常见问题

错误表现

上传 PDF 文件时,优先使用 pdfplumber 解析文档,在调用 get_title_with_cropped_page 裁剪首页时,出现异常 exception
image

原因是下面的代码传参数出现了错误:
user_info = [i["text"] for i in extract_words(first_page.within_bbox((x0,title_bottom,x1,top)))]

复现操作

上传PDF

错误日志

No response

运行环境

  • OS:
  • Browser:
  • Gradio version:
  • Python version:

帮助解决

  • 我愿意协助解决!

补充说明

No response

@kavons kavons added the bug Something isn't working label May 7, 2024
@Keldos-Li Keldos-Li linked a pull request May 10, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant