How to use local documents #85
Unanswered
klucius1218
asked this question in
Q&A
Replies: 1 comment
-
You can try one of two approaches: Either, you pass a qualified path to the local file to doc = layout_pdf_reader_instance.read_pdf(filepath_full) or, alternatively, you read the file into a byte buffer and pass that as a file: with open(filepath_full, "rb") as file_bytes:
doc = layout_pdf_reader_instance.read_pdf("file.pdf", contents=file_bytes.getvalue()) ( I didn't test this code specifically, but I remember having implemented it in a similar fashion ) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to ask how to use local documentation? I tried to replace the link of pdf_url with the path of my local document, but the error LocationValueError: No host specified. I don't know how to modify, can you help me?
Beta Was this translation helpful? Give feedback.
All reactions