Zum Hauptinhalt springen

Overlay PDFs In n8n

Overlay PDFs ist ein PDF4me Knotenaktion in n8n das platziert eins PDF aufeinander, beide auf demselben pages Statt sie anzuhängen. Verwenden Sie es, um einen gestalteten Briefkopf über generierte Inhalte zu legen, einen Zertifikatsrahmen anzuwenden oder eine genehmigte Vorlage über ein eingehendes Dokument zu legen, ohne eine einzige Seite hinzuzufügen.

Was dieser Knoten bewirkt

PDF4me: Überlagerung PDFs benötigt zwei PDFs, A Base das als Hintergrund und ein Schicht das ganz oben liegt und ein einzelnes Dokument zurückgibt, in dem beide auf demselben Blatt erscheinen. pagesJede Datei hat ihren eigenen Eingabetyp, sodass die Basis als Binärdaten von einem vorherigen Knoten stammen kann, während die Ebene von einem anderen Knoten abgerufen wird. URLIm Gegensatz zum Zusammenführen von Dokumenten erhöht sich die Seitenzahl nicht, was diese Methode zum idealen Werkzeug für Briefköpfe, Rahmen und Stempelvorlagen macht.

Verwandte Blog-Beiträge(1)

Authentifizierung Ihres API Anfrage

Jeder PDF4me Knoten in n8n erfordert eine gültige Anmeldeinformationen zum Verbinden mitErstellen oder wählen Sie einen Eintrag aus, der Ihre Daten enthält. PDF4me API Schlüssel, damit der Workflow Overlay-Anfragen sicher authentifizieren kann.

Wichtige Fakten, die Sie nicht verpassen sollten

Overlay wird nicht zusammengeführt
Zusammenführen von Anhängen pages Die Anzahl stimmt also. Beim Übereinanderstapeln werden beide Dokumente auf demselben Stapel angezeigt. pagesDie Seitenzahl bleibt unverändert.
Zwei Dateien, zwei unabhängige Eingabetypen
Basis PDF Eingabetyp und -schicht PDF Die Eingabetypen werden separat festgelegt, sodass eine Datei Binärdaten enthalten kann, während die andere von einem anderen System stammt. URLDie
Die Reihenfolge ändert, was sichtbar bleibt.
Die Ebene liegt über der Basisebene. Eine Ebene mit einfarbigem Hintergrund kann darunterliegende Inhalte verdecken. Testen Sie daher beide Reihenfolgen zunächst an einem Beispielpaar.
Der PDF4me-Knoten in n8n ist auf die Aktion „PDFs überlagern“ eingestellt, wobei sowohl der Eingabetyp des Basis-PDFs als auch der Eingabetyp des Layer-PDFs Binärdaten sind, die Binärfelddaten des Basis-PDFs und des Layer-PDFs, der Ausgabedateiname „overlayed_output.pdf“ und der Ausgabename für Binärdaten „data“ lauten.

PDF4me Overlay PDFs Parameterbereich in n8n, wobei beide Eingabetypen auf Binärdaten eingestellt sind.

Überlagerung vs. Zusammenführen vs. Wasserzeichen

Drei Möglichkeiten, zusätzlichen Inhalt in ein PDF, wobei jedes Mal ein anderes Dokument entsteht.

AnsatzAuswirkung auf die pagesOptimale Passform
Overlay PDFsBoth documents appear on the same pages, page count unchangedBranding that already exists as a designed PDF, such as a letterhead or certificate frame
Merge PDFsDocuments follow one another, page counts add upContent that genuinely belongs in sequence as one longer document
Add watermarkSimple text or a single image drawn onto the existing pagesA short notice such as DRAFT or CONFIDENTIAL, where no designed PDF layer exists

Welche Parameter werden überlagert? PDFs Brauchen?

Erforderlich: Die Felder „Aktion“, „beide Eingabetypen“, „das Quellfeld, das zu jedem Eingabetyp passt“ und „Ausgabedateiname“ sowie „Ausgabename für Binärdaten“ und alle Optionen unter „Erweiterte Optionen“ enthalten standardmäßige Arbeitswerte.

