Spaces:
Sleeping
Sleeping
Geetansh
commited on
Commit
·
b25434a
1
Parent(s):
78e4afe
Added constraint of processing only 2 pages at max
Browse files- pdf_to_image.py +2 -2
pdf_to_image.py
CHANGED
@@ -28,12 +28,12 @@ def pdfToImg(pdfPath, outputPath):
|
|
28 |
1)Images stored in output folder
|
29 |
2)It returns path to stored images
|
30 |
'''
|
31 |
-
images_paths = convert_from_path(pdfPath, 200, outputPath, fmt="jpeg", paths_only=True, last_page=
|
32 |
return images_paths
|
33 |
|
34 |
def pdfToImg2(pdfPath):
|
35 |
'''
|
36 |
1)Returns a list of Pillow images
|
37 |
'''
|
38 |
-
images = convert_from_path(pdfPath, 200, fmt="jpeg", last_page=
|
39 |
return images
|
|
|
28 |
1)Images stored in output folder
|
29 |
2)It returns path to stored images
|
30 |
'''
|
31 |
+
images_paths = convert_from_path(pdfPath, 200, outputPath, fmt="jpeg", paths_only=True, last_page=2) # Only processing 2 pages at max
|
32 |
return images_paths
|
33 |
|
34 |
def pdfToImg2(pdfPath):
|
35 |
'''
|
36 |
1)Returns a list of Pillow images
|
37 |
'''
|
38 |
+
images = convert_from_path(pdfPath, 200, fmt="jpeg", last_page=2) # Only processing 2 pages at max
|
39 |
return images
|