# Resize PDF Files Online

Display PDF files as images simply by applying any of Sirv’s image processing options. For example, show the PDF as a 400px width image by appending **?w=400** to the URL.

Using an AI coding agent?

Install the [`sirv-dynamic-imaging`](https://www.skills.sh/sirv/image-optimization-skill/sirv-dynamic-imaging) skill, and your agent can build these image URLs for you. Ask in plain words, such as “Serve our product photos as 800px WebP.” [See all 8 skills](/help/rest-api/sirv-skills-for-ai-agents/)

The first page will be displayed, or you can use the **page** parameter to specify which page should be shown. Try it in the demo below.

Try it

![PDF file, page 1](https://demo.sirv.com/QW.pdf?page=1&w=800)

PDF file, page 1

PDF · 5 pages · 650 KB

With options

Loading…

Page

12345

Width

px%

Height

px%

Format

OptimalPNGJPEG

Quality80

https://demo.sirv.com/QW.pdf**?page=2&w=600**

[](https://demo.sirv.com/QW.pdf?page=2&w=600)

The PDF will be converted to an AVIF image if the users browser supports AVIF, otherwise a PNG will be served. Alternatively, you can specify which image format should be served.
