AutomationFlowsWeb Scraping › Sign PDF Documents with X.509 Certificates Using Pades Standards

Sign PDF Documents with X.509 Certificates Using Pades Standards

ByVigh Sandor @vighsandor on n8n.io

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Webhook trigger★★★★★ complexity65 nodesExecute CommandHTTP RequestRead Write FileRead Binary File
Web Scraping Trigger: Webhook Nodes: 65 Complexity: ★★★★★ Added:

This workflow corresponds to n8n.io template #10606 — we link there as the canonical source.

This workflow follows the Executecommand → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "DoTG98mBAQo2SOCm",
  "name": "PDF Digital Signature API with PAdES Standards Compliance",
  "tags": [],
  "nodes": [
    {
      "id": "42bd1f69-5f53-49b7-a1a7-10ebb299a3d8",
      "name": "Check Java",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -2944,
        480
      ],
      "parameters": {
        "command": "which keytool"
      },
      "typeVersion": 1
    },
    {
      "id": "1b2eaa5a-31f4-4bed-80da-14b595c2ad86",
      "name": "Java Missing?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2752,
        480
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.exitCode }}",
              "operation": "smallerEqual"
            }
          ],
          "string": [
            {
              "value1": "={{ $json.error }}",
              "value2": "keytool",
              "operation": "notContains"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e48c0bca-cc69-48e2-b921-2eb065c82a5e",
      "name": "Get Install Script",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2544,
        288
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/install-deps.sh",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "installdeps"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4f9ea5c0-06f7-4780-94d2-9267d0906a17",
      "name": "Write Install Script",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -2544,
        432
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/install-deps.sh",
        "operation": "write",
        "dataPropertyName": "installdeps"
      },
      "typeVersion": 1
    },
    {
      "id": "655b1703-3140-4ba5-9c3e-7cb1823087f5",
      "name": "Install Dependencies",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -2544,
        592
      ],
      "parameters": {
        "command": "sh /tmp/install-deps.sh"
      },
      "typeVersion": 1
    },
    {
      "id": "15d3a575-813d-4744-ac75-dc8b62721eff",
      "name": "Extract Password",
      "type": "n8n-nodes-base.set",
      "position": [
        -1840,
        480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "pfx-pass",
              "name": "pfxPassword",
              "type": "string",
              "value": "={{ $('Webhook').item.json.body.pfxPassword }}"
            },
            {
              "id": "timestamp",
              "name": "timestamp",
              "type": "string",
              "value": "={{ Date.now() }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "d5069001-989f-4464-b439-a716c10b5fe1",
      "name": "Read Signed PDF",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        1088,
        480
      ],
      "parameters": {
        "filePath": "=/tmp/output_{{ $('Extract Password').item.json.timestamp }}.pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "ebe22a19-cc73-4fd3-989c-0391e7c16ad9",
      "name": "Return Signed PDF",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1296,
        480
      ],
      "parameters": {
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/pdf"
              },
              {
                "name": "Content-Disposition",
                "value": "attachment; filename=\"signed.pdf\""
              }
            ]
          }
        },
        "respondWith": "binary"
      },
      "typeVersion": 1
    },
    {
      "id": "6819e701-ddbb-4628-b3d3-e17d1dc60505",
      "name": "Get Cleanup Script",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1296,
        688
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/cleanup.sh",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "cleanup"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4b2703b8-0fb9-43d2-ae52-ed96377bab3a",
      "name": "Write Cleanup Script",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1472,
        688
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/cleanup.sh",
        "operation": "write",
        "dataPropertyName": "cleanup"
      },
      "typeVersion": 1
    },
    {
      "id": "176c4f1c-240b-4327-a5dc-a2144ea80460",
      "name": "Cleanup",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1648,
        688
      ],
      "parameters": {
        "command": "=sh /tmp/cleanup.sh {{ $('Extract Password').item.json.timestamp }}"
      },
      "typeVersion": 1
    },
    {
      "id": "04d5cd52-8db9-4b86-86fc-bc47b3e1b027",
      "name": "Add Codegic Trust",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -1504,
        176
      ],
      "parameters": {
        "command": "=sh /tmp/addtestcatrust.sh"
      },
      "typeVersion": 1
    },
    {
      "id": "8837fb0b-c411-4091-bf8d-be3f716cb4ce",
      "name": "Without Visible?",
      "type": "n8n-nodes-base.if",
      "position": [
        -416,
        480
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "570fb094-af64-4063-80e1-00b704b81168",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Webhook').item.json.body.isVisible }}",
              "rightValue": "false"
            },
            {
              "id": "58871fba-db23-43f5-aab8-82bdae666feb",
              "operator": {
                "type": "string",
                "operation": "notExists",
                "singleValue": true
              },
              "leftValue": "={{ $('Webhook').item.json.body.isVisible }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "2f1ec2b2-abc4-4a0e-a7d5-ef73539f0362",
      "name": "Switch Sign Visible",
      "type": "n8n-nodes-base.switch",
      "position": [
        -16,
        448
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "BASELINE-B",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d06157a1-c54c-49f4-9e0b-bfc70138d3a2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Webhook').item.json.body.signLevel }}",
                    "rightValue": "B"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "BASELINE-T",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1900ec58-0ac8-4434-a2ac-ac5449eecee6",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Webhook').item.json.body.signLevel }}",
                    "rightValue": "T"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "BASELINE-LT",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0d76968b-28e2-4101-b46a-8e4589457ea5",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Webhook').item.json.body.signLevel }}",
                    "rightValue": "LT"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "BASELINE-LTA",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ccfb4d79-f571-471d-ac49-df0e31edacd0",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $('Webhook').item.json.body.signLevel }}",
                    "rightValue": "LTA"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "60a1875d-da5f-4cb1-b4a7-2546af3c55bf",
      "name": "Write Files : PDF",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -3120,
        224
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/testpdf.pdf",
        "operation": "write",
        "dataPropertyName": "pdfFile"
      },
      "typeVersion": 1
    },
    {
      "id": "cb2b0233-7ff4-4fd1-8572-ecfa1db1d548",
      "name": "Write Files : PFX",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -3136,
        480
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/testcert.pfx",
        "operation": "write",
        "dataPropertyName": "pfxFile"
      },
      "typeVersion": 1
    },
    {
      "id": "76f2d0a6-22a4-4322-9967-3ec2e957e32c",
      "name": "Write Files : LOGO",
      "type": "n8n-nodes-base.readWriteFile",
      "onError": "continueRegularOutput",
      "position": [
        -3120,
        704
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/logo.png",
        "operation": "write",
        "dataPropertyName": "logoFile"
      },
      "typeVersion": 1
    },
    {
      "id": "019bc397-be12-42cb-9de7-7c5cc8e8d37a",
      "name": "Write JAR",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -2032,
        480
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/open-pdf-sign.jar",
        "operation": "write",
        "dataPropertyName": "open-pdf-sign"
      },
      "typeVersion": 1
    },
    {
      "id": "c149f45c-1175-47c5-a8fe-7802e7dc1110",
      "name": "Get JAR",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2256,
        480
      ],
      "parameters": {
        "url": "https://github.com/open-pdf-sign/open-pdf-sign/releases/download/v0.3.0/open-pdf-sign.jar",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "open-pdf-sign"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e822ed1b-5d8c-48c9-970f-44bcd358532b",
      "name": "Get Process Script",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -752,
        480
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/processpdf.sh",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "processpdf"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e16405b9-9f33-44ae-844f-41e91ec0a0c1",
      "name": "Write Process Script",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -576,
        480
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/processpdf.sh",
        "operation": "write",
        "dataPropertyName": "processpdf"
      },
      "typeVersion": 1
    },
    {
      "id": "1ae7737c-06ed-4c2d-9365-59811698fb48",
      "name": "Get Trust Script",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1840,
        176
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/addtestcatrust.sh",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "addtestcatrust"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0b230a4f-39b2-4d12-86e8-c32423e427f8",
      "name": "Write Trust Script",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1664,
        176
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/addtestcatrust.sh",
        "operation": "write",
        "dataPropertyName": "addtestcatrust"
      },
      "typeVersion": 1
    },
    {
      "id": "dc14cc4f-c376-4dfb-af97-f6079d4ce94e",
      "name": "Get Cert Script",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1296,
        480
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/pfx-split.sh",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file",
              "outputPropertyName": "pfx-split"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6c9a35bf-a98e-4ee0-8c63-9442dc236c30",
      "name": "Write Cert Script",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1120,
        480
      ],
      "parameters": {
        "options": {},
        "fileName": "/tmp/pfx-split.sh",
        "operation": "write",
        "dataPropertyName": "pfx-split"
      },
      "typeVersion": 1
    },
    {
      "id": "e6bea17e-1737-463d-a4b7-cc30752e0628",
      "name": "Run Cert Script",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -944,
        480
      ],
      "parameters": {
        "command": "=sh /tmp/pfx-split.sh /tmp/cert_{{ $('Extract Password').item.json.timestamp }}.pfx {{ $('Extract Password').item.json.pfxPassword }} {{ $('Extract Password').item.json.timestamp }}"
      },
      "typeVersion": 1
    },
    {
      "id": "452d0354-b8f7-41d5-a339-d98c80909148",
      "name": "Read PDF",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1664,
        480
      ],
      "parameters": {
        "options": {
          "dataPropertyName": "toProcess"
        },
        "fileSelector": "/tmp/testpdf.pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "1dc95284-a0f3-48ff-85d6-5c2a54751441",
      "name": "Write PDF",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1664,
        688
      ],
      "parameters": {
        "options": {},
        "fileName": "=/tmp/input_{{$('Extract Password').item.json.timestamp }}.pdf",
        "operation": "write",
        "dataPropertyName": "toProcess"
      },
      "typeVersion": 1
    },
    {
      "id": "131635d9-bcaa-48bc-8a4d-2a71c3b7c7a8",
      "name": "Read PFX",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1472,
        480
      ],
      "parameters": {
        "options": {
          "dataPropertyName": "withProcess"
        },
        "fileSelector": "/tmp/testcert.pfx"
      },
      "typeVersion": 1
    },
    {
      "id": "02b89e37-d4e5-4fed-a89d-a4731a79b558",
      "name": "Write PFX",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -1472,
        688
      ],
      "parameters": {
        "options": {},
        "fileName": "=/tmp/cert_{{ $('Extract Password').item.json.timestamp }}.pfx",
        "operation": "write",
        "dataPropertyName": "withProcess"
      },
      "typeVersion": 1
    },
    {
      "id": "5049c1f0-919b-461b-8b88-25520a192c10",
      "name": "Show Visible",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        608
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "visibleParams",
              "type": "string",
              "value": " -v -p 1"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e16168a3-227e-43b5-bd4c-4fa721a3130a",
      "name": "No Visible",
      "type": "n8n-nodes-base.set",
      "position": [
        -240,
        352
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "visibleParams",
              "type": "string",
              "value": " "
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "3e55deee-e7c0-4838-b65e-bd6e96fd718b",
      "name": "B",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "signatureLevel",
              "type": "string",
              "value": " basic"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "5c392f56-ad92-477a-8acf-6b1ffa11a5a0",
      "name": "T",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "signatureLevel",
              "type": "string",
              "value": "timestamp"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "8ec7897f-6d43-4d5e-befc-d96f3954ad22",
      "name": "LT",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        624
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "signatureLevel",
              "type": "string",
              "value": "baseline-lt"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "d708bee2-bd62-478b-8e7f-f5d48140b9d1",
      "name": "LTA",
      "type": "n8n-nodes-base.set",
      "position": [
        368,
        832
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "signatureLevel",
              "type": "string",
              "value": "baseline-lta"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "26107a33-9807-4cad-90f2-4b59ae072cbb",
      "name": "Components",
      "type": "n8n-nodes-base.set",
      "position": [
        672,
        480
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "88d2ec97-a1bb-4576-ae17-16292eca4910",
              "name": "components",
              "type": "string",
              "value": "=-i /tmp/input_{{ $('Extract Password').item.json.timestamp }}.pdf -o /tmp/output_{{ $('Extract Password').item.json.timestamp }}.pdf -c /tmp/cert_{{ $('Extract Password').item.json.timestamp }}.pem -k /tmp/key_{{ $('Extract Password').item.json.timestamp }}.pem"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "ade49a30-3227-449c-9d3d-58ef6825bb8d",
      "name": "Sign PDF",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        880,
        480
      ],
      "parameters": {
        "command": "=sh /tmp/processpdf.sh {{ $json.components }} -m {{ $json.signatureLevel }} {{ $json.visibleParams }}"
      },
      "typeVersion": 1
    },
    {
      "id": "03cd41c2-cd33-4d21-9f18-5b9e2a780858",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -16
      ],
      "parameters": {
        "width": 624,
        "height": 368,
        "content": "## Testing Help\n\nAdding certificates associated with accessing the digital signature certificate issuer portal used for testing to the trusted list.\nWhen using a production certificate, this step can be skipped and 'Save PDF' and 'Save PFX' can be linked directly."
      },
      "typeVersion": 1
    },
    {
      "id": "dc78b230-94a1-43f3-be40-756cdb9f4363",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        -112
      ],
      "parameters": {
        "width": 304,
        "height": 656,
        "content": "## Testing Help\n\nWith the digital signature certificate used for testing, only 'Sign PDF - PAdES-BASELINE-B' and 'Sign PDF - PAdES-BASELINE-T' are available due to the lack of a service that provides download of revocation information from the certificate issuer. \nIn a full-fledged production environment, all 4 signature solutions can be used (this requires the use of a full-fledged certificate)."
      },
      "typeVersion": 1
    },
    {
      "id": "d7b0f47b-7d52-4d81-869a-e19f577a3106",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        1008
      ],
      "parameters": {
        "color": 5,
        "width": 592,
        "height": 352,
        "content": "## Implementation information:\nThe visible signature image is placed by Design in the top left corner (it can be further customized by setting the 'top' , 'left' , 'width' parameters) and displays the Signee, the Timestamp and the accompanying text (Hint). These labels can be modified, as can the hint text. The content of the signer and the timestamp cannot be customized (the former comes from the certificate, the latter from the time of signing).\n\n\n**Extra parameters:**\n  **-hint \"text\"** : _text to be displayed in signature field_\n  **-image-only** : _Only use the image as signature content_\n  **-label-hint \"text\"** : _label for the 'hint' row_\n  **-label-signee \"text\"** : _label for the 'signee' row_\n  **-label-timestamp \"text\"** : _label for the 'timestamp' row_\n  **-no-hint** : _don't display a hint row_\n  **-signature-reason \"text\"** : _The signature creation reason_"
      },
      "typeVersion": 1
    },
    {
      "id": "cda022d3-006e-436e-a3ab-7aa51cc20a34",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1120,
        192
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 224,
        "content": "## Response Handling\n\nReads signed PDF and returns to client:\n- Content-Type: application/pdf\n- Attachment disposition\n- Binary response\n\nFollowed by cleanup of temporary files for security."
      },
      "typeVersion": 1
    },
    {
      "id": "71d0eec1-cbe1-4d88-b7c8-bb742f366b94",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3328,
        912
      ],
      "parameters": {
        "color": 4,
        "width": 464,
        "height": 336,
        "content": "## Configuration Notes\n\nRequired webhook path: /pdf-sign\n\nTemporary file locations:\n- testpdf.pdf\n- testcert.pfx  \n- logo.png\n- open-pdf-sign.jar\n\nTSA endpoint configured automatically.\nFile cleanup: Automatic after each request."
      },
      "typeVersion": 1
    },
    {
      "id": "f002d95f-6978-452c-bd80-6b731f727d4b",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3632,
        608
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 288,
        "content": "## Workflow Entry Point\n\nThis webhook accepts POST requests with multipart form data containing:\n- PDF file to sign\n- PFX certificate\n- Certificate password\n- Signature level (B, T, LT, LTA)\n- Visibility option\n\nEndpoint: /webhook/pdf-sign"
      },
      "typeVersion": 1
    },
    {
      "id": "62b36389-4536-446a-8e05-d1e281c9d3e4",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3248,
        -64
      ],
      "parameters": {
        "color": 4,
        "width": 368,
        "height": 240,
        "content": "## File Upload Process\n\nExtracts and writes uploaded files to temporary locations:\n- /tmp/testpdf.pdf - Input PDF document\n- /tmp/testcert.pfx - Digital certificate\n- /tmp/logo.png - Optional signature logo\n\nAll files are processed in memory before writing."
      },
      "typeVersion": 1
    },
    {
      "id": "14de4725-cba3-4fcc-8290-780335b25ac0",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2736,
        752
      ],
      "parameters": {
        "color": 4,
        "width": 464,
        "height": 208,
        "content": "## Dependency Management\n\nAutomatically checks and installs required dependencies:\n- Java 11 JRE\n- Network tools\n- PDF signing library\n\nRuns only once per container lifecycle."
      },
      "typeVersion": 1
    },
    {
      "id": "1fdd7c66-15e6-4baa-877a-52c303dfed37",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        656
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 176,
        "content": "## Certificate Processing\n\nExtracts components from PFX certificate:\n1. Certificate chain (.pem)\n2. Private key (.pem)\n3. Adds timestamp for unique file naming"
      },
      "typeVersion": 1
    },
    {
      "id": "db7142fb-a017-4d4f-a849-e31f18a3ced0",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 336,
        "height": 240,
        "content": "## Signature Level Selection\n\nRoutes to appropriate PAdES signature level:\n\nBASELINE-B - Basic signature (no timestamp)\nBASELINE-T - With timestamp (recommended)\nBASELINE-LT - Long-term validation\nBASELINE-LTA - Long-term archival\n\nBranches based on visibility preference."
      },
      "typeVersion": 1
    },
    {
      "id": "cae0b264-d552-43e9-b81d-79a667a83597",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 256,
        "content": "## Invisible Signatures\n\nNo visible mark on PDF document.\nSignature embedded in metadata.\n\nSupported levels:\n- BASELINE-B (fastest)\n- BASELINE-T (recommended)\n- BASELINE-LT (long-term)\n- BASELINE-LTA (archival)"
      },
      "typeVersion": 1
    },
    {
      "id": "47ccb1d2-5591-4163-adf9-294b5227e308",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -448,
        752
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 240,
        "content": "## Visible Signatures\n\nAdds visual signature stamp to PDF.\nIncludes logo and signature details.\n\nRequires /tmp/logo.png file.\nSignature appears on page 1 by default.\n\nCustomize with parameters:\n-hint, -label-signee, -label-timestamp"
      },
      "typeVersion": 1
    },
    {
      "id": "20211c74-84b9-45da-8a50-ced0fb8fff3a",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        688
      ],
      "parameters": {
        "color": 6,
        "height": 176,
        "content": "## Customize \nIf you want to further customize the process, it is recommended to load the original script solution locally into the 'Execute Command' and use it as a starting point."
      },
      "typeVersion": 1
    },
    {
      "id": "bc168678-3e5c-4ca7-a28b-80cb0d9ce9f3",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3392,
        480
      ],
      "parameters": {
        "path": "pdf-sign",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "a5a15088-a7cf-4742-a587-2195acf2c80c",
      "name": "Webhook - LandingPage-LangHU",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -4416,
        640
      ],
      "parameters": {
        "path": "hu/signpage",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "13d06e50-a167-4e1c-b1a3-6b24cfe964df",
      "name": "Respond to Webhook - LandingPage-LangHU",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -4016,
        640
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "text/html"
              }
            ]
          }
        },
        "respondWith": "binary"
      },
      "typeVersion": 1.4
    },
    {
      "id": "45c47522-9c43-4cc7-b48a-e35b4c2e9a4f",
      "name": "Webhook - LandingPage-LangEN",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -4416,
        288
      ],
      "parameters": {
        "path": "en/signpage",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "c70f7ad2-0098-493d-aa55-265a0cc48dda",
      "name": "Respond to Webhook - LandingPage-LangEN",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -4016,
        288
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "text/html"
              }
            ]
          }
        },
        "respondWith": "binary"
      },
      "typeVersion": 1.4
    },
    {
      "id": "d12a1c28-e84f-486a-a6fe-5b233cc53c45",
      "name": "Webhook - LandingPage-LangDE",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -4416,
        464
      ],
      "parameters": {
        "path": "de/signpage",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "94650079-2ea5-46fe-ad58-fb922ee29c4f",
      "name": "Respond to Webhook - LandingPage-LangDE",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -4016,
        464
      ],
      "parameters": {
        "options": {
          "responseCode": 200,
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "text/html"
              }
            ]
          }
        },
        "respondWith": "binary"
      },
      "typeVersion": 1.4
    },
    {
      "id": "1479b880-69b8-4e44-9163-caa111fd2de1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4496,
        80
      ],
      "parameters": {
        "color": 4,
        "width": 704,
        "height": 736,
        "content": "## Landing Pages for Use PDF Sign\nThe signature form interfaces are available in **English, German and Hungarian** at the following URLs:\n\n**In English** -- {http/https} : // {access your own n8n server's IP address or FQDN} /en/signpage\n\n**In German** -- {http/https} : // {access your own n8n server's IP address or FQDN} /de/signpage\n\n**In Hungarian** -- {http/https} : // {access your own n8n server's IP address or FQDN} /hu/signpage"
      },
      "typeVersion": 1
    },
    {
      "id": "f40cbc91-cf42-4786-9bf1-9c52f93469fe",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4496,
        880
      ],
      "parameters": {
        "width": 704,
        "height": 96,
        "content": "## CURL Examples\nSee examples at: https://github.com/vighsandor/n8n-externals/blob/main/landingpages-for-pdfsign-workflow/curl-examples.md"
      },
      "typeVersion": 1
    },
    {
      "id": "2b9892b2-90a8-403d-8188-ddfc22c48898",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        176
      ],
      "parameters": {
        "color": 5,
        "width": 592,
        "height": 96,
        "content": "## PDF Signing with open-pdf-sign\nSee informations at: https://github.com/vighsandor/n8n-externals/blob/main/landingpages-for-pdfsign-workflow/pdf-signing.md"
      },
      "typeVersion": 1
    },
    {
      "id": "e498cd00-9d6f-452a-a353-97036f01ea2b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        368
      ],
      "parameters": {
        "color": 5,
        "width": 704,
        "height": 96,
        "content": "## Testing PDF Signatures with Codegic Free Certificates\nSee informations at: https://github.com/vighsandor/n8n-externals/blob/main/landingpages-for-pdfsign-workflow/test-certificates.md\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d069ac99-abb3-4fba-8609-5880fc4f9900",
      "name": "Get LandingPage-LangEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4208,
        288
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/en.html",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fd6bacf9-c41d-40a1-9d92-1f8d4a8b20b8",
      "name": "Get LandingPage-LangDE",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4208,
        464
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/de.html",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "231c9387-aa6a-4535-9534-3aacb080c641",
      "name": "Get LandingPage-LangHU",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -4208,
        640
      ],
      "parameters": {
        "url": "https://raw.githubusercontent.com/vighsandor/n8n-externals/main/landingpages-for-pdfsign-workflow/hu.html",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1a47bad6-825d-4253-a99a-9d31f35b5872",
  "connections": {
    "B": {
      "main": [
        [
          {
            "node": "Components",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "T": {
      "main": [
        [
          {
            "node": "Components",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LT": {
      "main": [
        [
          {
            "node": "Components",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LTA": {
      "main": [
        [
          {
            "node": "Components",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get JAR": {
      "main": [
        [
          {
            "node": "Write JAR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Write Files : PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read PDF": {
      "main": [
        [
          {
            "node": "Write PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read PFX": {
      "main": [
        [
          {
            "node": "Write PFX",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sign PDF": {
      "main": [
        [
          {
            "node": "Read Signed PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write JAR": {
      "main": [
        [
          {
            "node": "Extract Password",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write PDF": {
      "main": [
        [
          {
            "node": "Get Trust Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write PFX": {
      "main": [
        [
          {
            "node": "Get Cert Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Java": {
      "main": [
        [
          {
            "node": "Java Missing?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Components": {
      "main": [
        [
          {
            "node": "Sign PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Visible": {
      "main": [
        [
          {
            "node": "Switch Sign Visible",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Show Visible": {
      "main": [
        [
          {
            "node": "Switch Sign Visible",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Java Missing?": {
      "main": [
        [
          {
            "node": "Get JAR",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Install Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Cert Script": {
      "main": [
        [
          {
            "node": "Write Cert Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Signed PDF": {
      "main": [
        [
          {
            "node": "Return Signed PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Cert Script": {
      "main": [
        [
          {
            "node": "Get Process Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Password": {
      "main": [
        [
          {
            "node": "Read PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Trust Script": {
      "main": [
        [
          {
            "node": "Write Trust Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Without Visible?": {
      "main": [
        [
          {
            "node": "No Visible",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Show Visible",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Codegic Trust": {
      "main": [
        [
          {
            "node": "Read PFX",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Return Signed PDF": {
      "main": [
        [
          {
            "node": "Get Cleanup Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Cert Script": {
      "main": [
        [
          {
            "node": "Run Cert Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Files : PDF": {
      "main": [
        [
          {
            "node": "Write Files : PFX",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Files : PFX": {
      "main": [
        [
          {
            "node": "Write Files : LOGO",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Cleanup Script": {
      "main": [
        [
          {
            "node": "Write Cleanup Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Install Script": {
      "main": [
        [
          {
            "node": "Write Install Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Process Script": {
      "main": [
        [
          {
            "node": "Write Process Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Files : LOGO": {
      "main": [
        [
          {
            "node": "Check Java",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Trust Script": {
      "main": [
        [
          {
            "node": "Add Codegic Trust",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch Sign Visible": {
      "main": [
        [
          {
            "node": "B",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "T",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LT",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "LTA",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Install Dependencies": {
      "main": [
        [
          {
            "node": "Get JAR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Cleanup Script": {
      "main": [
        [
          {
            "node": "Cleanup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Install Script": {
      "main": [
        [
          {
            "node": "Install Dependencies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Process Script": {
      "main": [
        [
          {
            "node": "Without Visible?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get LandingPage-LangDE": {
      "main": [
        [
          {
            "node": "Respond to Webhook - LandingPage-LangDE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get LandingPage-LangEN": {
      "main": [
        [
          {
            "node": "Respond to Webhook - LandingPage-LangEN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get LandingPage-LangHU": {
      "main": [
        [
          {
            "node": "Respond to Webhook - LandingPage-LangHU",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - LandingPage-LangDE": {
      "main": [
        [
          {
            "node": "Get LandingPage-LangDE",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - LandingPage-LangEN": {
      "main": [
        [
          {
            "node": "Get LandingPage-LangEN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - LandingPage-LangHU": {
      "main": [
        [
          {
            "node": "Get LandingPage-LangHU",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.

Source: https://n8n.io/workflows/10606/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

JFCandia_Flujo. Uses executeCommand, emailSend, readWriteFile, httpRequest. Webhook trigger; 8 nodes.

Execute Command, Email Send, Read Write File +1
Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

Track Changes Of Product Prices. Uses htmlExtract, functionItem, httpRequest, writeBinaryFile. Scheduled trigger; 25 nodes.

Html Extract, Function Item, HTTP Request +5
Web Scraping

This workflow automatically tracks changes on specific websites, typically in e-commerce where you want to get information about price changes. Basic knowledge of HTML and JavaScript Execute Command n

Html Extract, Function Item, HTTP Request +5
Web Scraping

extract_swifts. Uses manualTrigger, httpRequest, htmlExtract, splitInBatches. Event-driven trigger; 23 nodes.

HTTP Request, Html Extract, MongoDB +5