-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove pdftopng and update Github CI
- Loading branch information
Showing
8 changed files
with
85 additions
and
902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from pdf2image import convert_from_path | ||
|
||
import tempfile | ||
|
||
path_to_pdf = r"C:\Programming\ethos_penalps\examples\basic_examples.py\report_2024_02_21__11_43_50\tex_folder\enterprise_text_file.pdf" | ||
|
||
path_to_png = path_to_pdf[:-4] + ".png" | ||
with tempfile.TemporaryDirectory() as path: | ||
list_of_pillow_images = convert_from_path(path_to_pdf) | ||
|
||
for image in list_of_pillow_images: | ||
converted_image = image.convert("RGBA") | ||
converted_image.save(path_to_png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters