Saltar al contenido principal

Agregar margen a PDF en n8n

Agregar margen a PDF es un PDF4me acción del nodo en n8n que agrega márgenes izquierdo, derecho, superior e inferior a un PDFCada uno se mide en milímetros. Úselo para crear espacio de encuadernación para informes impresos, dejar espacio para anotaciones en folletos o adaptar automáticamente los documentos entrantes al formato estándar de la empresa.

Lo que hace este nodo

PDF4me: Agregar margen a PDF toma una PDF a partir de datos binarios, un Base64 String, o un URL y devuelve un nuevo archivo con los cuatro márgenes especificados, aplicados en milímetros. Cada lado se configura de forma independiente, por lo que un margen de encuadernación asimétrico simplemente implica un margen izquierdo mayor. Dado que se ejecuta como un paso del flujo de trabajo, se puede aplicar el mismo estándar de margen a todos los documentos que llegan sin necesidad de que nadie abra un editor de escritorio.

Entradas de blog relacionadas
Aún no hay ninguna entrada de blog sobre esta función; estará disponible próximamente.
Mientras tanto, echa un vistazo al blog de PDF4me para encontrar tutoriales y flujos de trabajo para todas las plataformas.
Visita el blog

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 margen de forma segura.

Datos importantes que no debes perderte

Todos los valores están en milímetros.
Los campos están etiquetados literalmente como (Mm). Si las especificaciones de impresión están en pulgadas, realice la conversión antes de introducirlas: una pulgada equivale a 25,4 mm.
Las cuatro partes son independientes.
Izquierda, derecha, arriba y abajo son campos separados, por lo que un margen de enlace asimétrico no necesita más que un número izquierdo mayor.
Revisa un archivo antes de imprimir.
El aspecto del resultado depende de la geometría de la página de origen, así que procese un documento representativo una vez y compruebe el resultado antes de enviar un lote a imprimir.
El nodo PDF4me en n8n está configurado con la acción Agregar margen al PDF, Tipo de datos de entrada Datos binarios, Campo de entrada Datos binarios, Nombre del archivo de salida document_with_margins.pdf, Nombre del documento document.pdf y Campos de margen izquierdo, derecho, superior e inferior en milímetros.

PDF4me Agregar margen a PDF panel de parámetros en n8n

Márgenes automatizados (n8n) frente a un escritorio PDF Editor

La mayoría de los resultados de esta búsqueda son editores que permiten trabajar con un archivo a la vez. La diferencia radica en dónde se realiza el trabajo.

AcercarseDesencadenarMejor ajuste
Desktop editor or online margin toolA person opens and adjusts one file by handA single document you are already working on
PDF4me Add Margin To PDF in n8nA generated report, an upload, or a scheduled batchApplying one house margin standard to every document that arrives, unattended

¿Qué parámetros añaden margen? PDF ¿Necesidad?

Requerido: Acción, tipo de datos de entrada, el campo que coincide con ese tipo de entrada, nombre del archivo de salida, nombre del documento y los cuatro valores de margen. El nombre de salida de datos binarios y los perfiles personalizados conservan valores predeterminados.

ParámetroRequeridoLo que haceEjemplo
ActionRequiredSelects the PDF4me node action to run. Choose Add Margin To PDF.Add Margin To PDF
Input Data TypeRequiredFormat of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
Input Binary FieldConditionalName of the binary property on the incoming n8n item that holds the PDF. Required when Input Data Type is Binary Data. Defaults to data.data
Base64 Document ContentConditionalBase64-encoded content of the source PDF. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
File URLConditionalPublicly reachable HTTPS URL to the source PDF. Required when Input Data Type is URL.https://example.com/report.pdf
Output File NameRequiredFilename for the PDF returned with margins applied. Include the .pdf extension.document_with_margins.pdf
Document NameRequiredFilename of the source PDF, used for reference and tracking on the request.document.pdf
Left Margin (Mm)RequiredLeft margin width in millimetres. Set this larger than the other sides when you need binding space.20
Right Margin (Mm)RequiredRight margin width in millimetres.20
Top Margin (Mm)RequiredTop margin height in millimetres. Increase it when a printed header or letterhead needs clearance.25
Bottom Margin (Mm)RequiredBottom margin height in millimetres. Increase it when a footer or page number needs clearance.25
Binary Data Output NameOptionalName of the binary property the output item exposes. Defaults to data.data
Custom ProfilesOptionalAdvanced Options field for extra processing settings, supplied in a JSON-like format. Leave blank unless you have a specific profile to apply.{ "preserveContentQuality": true }

Campos de salida

Una carrera exitosa devuelve uno n8n artículo que lleva el PDF con márgenes aplicados.

CampoTipoLo que contiene
Binary (data)BinaryThe PDF with the four margin values applied, under Binary Data Output Name (default data).
fileNameStringGenerated filename, matching Output File Name.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the returned PDF in bytes.
pageCountNumberNumber of pages processed with margin adjustments.
successBooleanTrue when the margin operation completed, false on failure. Use it to branch error handling.
messageStringHuman-readable status message, carrying success confirmation or error detail.

¿Cómo configuro Agregar margen a? PDF en n8n¿

  1. Agregar PDF4me a tu n8n flujo de trabajo y elegir el Agregar margen a PDF 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 Tipo de datos de entrada a Datos binarios (por defecto), Base64 String, o URL y proporcionar la fuente correspondiente PDF campo.
  4. Ingresar Margen izquierdo (mm), Margen derecho (mm), Margen superior (mm), y Margen inferior (mm) en milímetros.
  5. Colocar Nombre del archivo de salida (debe terminar en .pdf) y Nombre del documento para el archivo fuente.
  6. Ejecuta el nodo y enruta el resultado. PDF al siguiente paso, como el almacenamiento, el correo electrónico o una cola de impresión.

Configuraciones típicas

Ejemplos de flujo de trabajoCommon n8n workflow patterns using Add Margin to PDF.
Margen de encuadernación para informes impresos
  1. Se genera un informe programado como un PDF de la noche a la mañana.
  2. Agregar margen a PDF Aplica un margen izquierdo amplio y valores más estrechos en los lados derecho, superior e inferior.
  3. El resultado se envía a la cola de impresión con espacio para encuadernación en espiral o con peine.
Espacio para anotaciones en los folletos
  1. El material de capacitación se sube a una carpeta compartida.
  2. Agregar margen a PDF Amplía el margen derecho para que los lectores tengan espacio para tomar notas.
  3. La copia con las anotaciones ya preparadas se distribuye a los asistentes.
Estándar de distribución de la vivienda en los archivos entrantes
  1. Un webhook recibe PDFs de un proveedor externo con diseños inconsistentes.
  2. Agregar margen a PDF Aplica los mismos cuatro valores a todos los archivos.
  3. Los documentos ingresan al archivo con una presentación de página uniforme.
Margen y luego números de página
  1. Un documento fusionado se elabora a partir de varias fuentes.
  2. Agregar margen a PDF crea primero el espacio libre inferior.
  3. Agregar página Number a PDF Luego coloca la numeración dentro del nuevo espacio del pie de página.

Consejos prácticos

Convert inches before you type
The fields only accept millimetres. A one inch margin is 25.4 and a half inch is 12.7, so convert a print spec once and reuse the numbers.
Add margin before adding page numbers
Creating the bottom clearance first gives a page number or footer stamp somewhere clean to sit, rather than crowding existing content.
Proof a representative file, not the simplest one
Pick a document with dense edge-to-edge content for the test run, since that is where a margin change is most visible.
Use an asymmetric left value for binding
Anything that will be bound, punched, or stapled needs more room on the binding edge than on the outer edge.
Split first if pages need different margins
The values apply across the document, so a mixed layout needs a split, per-part margin run, and merge back together.
Branch on the success field
Test the returned success boolean before sending the file onward so a failed run raises an alert instead of quietly forwarding the original.

Hoja de trucos

CampoValor
ActionAdd Margin To PDF
Input Data TypeBinary Data
Input Binary Fielddata
Output File Namedocument_with_margins.pdf
Document Namedocument.pdf
Left / Right Margin (Mm)20 / 20
Top / Bottom Margin (Mm)25 / 25
Binary Data Output Namedata
CredentialsPDF4me API credential

Preguntas frecuentes

What unit are the PDF margin values in?+
All four margin fields are measured in millimetres, which is why they are labelled Left Margin (Mm), Right Margin (Mm), Top Margin (Mm), and Bottom Margin (Mm). If your source specification is in inches, convert first: one inch is 25.4 mm, so a one inch margin is entered as 25.4.
Does adding a margin shrink the page content or make the page bigger?+
Adding margin space changes the relationship between the content area and the page edge, which in PDF terms means the boundaries described in the ISO 32000 PDF specification. Run the node once on a representative file and inspect the output before committing a print run, because the visual result depends on the source page geometry.
Can I set a different margin on only one side?+
Yes. The four margin fields are independent, so you can set a wide binding margin on the left and leave the other three small. A common binding setup is a larger left value with matching smaller right, top, and bottom values.
Do the margins apply to every page in the document?+
The margin values you supply are applied across the document rather than to a single selected page. If different pages need different treatment, split the PDF first, run Add Margin to PDF on each part with its own settings, then merge the results back together.
Why would I automate margins instead of setting them in Acrobat?+
A desktop tool is fine for one file you already have open. Automation matters when margins must be applied consistently to every document that arrives, for example every report generated overnight or every file dropped into a print folder. In an n8n workflow that becomes a single step nobody has to remember.

Acciones relacionadas

La misma tarea en otras plataformas

Obtén ayuda