Lewati ke konten utama

Buka kunci PDF di dalam n8n

Buka kunci PDF adalah sebuah PDF4me tindakan node di n8n yang menghapus perlindungan kata sandi dari sebuah PDF Saat Anda memasukkan kata sandi yang benar. Gunakan kata sandi ini untuk membuat file yang dilindungi dapat dibaca oleh langkah-langkah alur kerja selanjutnya, menghapus enkripsi dari arsip yang Anda miliki, atau membuka setiap laporan yang dikirim pemasok tanpa harus membukanya satu per satu.

Fungsi node ini

PDF4meBuka kunci PDF mengambil perlindungan PDF dari Data Biner, sebuah Base64 String, atau sebuah URL, menerapkan kata sandi yang Anda berikan, dan mengembalikan salinan yang dapat dibuka tanpa perintah. Kata sandi Kolom ini wajib diisi, jadi ini membuka dokumen yang sudah Anda berhak buka, bukan memulihkan kata sandi yang hilang. Tugas biasanya adalah berada di bagian depan alur kerja, karena langkah ekstraksi dan konversi tidak dapat membaca file yang terenkripsi.

Postingan Blog Terkait
Belum ada postingan blog untuk fitur ini — akan segera hadir.
Sementara itu, jelajahi blog PDF4me untuk menemukan tutorial dan alur kerja di berbagai platform.
Kunjungi blog ini

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 pembukaan kunci dengan aman.

Fakta Penting yang Tidak Boleh Anda Lewatkan

Kata sandi diperlukan
Ini bukan alat pemulihan kata sandi. Tanpa kata sandi yang benar, dokumen tidak dapat dibuka melalui tindakan ini.
Buka kunci sebelum Anda mengekstrak
Ekstraksi teks, tabel, dan formulir tidak dapat membaca data terenkripsi. PDFJadi, node ini biasanya berada di bagian paling awal alur kerja.
Jauhkan kata sandi dari file alur kerja.
Gunakan kredensial atau variabel lingkungan sebagai referensi, alih-alih mengetikkan rahasianya, sehingga rahasia tersebut tidak ikut terbawa dalam alur kerja yang diekspor. JSON.
Node PDF4me di n8n diatur ke Aksi Buka Kunci PDF, Tipe Data Masukan Data Biner, Bidang Biner Masukan data, Nama File Keluaran unlocked_output.pdf, bidang Kata Sandi yang disamarkan, dan Nama Keluaran Data Biner data.

PDF4me Buka kunci PDF panel parameter di n8n

Buka kunci PDF vs Lindungi Dokumen

Kedua tindakan ini berlawanan, dan alur kerja sering menggunakan keduanya: membuka kunci file yang masuk untuk membacanya, lalu melindungi kembali hasilnya sebelum dikirim keluar.

AspekBuka kunci PDFLindungi Dokumen
What it doesRemoves existing password protectionApplies password protection
Password you supplyThe current password on the documentThe new password you want to set
Typical positionFirst step, so later nodes can read the fileLast step, before the file is sent or stored
PrerequisiteYou must already know the passwordNone beyond the source document

Parameter apa yang Dibuka Kuncinya? PDF Membutuhkan?

Diperlukan: Aksi, Tipe Data Masukan, kolom yang sesuai dengan tipe masukan tersebut, Nama File Keluaran, dan Kata Sandi. Nama Keluaran Data Biner dan Profil Kustom memiliki nilai default yang berfungsi.

ParameterDiperlukanApa fungsinya?Contoh
ActionRequiredSelects the PDF4me node action to run. Choose Unlock PDF.Unlock 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 protected PDF. Required when Input Data Type is Binary Data. Defaults to data.data
Base64 Document ContentConditionalBase64-encoded content of the protected PDF. Required when Input Data Type is Base64 String.JVBERi0xLjQK...
File URLConditionalPublicly reachable HTTPS URL to the protected PDF. Required when Input Data Type is URL.https://example.com/statement.pdf
Output File NameRequiredFilename for the unlocked PDF returned by the node. Include the .pdf extension.unlocked_output.pdf
PasswordRequiredThe current password on the document. Shown masked in the panel. Reference a credential or environment variable rather than typing the secret into a saved workflow.{{ $env.PDF_PASSWORD }}
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.{ "preserveMetadata": true }

Bidang Keluaran

Satu kali lari yang sukses akan menghasilkan satu n8n item yang membawa yang tidak terkunci PDF.

BidangJenisIsi di dalamnya
Binary (data)BinaryThe unlocked PDF, under Binary Data Output Name (default data).
fileNameStringGenerated filename, matching Output File Name.
docNameStringName of the processed document, for reference and tracking.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the returned PDF in bytes.
isUnlockedBooleanConfirms the document was unlocked. A useful assertion before handing the file to an extraction step.
securityRemovedBooleanConfirms password protection and access restrictions were removed.
successBooleanTrue when the unlock completed, false on failure such as a wrong password. Use it to branch error handling.
messageStringHuman-readable status message, carrying success confirmation or error detail.

