'Identifying Bold Text in PDF using pyPdf

I am using pyPdf to extract text from a PDF. I would like to be able to know which text is bold in order to identify bold section headers. How can I identify bold text?



Solution 1:[1]

pypdf has no direct support for it - it's not impossible, but it would require significant effort from your side. As pypdf is no longer maintained, this will not change.

PyPDF2 also does not have this at the moment (May 2022), but I'm open to a PR adding this support.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Martin Thoma