PDF Generator API icon

PDF Generator API

Generate PDFs, manage templates, convert HTML/URLs to PDF, and perform PDF operations like watermarking, encryption, and optimization

Overview

This node integrates with a PDF generation and management API, enabling users to perform various PDF-related operations such as generating PDFs from templates, converting HTML or URLs to PDFs, managing stored documents, and applying PDF services like watermarking, encryption, and optimization.

Specifically for the Document - Delete operation, the node deletes a stored PDF document identified by its public ID. This is useful in scenarios where you want to programmatically remove outdated or unwanted PDF documents from your storage managed by the PDF service.

Practical example:
You have an automated workflow that generates invoices as PDFs and stores them. When an invoice is canceled or no longer needed, this node can be used to delete the corresponding PDF document by specifying its public ID, helping keep your document storage clean and up-to-date.

Properties

Name Meaning
Public ID The unique public identifier of the document to delete. Required to specify which document to remove.

Output

The output JSON object after a successful delete operation contains:

  • success: A boolean indicating if the deletion was successful (true).
  • message: A confirmation message string, e.g., "Document deleted successfully".
  • publicId: The public ID of the document that was deleted.

Example output JSON:

{
  "success": true,
  "message": "Document deleted successfully",
  "publicId": "the-public-id-of-the-deleted-document"
}

No binary data is returned for the delete operation.

Dependencies

  • Requires an API key credential for authenticating requests to the PDF Generator API.
  • The node makes HTTP DELETE requests to the API endpoint /documents/{publicId}.
  • The base URL for the API defaults to https://us1.pdfgeneratorapi.com/api/v4 but can be configured via credentials.

Troubleshooting

  • Error: Missing or invalid Public ID
    Ensure the "Public ID" property is provided and correctly references an existing document. An empty or incorrect ID will cause the API to fail.

  • Error: Authentication failure
    Verify that the API key credential is valid and has sufficient permissions to delete documents.

  • Error: Document not found
    If the specified public ID does not exist, the API may return a not found error. Confirm the public ID is correct.

  • Network or API errors
    Check network connectivity and API availability. Also, ensure the base URL is correct if customized.

Links and References


This summary covers the static analysis of the node's execute method focusing on the Document resource's Delete operation as requested.

Discussion