Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. # Check if the resource definition indicates this is a scanned PDF
  2. cmd = ['pdffonts', pdf_file]
  3. proc = subprocess.Popen(
  4. cmd, stdout=subprocess.PIPE, bufsize=0, text=True, shell=False)
  5. out, err = proc.communicate()
  6.  
  7. scanned = True
  8.  
  9. for idx, line in enumerate(out.splitlines()):
  10. if idx == 2:
  11. scanned = False
  12.  
  13. name type encoding emb sub uni object ID
  14. ------------------------------------ ----------------- ---------------- --- --- --- ---------
  15.  
  16. name type encoding emb sub uni object ID
  17. ------------------------------------ ----------------- ---------------- --- --- --- ---------
  18. TNNLVN+Calibri TrueType WinAnsi yes yes yes 9 0
  19.  
  20. for idx, line in enumerate(out.splitlines()):
  21. if idx == 2:
  22. scanned = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement