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)
#Open a 128 bit encrypted PDF
#Get all images
#Or even find the precise text and images for each page in the document
'INSTANT VB TODO TASK: The following line uses invalid syntax:
'from ironpdf import * pdf = PdfDocument.FromFile("encrypted.pdf", "password") all_images = pdf.ExtractAllImages() for i, image in enumerate(all_images): image.SaveAs(f"output_image_{i}.png") for index in range(pdf.PageCount): page_number = index + 1 images = pdf.ExtractBitmapsFromPage(index)