Skip to content

Instantly share code, notes, and snippets.

View kapiecii's full-sized avatar

kapiecii kapiecii

View GitHub Profile
import os
from pdf2image import convert_from_path
from PIL import Image
def pdf_to_single_image(pdf_path, output_path, dpi=150):
pages = convert_from_path(pdf_path, dpi=dpi)
# 最初のページのサイズを取得
width, height = pages[0].size
@kapiecii
kapiecii / start-docker.sh
Created July 13, 2024 01:58
雑にcontainerを起動して検証するときに使うスクリプト
docker container run -it --name tmp-name --mount type=bind,source="$(pwd)"/data/,target=/mnt --rm python:3.10.8-slim-bullseye bash