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

多个子标题处理问题 #1

Open
zhongmiyu99 opened this issue Nov 15, 2023 · 1 comment
Open

多个子标题处理问题 #1

zhongmiyu99 opened this issue Nov 15, 2023 · 1 comment

Comments

@zhongmiyu99
Copy link

问下,遇到PDF里面一级标题,二级标题,三级标题,好像就不行了,大神这个应该怎么改?

@ck-unifr
Copy link
Owner

问下,遇到PDF里面一级标题,二级标题,三级标题,好像就不行了,大神这个应该怎么改?

请问是怎样的PDF?如果PDF没有outline(table of contents)的话目前这个方法是获取不了标题了
但是如果PDF有outline的话,该方法应该是可以获取一级标题,二级标题,三级标题
https://github.com/ck-unifr/pdf_parsing/blob/main/src/parser.py
parser.py里面的class PDFOutliner的下面的函数get_tree_pages(self, root, info, depth=0, titles=[])中的参数depth是标题的层级,depth=0就是第一级标题,depth=1是第二级,以此类推。

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

No branches or pull requests

2 participants