Skip to content

Commit

Permalink
Half the DPI for the image render
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-rs committed Mar 28, 2024
1 parent 3a7ec5d commit 1e42373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion document_preview/document_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def pdfinfo_from_path(fp: str):


def convert_from_path(fp: str, output_directory: str, first_page=1, last_page=None):
pdf_conv_command = ["pdftoppm", "-jpeg", "-f", str(first_page)]
pdf_conv_command = ["pdftoppm", "-r", "75", "-jpeg", "-f", str(first_page)]
if last_page:
pdf_conv_command += ["-l", str(last_page)]
subprocess.run(pdf_conv_command + [fp, os.path.join(output_directory, "output")], capture_output=True)
Expand Down

0 comments on commit 1e42373

Please sign in to comment.