convert-stream 2.3.7__tar.gz → 2.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {convert_stream-2.3.7 → convert_stream-2.3.8}/PKG-INFO +1 -1
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/pdf/pdf_to_image.py +5 -6
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream.egg-info/PKG-INFO +1 -1
- {convert_stream-2.3.7 → convert_stream-2.3.8}/pyproject.toml +1 -1
- {convert_stream-2.3.7 → convert_stream-2.3.8}/README.md +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/__main__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/_version.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/doc_stream.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/image/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/image/img_object.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/mod_types/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/mod_types/enums.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/mod_types/modules.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/mod_types/table_types.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/pdf/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/pdf/image_to_pdf.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/pdf/pdf_document.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/pdf/pdf_page.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/sheets/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/sheets/load.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/sheets/parse.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/sheets/save.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/table_files.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/text/__init__.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/text/date.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/text/find_text.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream/text/terminal.py +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream.egg-info/SOURCES.txt +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream.egg-info/dependency_links.txt +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream.egg-info/requires.txt +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/convert_stream.egg-info/top_level.txt +0 -0
- {convert_stream-2.3.7 → convert_stream-2.3.8}/setup.cfg +0 -0
|
@@ -180,16 +180,15 @@ class ConvertPdfToImages(object):
|
|
|
180
180
|
# doc = Document(stream=page_bytes, filetype="pdf")
|
|
181
181
|
collection_imgs: CollectionImages = CollectionImages([])
|
|
182
182
|
tmp_doc: fitz.Document
|
|
183
|
-
if self.
|
|
184
|
-
tmp_doc: fitz.Document = self.
|
|
185
|
-
elif self.
|
|
183
|
+
if self.mod_convert_to_image.document.lib_pdf == LibPDF.FITZ:
|
|
184
|
+
tmp_doc: fitz.Document = self.mod_convert_to_image.document.get_real_document()
|
|
185
|
+
elif self.mod_convert_to_image.document.lib_pdf == LibPDF.PYPDF:
|
|
186
186
|
tmp_doc = fitz.Document(
|
|
187
|
-
stream=self.
|
|
187
|
+
stream=self.mod_convert_to_image.document.to_bytes().getvalue(), filetype="pdf"
|
|
188
188
|
)
|
|
189
189
|
else:
|
|
190
190
|
raise NotImplementedError()
|
|
191
191
|
|
|
192
|
-
total = len(tmp_doc)
|
|
193
192
|
page: fitz.Page
|
|
194
193
|
for num, page in enumerate(tmp_doc):
|
|
195
194
|
# Extrair imagens embutidas na página
|
|
@@ -203,7 +202,7 @@ class ConvertPdfToImages(object):
|
|
|
203
202
|
# Bytes da imagem
|
|
204
203
|
image_bytes = base_image["image"]
|
|
205
204
|
# Extensão (jpg, png, etc.)
|
|
206
|
-
image_ext = base_image["ext"]
|
|
205
|
+
#image_ext = base_image["ext"]
|
|
207
206
|
except Exception as e:
|
|
208
207
|
print(e)
|
|
209
208
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|