from pdf2image import convert_from_path

# Convert a PDF to images
images = convert_from_path(r"u:\Dropbox\!!!Days\Downloads Z230\Dokumentace\a.pdf")

# Save the images
for i, image in enumerate(images):
    image.save(f"page_{i + 1}.jpg", "JPEG")