---
title: "iOS PDF-to-image library — Convert PDF to JPG, PNG, TIFF | Nutrient"
canonical_url: "https://www.nutrient.io/guides/ios/conversion/pdf-to-image/"
md_url: "https://www.nutrient.io/guides/ios/conversion/pdf-to-image.md"
last_updated: "2026-06-08T09:14:14.397Z"
description: "IOS PDF-to-image library — Convert PDF to JPG, PNG, TIFF | guide for Nutrient iOS SDK with detailed instructions and code examples."
---

# Convert PDFs to images on iOS

To render an image from a PDF file in Nutrient iOS SDK, you need to do the following:

```swift

// Create a URL for the PDF file.
guard let path = Bundle.main.path(forResource: "report", ofType: "pdf") else { return }
let url = URL(fileURLWithPath: path)

// Instantiate a `Document` from the PDF file's URL.
let document = Document(url: url)

let pageIndex: PageIndex = 0
guard let pageImageSize = document.pageInfoForPage(at: pageIndex)?.mediaBox.size else { return }

// Create a render request from your `Document`.
let request = MutableRenderRequest(document: document)
request.imageSize = pageImageSize
request.pageIndex = pageIndex

do {
    // Create a render task using the `MutableRenderRequest`.
    let task = try RenderTask(request: request)
    task.priority =.utility
    PSPDFKit.SDK.shared.renderManager.renderQueue.schedule(task)

    // The page is rendered as a `UIImage`.
    let image = try PSPDFKit.SDK.shared.cache.image(for: request, imageSizeMatching: [.allowLarger])
} catch {
    // Handle error.
}

```

The [`RenderTask`](https://www.nutrient.io/api/ios/documentation/pspdfkit/rendertask) API used in the above example is an asynchronous API that won’t block the main thread when rendering a PDF page to an image. It includes an image cache by default, so multiple render calls for the same page are fetched directly from the cache. For a more detailed explanation of image rendering, check out our guide on [rendering PDF pages](https://www.nutrient.io/guides/ios/getting-started/rendering-pdf-pages.md) and our blog post on [converting a PDF to an image](https://www.nutrient.io/blog/convert-pdf-to-image-in-swift/).

Additionally, Nutrient provides another API to render a PDF page to an image: [`imageForPage:at:size:clippedTo:annotations:options`](https://www.nutrient.io/api/ios/documentation/pspdfkit/document/imageforpage(at:size:clippedto:annotations:options:)). One thing to keep in mind is that this is a synchronous call that will block the main thread when it’s rendering a particularly large or complex PDF page.
---

## Related pages

- [Convert images to PDF on iOS](/guides/ios/conversion/image-to-pdf.md)
- [Convert images to text on iOS](/guides/ios/conversion/image-to-text.md)
- [Convert HTML to PDF on iOS](/guides/ios/conversion/html-to-pdf.md)
- [PDF conversion library for iOS](/guides/ios/conversion.md)
- [Scan and convert to searchable PDFs on iOS](/guides/ios/conversion/scan-to-searchable-pdf.md)
- [MS Office converter for iOS](/guides/ios/features/office-conversion.md)

