# Convert PDF to BMP in Python

> Convert PDF pages to BMP images in Python. Use the Aspose.Slides Python API to import a PDF and render each page as a BMP file.

Source: https://products.aspose.com/slides/python-net/conversion/pdf-to-bmp/
Updated: 2026-08-11



## Convert PDF to BMP in Python

[*Aspose.Slides for Python via .NET*](/slides/python-net/) lets you convert PDF pages to BMP images programmatically. Import the PDF pages into a `Presentation` by using `SlideCollection.add_from_pdf`, render each imported slide with `Slide.get_image`, and save the resulting `IImage` object in BMP format.

This workflow creates one BMP file for each page in the source PDF. You can test the conversion in your [browser](https://products.aspose.app/pdf/conversion/pdf-to-bmp) or use the Python API in your application.

Install the library from [PyPI](https://pypi.org/project/aspose-slides/) by using the following command:

### Console/Terminal

```console
pip install aspose-slides
```

## How to Convert PDF to BMP in Python

Follow these steps to convert a PDF file to BMP using Python.

Create a `Presentation`, remove its default slide, and import the PDF by using `SlideCollection.add_from_pdf`.

Iterate through `Presentation.slides` and render each imported page by using `Slide.get_image`.

Save each rendered image by using `IImage.save` with `ImageFormat.BMP`.

## System Requirements

Before running the Python conversion sample, make sure your environment meets these requirements.

- Microsoft Windows, macOS, or 64-bit Linux (see the [system requirements](https://docs.aspose.com/slides/python-net/system-requirements/)).
- Python 3.6 or later for this sample.
- Aspose.Slides for Python via .NET installed in your environment.

### This sample code shows how to convert PDF to BMP in Python

```python
image_scale = 2

with slides.Presentation() as presentation:
    presentation.slides.remove_at(0)
    presentation.slides.add_from_pdf("document.pdf")

    for slide in presentation.slides:
        file_path = f"document_page_{slide.slide_number}.bmp"
        with slide.get_image(image_scale, image_scale) as slide_image:
            slide_image.save(file_path, slides.ImageFormat.BMP)
```

## Save PDF as BMP in Python

Use the [free online app](https://products.aspose.app/pdf/conversion/pdf-to-bmp) to see the PDF-to-BMP conversion process in action.

## Other Supported Conversions

- [PDF TO EMF](/slides/python-net/conversion/pdf-to-emf/) — Enhanced Metafile Format
- [PDF TO FODP](/slides/python-net/conversion/pdf-to-fodp/) — OpenDocument Flat XML Presentation
- [PDF TO GIF](/slides/python-net/conversion/pdf-to-gif/) — Graphics Interchange Format
- [PDF TO HTML](/slides/python-net/conversion/pdf-to-html/) — Hypertext Markup Language
- [PDF TO JPG](/slides/python-net/conversion/pdf-to-jpg/) — JPEG Image
- [PDF TO ODP](/slides/python-net/conversion/pdf-to-odp/) — OpenDocument Presentation Format
- [PDF TO OTP](/slides/python-net/conversion/pdf-to-otp/) — OpenDocument Presentation Template
- [PDF TO PNG](/slides/python-net/conversion/pdf-to-png/) — Portable Network Graphics
- [PDF TO POT](/slides/python-net/conversion/pdf-to-pot/) — PowerPoint 97–2003 Template
- [PDF TO POTM](/slides/python-net/conversion/pdf-to-potm/) — PowerPoint Macro-Enabled Template
- [PDF TO POTX](/slides/python-net/conversion/pdf-to-potx/) — PowerPoint Template
- [PDF TO PPS](/slides/python-net/conversion/pdf-to-pps/) — PowerPoint Slide Show
- [PDF TO PPSM](/slides/python-net/conversion/pdf-to-ppsm/) — Macro-enabled Slide Show
- [PDF TO PPSX](/slides/python-net/conversion/pdf-to-ppsx/) — PowerPoint Slide Show
- [PDF TO PPT](/slides/python-net/conversion/pdf-to-ppt/) — PowerPoint 97-2003 Presentation
- [PDF TO PPTM](/slides/python-net/conversion/pdf-to-pptm/) — Macro-enabled Presentation File
- [PDF TO PPTX](/slides/python-net/conversion/pdf-to-pptx/) — Open XML Presentation Format
- [PDF TO SVG](/slides/python-net/conversion/pdf-to-svg/) — Scalable Vector Graphics
- [PDF TO SWF](/slides/python-net/conversion/pdf-to-swf/) — Small Web Format
- [PDF TO TIFF](/slides/python-net/conversion/pdf-to-tiff/) — Tagged Image File Format
- [PDF TO XPS](/slides/python-net/conversion/pdf-to-xps/) — XML Paper Specification
