How to split PDF by file size

How to split PDF by file size

To split a PDF by size, you'll need to first identify the size of a single page. Please use the /pdf/split endpoint to split the 1st page.

Once you have identified the size of a single page, you can then set the number of pages it needs to reach your ideal file size.

The example below assumes that the PDF's file size is 30MB and it needs to be split by 10MB chunks. Each page is 1MB in size. We will use the same /pdf/split endpoint and set the page ranges.

{
    "url": "https://fileurl",
    "pages": "1-10,11-20,21-30"
}

The snippet above will return 3 PDF files with 10MB file size each.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.