Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check if the resource definition indicates this is a scanned PDF
- cmd = ['pdffonts', pdf_file]
- proc = subprocess.Popen(
- cmd, stdout=subprocess.PIPE, bufsize=0, text=True, shell=False)
- out, err = proc.communicate()
- scanned = True
- for idx, line in enumerate(out.splitlines()):
- if idx == 2:
- scanned = False
- name type encoding emb sub uni object ID
- ------------------------------------ ----------------- ---------------- --- --- --- ---------
- name type encoding emb sub uni object ID
- ------------------------------------ ----------------- ---------------- --- --- --- ---------
- TNNLVN+Calibri TrueType WinAnsi yes yes yes 9 0
- for idx, line in enumerate(out.splitlines()):
- if idx == 2:
- scanned = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement