PDF.co API icon

PDF.co API

Generate PDF, extract data from PDF, split PDF, merge PDF, convert PDF. Fill PDF forms, add text and images to pdf and much more with pdf.co!

Delete PDF Pages

AI-generated

Overview

This node deletes specified pages from a PDF file accessible via a URL. It is useful for scenarios where you need to remove unwanted pages from a PDF document without downloading and manually editing it. For example, you can delete confidential pages from a report before sharing it or remove blank pages from scanned documents.

Use Case Examples

  1. Delete pages 1, 3, and 5 to 7 from a PDF document hosted online by providing the PDF URL and the pages to delete.
  2. Use advanced options to specify a custom output file name and set a webhook URL to receive the processed PDF.

Properties

Name Meaning
Authentication Selects the authentication method to access the PDF processing service (API Key or OAuth2).
PDF URL The URL of the PDF file from which pages will be deleted.
Pages Comma-separated list of page numbers or ranges to delete from the PDF (e.g., "1,3,5-7").
Advanced Options Additional optional settings for the operation.

Output

JSON

  • url - URL of the processed PDF file with the specified pages deleted.
  • pagesDeleted - List or description of pages that were deleted from the PDF.
  • fileName - Name of the output PDF file.

Dependencies

  • An API key credential or OAuth2 authentication for the PDF processing service.

Troubleshooting

  • Ensure the PDF URL is accessible and correct; inaccessible URLs will cause errors.
  • Verify the pages string format is correct (e.g., "1,3,5-7"); invalid formats may cause the operation to fail.
  • Check authentication credentials are valid and have sufficient permissions.
  • If using HTTP username and password, ensure they are correct for accessing the source PDF URL.
  • If the output file name is not specified, the default name will be used; naming conflicts might occur if multiple files are processed simultaneously.

Links

Discussion