Post requests

In request to create preview or create and save preview you need to send body of type multipart/form-data with field file which muste contain a pdf file and pass in header Authorization api key of your project. You can pass query parameters in the url to change width, height or density of preview image. To pass width parameter use w key, for height h and for density d.

Get requests

In request to get preview you need to pass in header Authorization api key of your project.

POST
https://pdf-preview.ru/api/preview
Create preview and returns preview encoded in base64
POST
https://pdf-preview.ru/api/preview/save
Create preview, saves it and returns id of preview
GET
https://pdf-preview.ru/api/preview/{previewId}

Get preview by id and returns it encoded in base64 (Replace {previewId} with id of preview which you want get)

© 2025 Pdf-preview