List of all font names #458
Answered
by
samkit-jain
EmanueleGusso
asked this question in
Q&A
-
Hi everybody, |
Beta Was this translation helpful? Give feedback.
Answered by
samkit-jain
Jul 2, 2021
Replies: 1 comment 3 replies
-
Hi @EmanueleGusso Appreciate your interest in the library. You may use the following code to get all the fontnames in a PDF import pdfplumber
pdf = pdfplumber.open("my_file.pdf")
print(set(char["fontname"] for char in pdf.chars)) There's no direct method available to fetch the fontnames so you'll have to go through all the characters and then fetch the fontnames from them using the |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
EmanueleGusso
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @EmanueleGusso Appreciate your interest in the library. You may use the following code to get all the fontnames in a PDF
There's no direct method available to fetch the fontnames so you'll have to go through all the characters and then fetch the fontnames from them using the
fontname
property in a char object.