Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert the file pdf into json format in python

#PDF to JSON using Python 3+ 
 
# package to install  
# pip install Fitz  
# pip install pymupdf  
 
import fitz  
import json  
 
document  = fitz.open('filename.pdf') 
page  = document.loadPage(14)#enter page 
text = page.getText('dict')  
#print(text) 
 
with open('data.json', 'w') as f: 
    text_data = json.dump(text, f)
Source by www.quora.com #
 
PREVIOUS NEXT
Tagged: #convert #file #pdf #json #format #python
ADD COMMENT
Topic
Name
5+3 =