sudo apt-get install python3-pip
sudo pip3 install virtualenv
| from os import listdir | |
| from fpdf import FPDF | |
| path = "./docs/voter/" # get the path of images | |
| imagelist = listdir(path) # get list of all images | |
| imagelist = sorted(imagelist,key=lambda x: int(os.path.splitext(x)[0])) | |
| pdf = FPDF('P','mm','A4') # create an A4-size pdf document |
| import os | |
| import win32file | |
| import win32con | |
| ACTIONS = { | |
| 1 : "Created", | |
| 2 : "Deleted", | |
| 3 : "Updated", | |
| 4 : "Renamed from something", |
| from pdf2image import convert_from_path, convert_from_bytes | |
| import os | |
| import argparse | |
| from pdf2image.exceptions import ( | |
| PDFInfoNotInstalledError, | |
| PDFPageCountError, | |
| PDFSyntaxError | |
| ) | |
| directory = 'directory/path' |
| from PyPDF2 import PdfFileWriter, PdfFileReader | |
| import os | |
| # inputpdf = PdfFileReader(open("../EOBs/atena/test/YourReport (45).pdf", "rb")) | |
| # filename, file_extension = os.path.splitext('/path/to/somefile.ext') | |
| # filename | |
| directory = 'directory/path' | |
| for filename in os.listdir(directory): |