Lewati ke konten utama

Hamparan PDFs di dalam n8n

Hamparan PDFs adalah sebuah PDF4me tindakan node di n8n yang menempatkan seseorang PDF di atas yang lain, menggabungkan keduanya ke tempat yang sama. pages Alih-alih menambahkannya. Gunakan fitur ini untuk membubuhkan stempel kop surat yang telah dirancang di atas konten yang dihasilkan, menerapkan bingkai sertifikat, atau menempatkan templat yang telah disetujui di atas dokumen yang masuk tanpa menambahkan satu halaman pun.

Fungsi node ini

PDF4me: Hamparan PDFs membutuhkan dua orang PDFs, A basis yang berfungsi sebagai latar belakang dan lapisan yang berada di atas, dan mengembalikan satu dokumen di mana keduanya muncul pada tempat yang sama. pagesSetiap berkas memiliki tipe inputnya sendiri, sehingga basisnya dapat berasal dari node sebelumnya sebagai Data Biner sementara lapisannya diambil dari... URLTidak seperti penggabungan, jumlah halaman tidak bertambah, itulah mengapa ini merupakan alat yang tepat untuk kop surat, bingkai, dan stempel templat.

Postingan Blog Terkait(1)

Memverifikasi Identitas Anda API Meminta

Setiap PDF4me simpul di n8n memerlukan validitas Kredensial untuk terhubung denganBuat atau pilih salah satu yang sesuai dengan kebutuhan Anda. PDF4me API kunci agar alur kerja dapat mengautentikasi permintaan overlay dengan aman.

Fakta Penting yang Tidak Boleh Anda Lewatkan

Overlay tidak digabungkan
Penggabungan tambahan pages Jadi, jumlahnya sesuai. Dengan menumpuk kedua dokumen, keduanya akan berada di tempat yang sama. pages, dengan jumlah halaman tetap tidak berubah.
Dua berkas, dua tipe input independen
Basis PDF Tipe Input dan Lapisan PDF Tipe Input diatur secara terpisah, sehingga satu file dapat berupa Data Biner sementara file lainnya berasal dari URL.
Urutan mengubah apa yang tetap terlihat.
Lapisan tersebut berada di atas lapisan dasar. Lapisan dengan latar belakang solid dapat menyembunyikan konten di bawahnya, jadi ujilah kedua urutan tersebut pada pasangan sampel terlebih dahulu.
Node PDF4me di n8n diatur ke Aksi Overlay PDF, dengan Tipe Input PDF Dasar dan Tipe Input PDF Lapisan keduanya Data Biner, Bidang Biner PDF Dasar data, Bidang Biner PDF Lapisan data, Nama File Output overlayed_output.pdf, dan Nama Output Data Biner data.

PDF4me Hamparan PDFs panel parameter di n8n, dengan kedua tipe input diatur ke Data Biner

Overlay vs Merge vs Watermark

Tiga cara untuk menambahkan konten tambahan ke dalam PDF, masing-masing menghasilkan dokumen yang berbeda.

MendekatiPengaruh pada pagesPaling cocok
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

Parameter apa yang digunakan oleh Overlay? PDFs Membutuhkan?

Diperlukan: Aksi, kedua tipe input, kolom sumber yang sesuai dengan setiap tipe input, dan Nama File Output. Nama Output Data Biner dan apa pun di bawah Opsi Lanjutan memiliki nilai default yang berfungsi.

ParameterDiperlukanApa fungsinya?Contoh
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

Bidang Keluaran

Satu kali lari yang sukses akan menghasilkan satu n8n barang yang membawa gabungan PDF.

BidangJenisIsi di dalamnya
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.

Bagaimana Cara Mengatur Overlay? PDFs di dalam n8n?

  1. Menambahkan PDF4me untuk Anda n8n alur kerja dan pilih Hamparan PDFs tindakan.
  2. Di dalam Kredensial untuk terhubung dengan, pilih milikmu PDF4me kredensial atau klik Buat Kredensial Baru dan tempelkan milik Anda API kunci.
  3. Mengatur Basis PDF Jenis Masukan Dan Lapisan PDF Jenis MasukanMereka bersifat independen, jadi setiap file dapat tiba dengan cara yang berbeda.
  4. Isilah kolom sumber yang sesuai, misalnya Basis PDF Bidang Biner Dan Lapisan PDF Bidang Biner, keduanya secara default data.
  5. Mengatur Nama File Output (harus diakhiri dengan) .pdf).
  6. Eksekusi node dan arahkan gabungan tersebut. PDF, terpapar di bawah Nama Keluaran Data Biner, ke langkah selanjutnya.

Pengaturan Umum

Contoh Alur KerjaCommon n8n workflow patterns using Overlay PDFs.
Kop surat pada dokumen yang dihasilkan
  1. Dokumen dihasilkan dari templat tanpa merek.
  2. Hamparan PDFs menggunakan kop surat yang telah disetujui PDF diambil dari sebuah URL sebagai lapisan.
  3. Hasil yang sudah diberi merek dikirim tanpa disentuh oleh desainer.
Bingkai sertifikat di atas konten dinamis
  1. Data penyelesaian kursus menghasilkan gambaran yang jelas. PDF dengan nama penerima.
  2. Hamparan PDFs menempatkan bingkai sertifikat yang telah dirancang di atasnya.
  3. Setiap sertifikat yang telah selesai akan dikirimkan melalui email kepada penerimanya.
Stempel persetujuan pada dokumen peninjauan
  1. Sebuah dokumen menyelesaikan langkah persetujuan dalam alur kerja.
  2. Hamparan PDFs Menerapkan lapisan stempel yang telah dirancang dan disetujui.
  3. Salinan yang telah dicap dimasukkan ke dalam sistem pencatatan.
Aplikasi templat batch
  1. Node Loop Over Items mengiterasi folder berisi dokumen pemasok yang masuk.
  2. Hamparan PDFs menerapkan lapisan yang sama PDF dari sebuah URL kepada masing-masing.
  3. Setiap dokumen masuk ke dalam arsip dengan kerangka yang konsisten.

Tips Praktis

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.

Lembar Panduan Singkat

BidangNilai
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

Pertanyaan Umum

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.

Tindakan Terkait

Tugas yang Sama di Platform Lain

Dapatkan Bantuan