PDFPage.get_pages(
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
|
|
2 |
from gtts import gTTS
|
3 |
from io import BytesIO
|
4 |
from io import StringIO
|
5 |
-
from pdfminer.pdfinterp import PDFResourceManager,
|
6 |
from pdfminer.converter import TextConverter
|
7 |
from pdfminer.layout import LAParams
|
8 |
|
@@ -17,7 +17,7 @@ if uploaded_file is not None:
|
|
17 |
|
18 |
manager = PDFResourceManager()
|
19 |
converter = TextConverter(manager, output, laparams=LAParams())
|
20 |
-
|
21 |
|
22 |
element = output.getvalue()
|
23 |
st.write(element)
|
|
|
2 |
from gtts import gTTS
|
3 |
from io import BytesIO
|
4 |
from io import StringIO
|
5 |
+
from pdfminer.pdfinterp import PDFResourceManager, PDFPage.get_pages
|
6 |
from pdfminer.converter import TextConverter
|
7 |
from pdfminer.layout import LAParams
|
8 |
|
|
|
17 |
|
18 |
manager = PDFResourceManager()
|
19 |
converter = TextConverter(manager, output, laparams=LAParams())
|
20 |
+
PDFPage.get_pages(manager, converter, input_)
|
21 |
|
22 |
element = output.getvalue()
|
23 |
st.write(element)
|