ParameterErforderlichWas es tutBeispiel
ActionRequiredSelects the PDF4me node action to run. Choose Overlay PDFs.Overlay PDFs
Base PDF Input TypeRequiredFormat of the background PDF. Choose Binary Data, Base64 String, or URL. Independent of the layer setting.Binary Data
Layer PDF Input TypeRequiredFormat of the PDF placed on top. Choose Binary Data, Base64 String, or URL. Independent of the base setting.Binary Data
Base PDF Binary FieldConditionalName of the binary property holding the base PDF. Required when Base PDF Input Type is Binary Data.data
Layer PDF Binary FieldConditionalName of the binary property holding the layer PDF. Required when Layer PDF Input Type is Binary Data.data
Base PDF Base64 ContentConditionalBase64-encoded content of the base PDF. Required when Base PDF Input Type is Base64 String.JVBERi0xLjQK...
Layer PDF Base64 ContentConditionalBase64-encoded content of the layer PDF. Required when Layer PDF Input Type is Base64 String.JVBERi0xLjQK...
Base PDF File URLConditionalPublicly reachable HTTPS URL to the base PDF. Required when Base PDF Input Type is URL.https://example.com/base.pdf
Layer PDF File URLConditionalPublicly reachable HTTPS URL to the layer PDF. Required when Layer PDF Input Type is URL.https://example.com/letterhead.pdf
Output File NameRequiredFilename for the combined PDF. Include the .pdf extension.overlayed_output.pdf
Binary Data Output NameOptionalName of the binary property the output item exposes. Defaults to data.data
Advanced OptionsOptionalCollection for extra processing settings, added with Add Option. Leave empty unless you have a specific requirement.No properties

Ausgabefelder

Ein erfolgreicher Lauf bringt eins zurück n8n Gegenstand, der die kombinierte PDFDie

FeldTypWas es enthält
Binary (data)BinaryThe combined PDF with the layer placed over the base, under Binary Data Output Name (default data).
fileNameStringGenerated filename, matching Output File Name.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the combined PDF in bytes.
docNameStringDocument name reference for the processed file, matching fileName.
overlayCompletedBooleanConfirms the overlay operation finished, useful as an explicit check that the layer was applied.
layersProcessedNumberCount of PDF layers combined into the final document.
successBooleanTrue when the operation completed, false on failure. Use it to branch error handling.
messageStringHuman-readable status message, carrying success confirmation or error detail.

Wie richte ich ein Overlay ein? PDFs In n8n?

  1. Hinzufügen PDF4me zu Ihrem n8n Workflow und wählen Sie den Overlay PDFs Aktion.
  2. In Anmeldeinformationen zum Verbinden mit, wählen Sie Ihre PDF4me Anmeldeinformationen oder klicken Neue Anmeldeinformationen erstellen und fügen Sie Ihren ein API Schlüssel.
  3. Satz Basis PDF Eingabetyp Und Schicht PDF EingabetypSie sind unabhängig, daher kann jede Datei auf unterschiedliche Weise ankommen.
  4. Füllen Sie die entsprechenden Quellfelder aus, zum Beispiel Basis PDF Binärfeld Und Schicht PDF Binärfeld, beide standardmäßig dataDie
  5. Satz Name der Ausgabedatei (muss enden in .pdf).
  6. Führe den Knoten aus und leite die kombinierte PDF, ausgesetzt unter Name der Binärdatenausgabezum nächsten Schritt.

Typische Konfigurationen

Workflow-BeispieleCommon n8n workflow patterns using Overlay PDFs.
Briefkopf auf generierten Dokumenten
  1. Es wird ein Dokument aus einer Vorlage ohne Branding generiert.
  2. Overlay PDFs verwendet den genehmigten Briefkopf PDF abgerufen von einem URL als die Schicht.
  3. Das Markenprodukt wird ausgeliefert, ohne dass ein Designer daran mitgewirkt hat.
