Skip to main content

Find and remove empty pages from PDF

Find and remove empty pages from PDF

The suggested workflow for finding and deleting empty pages (where empty page meanse a page without a text):

  1. Call pdf/info endpoint to find number of pages in the document

  2. Use /pdf/convert/to/text-simple for every page and check if returned text is empty or not

  3. If page is empty then use /pdf/edit/delete-pages endpoint to delete this page (see https://developer.pdf.co/api/pdf-delete-pages for more details).

  4. Or use /pdf/split endpoint to split PDF to exclude given pages and then pdf/merge to merge into a new PDF.

If you use Zapier, Integromat/Make or similar plugin, you can use Custom API Call module to call any endpoint from PDF.co.

Did this answer your question?