from ironpdf import *
# Open a 128 bit encrypted PDF
pdf = PdfDocument.FromFile("encrypted.pdf", "password")
# Get all images
all_images = pdf.ExtractAllImages()
for i, image in enumerate(all_images):
image.SaveAs(f"output_image_{i}.png")
# Or even find the precise text and images for each page in the document
for index in range(pdf.PageCount):
page_number = index + 1
images = pdf.ExtractBitmapsFromPage(index)
画像を抽出
