I am trying to upload and process a pdf-file, in “normal” python environment i use:
using
from pdfreader import SimplePDFViewer
with open(input_file['file_pdf'], 'rb') as f:
df,page = functions.read_pdf(f)
which works fine.
For the Viktor app, is so far have:
@staticmethod
def read_PDF(params, **kwargs):
print(params.filePDF.filename)
with params.filePDF.file.open() as f:
df,page = functions.read_pdf(file_pdf = f)
return df,page
But the encoding seems to be off. is there i can use the “normal”
with open(input_file['file_pdf'], 'rb') as f:
or is there another option?