Bagaimana Cara Mengatur Unlock? PDF di dalam n8n?

  1. Menambahkan PDF4me untuk Anda n8n alur kerja dan pilih Buka kunci PDF 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 Tipe Data Masukan ke Data Biner (bawaan), Base64 String, atau URL dan menyediakan sumber yang sesuai PDF bidang.
  4. Mengatur Nama File Output untuk file yang tidak terkunci, diakhiri dengan .pdf.
  5. Masukkan dokumen Kata sandi, idealnya sebagai ekspresi yang membaca kredensial atau variabel lingkungan.
  6. Meninggalkan Nama Keluaran Data Biner sebagai data kecuali jika node selanjutnya mengharapkan properti yang berbeda.
  7. Eksekusi node dan arahkan yang tidak terkunci. PDF ke langkah selanjutnya, seperti ekstraksi, konversi, atau penyimpanan.

Pengaturan Umum

Contoh Alur KerjaCommon n8n workflow patterns using Unlock PDF.
Baca laporan rekening bank yang dilindungi.
  1. Pernyataan tersebut akan dikirim melalui email yang dilindungi dengan kata sandi yang diketahui.
  2. Buka kunci PDF Menghapus perlindungan menggunakan rahasia yang tersimpan.
  3. Langkah ekstraksi tabel membaca transaksi ke dalam sebuah lembar kerja.
Hapus enkripsi dari arsip yang dimiliki
  1. Dokumen lama di drive bersama semuanya menggunakan kata sandi lama yang sama.
  2. Buka kunci PDF berjalan melalui setiap file selama batch migrasi.
  3. Salinan yang tidak terlindungi masuk ke sistem dokumen baru dan dapat dicari.
Buka kunci, proses, lalu lindungi kembali.
  1. Buka kunci PDF Membuka dokumen terlindungi yang masuk.
  2. Alur kerja tersebut memberi cap, menggabungkan, atau mengedit file yang dapat dibaca.
  3. Protect Document menerapkan kata sandi baru sebelum dikirim kembali.
Lindungi saluran pipa dengan success memeriksa
  1. Buka kunci PDF setiap file yang masuk mencoba kata sandi yang tersimpan.
  2. Node IF menguji nilai yang dikembalikan. success dan kolom isUnlocked.
  3. Kegagalan akan diarahkan ke peringatan sehingga kata sandi yang diganti dapat segera diketahui.

Tips Praktis

Never hardcode the password
Use an expression that reads an n8n credential or environment variable, so the secret does not travel inside exported workflow JSON.
Put the unlock first
Extraction and conversion nodes cannot read an encrypted PDF, so unlocking early avoids confusing downstream failures.
Alert on a failed unlock
A rotated password will fail every run. Branch on success so it surfaces as an alert rather than a pile of stuck items.
Assert on isUnlocked before extracting
Checking the flag is cheaper than debugging an extraction node that received a file it could not open.
Only unlock what you are authorised to
The action needs the real password by design. Confirm you have the right to remove protection before automating it across an archive.
re-protect before sending outward
If the document leaves your systems again, add Protect Document at the end so the unlocked copy is not what gets distributed.

Lembar Panduan Singkat

BidangNilai
ActionUnlock PDF
Input Data TypeBinary Data
Input Binary Fielddata
Output File Nameunlocked_output.pdf
Password{{ $env.PDF_PASSWORD }}
Binary Data Output Namedata
CredentialsPDF4me API credential

Pertanyaan Umum

Can Unlock PDF open a PDF when I do not know the password?+
No. The Password field is required and must match the password set on the document. The node removes protection from files you are already authorised to open; it is not a password recovery or cracking tool. If nobody in your organisation holds the password, the document cannot be unlocked through this action.
Where should I store the PDF password in n8n?+
Avoid typing it directly into the Password field on a saved workflow. Reference an n8n credential or an environment variable through an expression instead, so the secret is not stored in the workflow JSON that gets exported, shared, or committed to version control.
Does unlocking remove permission restrictions as well as the open password?+
The action removes the password protection so the returned file opens without a prompt, and the response includes a securityRemoved flag confirming restrictions were lifted. Encryption and permission handling are defined in the ISO 32000 PDF specification, so check that flag on a representative document before assuming a specific restriction such as printing or copying is gone.
Why unlock PDFs in a workflow instead of one at a time?+
Downstream steps such as text extraction, table parsing, and conversion cannot read an encrypted PDF. Putting Unlock PDF at the front of the workflow means every protected file that arrives is made readable automatically, rather than stalling the pipeline until someone opens each one by hand.
What happens if the password is wrong?+
The run fails rather than returning a partially unlocked file. Branch on the returned success boolean so a wrong or rotated password raises an alert instead of silently passing the still-encrypted original to the next step, where it would fail again less obviously.

Tindakan Terkait

Tugas yang Sama di Platform Lain

Dapatkan Bantuan