Passa al contenuto principale

Sovrapposizione PDFs In n8n

Sovrapposizione PDFs è un PDF4me azione del nodo in n8n che mette uno PDF sopra un altro, combinandoli entrambi sullo stesso pages Invece di aggiungerli. Usalo per stampare una carta intestata progettata sopra il contenuto generato, applicare una cornice per un certificato o sovrapporre un modello approvato a un documento in arrivo senza aggiungere una singola pagina.

Cosa fa questo nodo

PDF4me: Sovrapposizione PDFs ci vogliono due persone PDFs, UN base che funge da sfondo e da strato che si trova sopra e restituisce un singolo documento in cui entrambi appaiono sullo stesso pagesOgni file ha il proprio tipo di input, quindi la base può provenire da un nodo precedente come dati binari mentre il layer viene estratto da un URLA differenza della funzione di unione, il numero di pagine non aumenta, il che la rende lo strumento ideale per carta intestata, cornici e timbri modello.

Articoli correlati del blog(1)

Autenticazione del tuo API Richiesta

Ogni PDF4me nodo in n8n richiede un valido Credenziali per connettersi con. Crea o selezionane uno che contenga il tuo PDF4me API chiave affinché il flusso di lavoro possa autenticare in modo sicuro le richieste di sovrapposizione.

Informazioni importanti da non perdere

La sovrapposizione non è una fusione
Unione di aggiunte pages quindi il conteggio torna. La sovrapposizione impila entrambi i documenti sullo stesso pages, lasciando invariato il numero di pagine.
Due file, due tipi di input indipendenti
Base PDF Tipo di input e livello PDF I tipi di input sono impostati separatamente, quindi un file può essere Dati binari mentre l'altro arriva da un URL.
L'ordine cambia ciò che rimane visibile
Il livello si trova sopra la base. Un livello con uno sfondo a tinta unita può nascondere il contenuto sottostante, quindi testa entrambi gli ordini su una coppia di campioni prima di procedere.
Il nodo PDF4me in n8n è impostato su Action Overlay PDFs, con Base PDF Input Type e Layer PDF Input Type entrambi Binary Data, Base PDF Binary Field data, Layer PDF Binary Field data, Output File Name overlayed_output.pdf e Binary Data Output Name data

PDF4me Sovrapposizione PDFs pannello dei parametri in n8n, con entrambi i tipi di input impostati su Dati binari

Sovrapposizione vs Unione vs Filigrana

Tre modi per aggiungere contenuti extra a un PDF, ciascuno dei quali produce un documento diverso.

ApproccioEffetto sul pagesMigliore vestibilità
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

Quali parametri sovrappone PDFs Bisogno?

Necessario: Azione, entrambi i tipi di input, il campo sorgente corrispondente a ciascun tipo di input e Nome file di output. Nome output dati binari e tutto ciò che si trova in Opzioni avanzate utilizza valori predefiniti funzionanti.

ParametroNecessarioCosa faEsempio
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

Campi di output

Una corsa di successo restituisce uno n8n articolo che trasporta il combinato PDF.

CampoTipoCosa contiene
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.

Come si imposta la sovrapposizione? PDFs In n8n?

  1. Aggiungere PDF4me al tuo n8n flusso di lavoro e scegliere il Sovrapposizione PDFs azione.
  2. In Credenziali per connettersi con, seleziona il tuo PDF4me credenziali o clicca Crea nuove credenziali e incolla il tuo API chiave.
  3. Impostato Base PDF Tipo di input E Strato PDF Tipo di inputSono indipendenti, quindi ogni file può arrivare in modo diverso.
  4. Compila i campi sorgente corrispondenti, ad esempio Base PDF Campo binario E Strato PDF Campo binario, entrambi impostati di default su data.
  5. Impostato Nome del file di output (deve terminare in .pdf).
  6. Eseguire il nodo e instradare il combinato PDF, esposto sotto Nome dell'output dei dati binari, al passo successivo.

Configurazioni tipiche

Esempi di flusso di lavoroCommon n8n workflow patterns using Overlay PDFs.
Carta intestata sui documenti generati
  1. Il documento viene generato da un modello senza alcun marchio.
  2. Sovrapposizione PDFs applica la carta intestata approvata PDF prelevato da un URL come strato.
  3. Il prodotto finito, con il marchio impresso, viene inviato senza alcun intervento da parte del designer.
Cornice del certificato sopra il contenuto dinamico
  1. I dati sul completamento del corso producono un semplice PDF con il nome del destinatario.
  2. Sovrapposizione PDFs posiziona il bordo del certificato progettato sopra di esso.
  3. Ogni certificato completato viene inviato via e-mail al destinatario.
Timbro di approvazione sui documenti di revisione
  1. Un documento completa una fase di approvazione nel flusso di lavoro.
  2. Sovrapposizione PDFs applica uno strato di timbro predefinito e approvato.
  3. La copia timbrata viene archiviata nel sistema di registrazione.
Applicazione modello batch
  1. Un nodo Loop Over Items scorre una cartella di documenti in arrivo dai fornitori.
  2. Sovrapposizione PDFs applica lo stesso strato PDF da un URL a ciascuno.
  3. Ogni documento entra nell'archivio con una struttura coerente.

Consigli pratici

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.

Foglio riassuntivo

CampoValore
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

Domande frequenti

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.

Azioni correlate

Stessa attività su altre piattaforme

Richiedi assistenza