Saltar al contenido principal

Superposición PDFs en n8n

Superposición PDFs es un PDF4me acción del nodo en n8n que coloca uno PDF encima de otro, combinando ambos en el mismo pages En lugar de añadirlos, utilícelo para estampar un membrete personalizado sobre el contenido generado, aplicar un marco de certificado o superponer una plantilla aprobada sobre un documento entrante sin añadir una sola página.

Lo que hace este nodo

PDF4me: Superposición PDFs toma dos PDFs, a base que actúa como fondo y un capa que se sitúa encima y devuelve un único documento donde ambos aparecen en el mismo pagesCada archivo tiene su propio tipo de entrada, por lo que la base puede provenir de un nodo anterior como datos binarios, mientras que la capa se extrae de un URLA diferencia de la fusión, el número de páginas no aumenta, lo que la convierte en la herramienta adecuada para membretes, marcos y sellos de plantilla.

Entradas de blog relacionadas(1)

Autenticando su API Pedido

Cada PDF4me nodo en n8n requiere un válido Credencial para conectarse con. Crea o selecciona uno que contenga tu PDF4me API clave para que el flujo de trabajo pueda autenticar las solicitudes de superposición de forma segura.

Datos importantes que no debes perderte

La superposición no es una fusión
La fusión añade pages por lo que el recuento se suma. La superposición apila ambos documentos en el mismo pages, sin que cambie el número de páginas.
Dos archivos, dos tipos de entrada independientes
Base PDF Tipo de entrada y capa PDF Los tipos de entrada se configuran por separado, por lo que un archivo puede ser datos binarios mientras que el otro llega de un URL.
El orden cambia lo que permanece visible
La capa se sitúa encima de la base. Una capa con fondo sólido puede ocultar el contenido que se encuentra debajo, así que prueba primero ambos órdenes con un par de ejemplos.
Nodo PDF4me en n8n configurado en Acción Superponer PDF, con Tipo de entrada de PDF base y Tipo de entrada de PDF de capa ambos Datos binarios, Datos de campo binario de PDF base, Datos de campo binario de PDF de capa, Nombre de archivo de salida overlayed_output.pdf y Datos de salida Nombre de datos binarios

PDF4me Superposición PDFs panel de parámetros en n8n, con ambos tipos de entrada configurados como Datos binarios

Superposición vs. Fusión vs. Marca de agua

Tres maneras de incorporar contenido adicional a un PDF, cada uno produciendo un documento diferente.

AcercarseEfecto en el pagesMejor ajuste
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

¿Qué parámetros utiliza Overlay? PDFs ¿Necesidad?

Requerido: Acción, ambos tipos de entrada, el campo de origen que coincide con cada tipo de entrada y Nombre del archivo de salida. El Nombre de salida de datos binarios y todo lo que se encuentra en Opciones avanzadas conservan los valores predeterminados.

ParámetroRequeridoLo que haceEjemplo
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

Campos de salida

Una carrera exitosa devuelve uno n8n artículo que lleva el combinado PDF.

CampoTipoLo que 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.

¿Cómo configuro la superposición? PDFs en n8n¿

  1. Agregar PDF4me a tu n8n flujo de trabajo y elegir el Superposición PDFs acción.
  2. En Credencial para conectarse con, seleccione su PDF4me credenciales o haga clic Crear nueva credencial y pega tu API llave.
  3. Colocar Base PDF Tipo de entrada y Capa PDF Tipo de entradaSon independientes, por lo que cada archivo puede llegar de forma diferente.
  4. Rellene los campos de origen correspondientes, por ejemplo Base PDF Campo binario y Capa PDF Campo binario, ambos por defecto data.
  5. Colocar Nombre del archivo de salida (debe terminar en .pdf).
  6. Ejecutar el nodo y enrutar el combinado PDF, expuesto bajo Nombre de salida de datos binarios, al siguiente paso.

Configuraciones típicas

Ejemplos de flujo de trabajoCommon n8n workflow patterns using Overlay PDFs.
Papel con membrete en los documentos generados
  1. Se genera un documento a partir de una plantilla sin ninguna marca.
  2. Superposición PDFs Se aplica el membrete aprobado. PDF obtenido de un URL como la capa.
  3. El resultado final, con la marca impresa, se envía sin la intervención de un diseñador.
Marco de certificado sobre contenido dinámico
  1. Los datos de finalización del curso producen un resultado sencillo. PDF con el nombre del destinatario.
  2. Superposición PDFs coloca el borde del certificado diseñado encima.
  3. Cada certificado finalizado se envía por correo electrónico a su destinatario.
Sello de aprobación en los documentos de revisión
  1. Un documento completa un paso de aprobación en el flujo de trabajo.
  2. Superposición PDFs Aplica una capa de sello prediseñada y aprobada.
  3. La copia sellada se archiva en el sistema de registro.
Aplicación de plantilla por lotes
  1. Un nodo Loop Over Items itera sobre una carpeta de documentos de proveedores entrantes.
  2. Superposición PDFs aplica la misma capa PDF de un URL a cada uno.
  3. Todos los documentos ingresan al archivo con un formato coherente.

Consejos prácticos

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.

Hoja de trucos

CampoValor
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

Preguntas frecuentes

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.

Acciones relacionadas

La misma tarea en otras plataformas

Obtén ayuda