Zertifikatrahmen über dynamischem Inhalt
  1. Die Daten zum Kursabschluss ergeben ein einfaches PDF mit dem Namen des Empfängers.
  2. Overlay PDFs legt den entworfenen Zertifikatsrand darüber.
  3. Jedes fertige Zertifikat wird per E-Mail an den Empfänger versendet.
Genehmigungsstempel auf Prüfdokumenten
  1. Ein Dokument schließt einen Genehmigungsschritt im Arbeitsablauf ab.
  2. Overlay PDFs bringt eine vordefinierte, genehmigte Stempelschicht an.
  3. Die abgestempelte Kopie wird im Archiv abgelegt.
Batch-Vorlagenanwendung
  1. Ein Loop-Over-Items-Knoten durchläuft einen Ordner mit eingehenden Lieferantendokumenten.
  2. Overlay PDFs wendet die gleiche Schicht an PDF von einem URL jedem einzelnen.
  3. Alle Dokumente werden mit einheitlicher Rahmung in das Archiv aufgenommen.

Praktische Tipps

Test both orderings before a batch run
Swapping which file is base and which is layer changes what stays visible. Prove it on one sample pair rather than discovering it across a hundred documents.
Design the layer with transparency in mind
A layer PDF with a solid white background will hide the base underneath. Frames, borders, and letterheads work best when the middle is genuinely empty.
Match page sizes where you can
A layer built at the same page size as the base lines up predictably. Mismatched geometry is the usual reason a stamp lands in the wrong place.
Mix input types to avoid extra nodes
Keeping a static letterhead at a URL while the base arrives as binary from the previous node saves fetching the template into the workflow separately.
Reach for merge when page count should grow
If the second document is meant to be read after the first rather than on top of it, Merge Multiple PDFs is the correct action.
Check overlayCompleted alongside success
The output carries an explicit overlay confirmation flag, which is a more specific signal than the generic success boolean alone.

Spickzettel

FeldWert
ActionOverlay PDFs
Base PDF Input TypeBinary Data
Layer PDF Input TypeBinary Data
Base PDF Binary Fielddata
Layer PDF Binary Fielddata
Output File Nameoverlayed_output.pdf
Binary Data Output Namedata
Advanced OptionsNo properties
CredentialsPDF4me API credential

Häufig gestellte Fragen

What is the difference between overlaying PDFs and merging PDFs?+
Merging appends documents so the page count adds up and the files read one after another. Overlaying places the layer PDF on top of the base PDF on the same pages, so the page count does not grow and both sets of content appear together. Use overlay for letterheads, watermarks, and template stamps, and use merge when documents should follow each other.
Which file should be the base and which should be the layer?+
The base PDF is the background, and the layer PDF is placed on top of it, following the page content model described in the ISO 32000 PDF specification. For a letterhead applied to generated content, the content is usually the base and the branded template is the layer. If the layer has a solid background it can obscure what sits beneath, so test the order both ways on a sample first.
What happens if the two PDFs have different page counts?+
The two documents do not have to be identical, but the result is easiest to predict when they match or when the layer is a single page intended to repeat as a stamp. Run one representative pair through the node and inspect the output before committing a batch, since mismatched lengths are the most common cause of a surprising result.
Can the base and layer PDFs come from different sources?+
Yes. Base PDF Input Type and Layer PDF Input Type are set independently, so the base can arrive as Binary Data from a previous node in your n8n workflow while the layer is fetched from a URL, or any other combination.
Should I use Overlay PDFs or a watermark action for branding?+
Use a watermark action when you want simple text or a single image placed on the pages. Use Overlay PDFs when your branding already exists as a full PDF, such as a designed letterhead or a pre-approved certificate frame, because it preserves the layer document exactly as designed.

Verwandte Aktionen

Dieselbe Aufgabe auf anderen Plattformen

Hilfe erhalten