Ana içeriğe geç

Metni Resimle Değiştir n8n

Metni Resimle Değiştir bir n8n düğüm tarafından PDF4me tam olarak bir metin yer tutucusunun içinde bulunan metni bulan PDF ve bunu eşleşen boyutlarda bir logo, imza veya ürün görseliyle değiştirir. Şablon markalaması, imza ekleme veya manuel düzenleme yapmadan otomatik görsel kişiselleştirme için kullanın. PDF.

Bu düğüm ne işe yarıyor?

PDF4meMetni Resimle Değiştir taramalar PDF Belirtilen metin dizesini tam olarak arar ve hedeflediğiniz sayfalarda eşleşen her bir örneği, seçtiğiniz yükseklik ve genişliğe göre ölçeklendirilmiş bir resimle değiştirir. Hem kaynak metni hem de diğer metin türlerini kabul eder. PDF ve ikili veri yoluyla yedek görüntü, Base64 Dize veya URLBağımsız olarak. Şablonlara logo, imza, damga veya ürün fotoğrafları eklemek için idealdir. PDFs.

İlgili Blog Yazıları
Bu özellik için henüz bir blog yazısı yok — yakında yayınlanacak.
Bu arada, her platforma yönelik eğitimler ve iş akışları için PDF4me bloguna göz atın.
Blogu ziyaret edin

Kimliğinizi Doğrulama API Rica etmek

Her PDF4me düğümde n8n geçerli bir belge gerektirir Bağlantı kurmak için kimlik bilgisi. İçeriğinizi barındıran birini oluşturun veya seçin. PDF4me API Bu sayede iş akışı, değiştirme talebini güvenli bir şekilde doğrulayabilir.

Kaçırmamanız Gereken Önemli Bilgiler

Değiştirilecek metin tam olarak eşleşmelidir.
PDF4me Boşluklar, noktalama işaretleri ve büyük/küçük harf kullanımı dahil olmak üzere hassas metin eşleştirmesi yapar. Örneğin bir yer tutucu gibi. [LOGO_BURAYA] Yalnızca belirtilen tam dizeyle eşleşir, kısmi veya büyük/küçük harf farklılığı olan bir sürümle eşleşmez.
PDF ve görüntü girişleri bağımsızdır.
PDF Giriş Veri Türü ve Görüntü Giriş Veri Türü ayrı ayrı ayarlanır; biri ikili verilerden, diğeri ise başka bir kaynaktan gelebilir. URLŞablon kullanıldığında faydalı olur. PDF ve logo farklı sistemlerde yer alıyor.
Bu bir PDF eylem, kelime varyantı değil
Word belgesinde Metni Resimle Değiştir düğümü, Word'e özgü yer tutuculara sahip .docx dosyalarını işler. Bu düğümü yalnızca kaynak belge zaten bir Word belgesi olduğunda kullanın. PDF.
"Metni Görüntüyle Değiştir" n8n düğümü, şu eylemlerle yapılandırılmıştır: Eylem: Metni Görüntüyle Değiştir, PDF Giriş Veri Türü: İkili Veri, PDF İkili Alan Verisi, Görüntü Giriş Veri Türü: İkili Veri, Görüntü İkili Alan Verisi, Değiştirilecek Metin, Sayfa Sırası: Tümü, Görüntü Yüksekliği: 50, Görüntü Genişliği.

PDF4me Metni Görüntüyle Değiştir düğümünün parametreler panelinde n8n

Metni Görüntüyle Değiştirme İşlevi Hangi Parametreleri Gerektirir?

Gerekli: PDF Giriş Veri Türü, Görüntü Giriş Veri Türü, Değiştirilecek Metin, Görüntü Yüksekliği, Görüntü Genişliği ve Çıkış Dosya Adı. Koşullu alanlar yalnızca üst Giriş Veri Türü seçildiğinde görünür. Sayfa Sırası, Asyncve İkili Veri Çıkış Adı seçenekleri isteğe bağlıdır ve varsayılan değerlerle çalışır.

ParametreGerekliNe işe yarar?Örnek
PDF Input Data TypeRequiredFormat of the source PDF input. Choose Binary Data (from a previous node), Base64 String, or URL.Binary Data
PDF Binary FieldConditionalName of the binary property on the incoming n8n item that holds the source PDF. Required when PDF Input Data Type is Binary Data.data
Base64 PDF ContentConditionalBase64-encoded source PDF content. Required when PDF Input Data Type is Base64 String.JVBERi0xLjQK...
PDF URLConditionalPublicly reachable HTTPS URL to the source PDF. Required when PDF Input Data Type is URL.https://example.com/sample.pdf
Image Input Data TypeRequiredFormat of the replacement image input. Choose Binary Data, Base64 String, or URL, independent of the PDF input type.Binary Data
Image Binary FieldConditionalName of the binary property on the incoming n8n item that holds the replacement image. Required when Image Input Data Type is Binary Data.data
Base64 Image ContentConditionalBase64-encoded replacement image content. Required when Image Input Data Type is Base64 String./9j/4AAQSkZJRgAB...
Image URLConditionalPublicly reachable HTTPS URL to the replacement image. Required when Image Input Data Type is URL.https://example.com/logo.png
Text to ReplaceRequiredThe exact text string to find and replace with the image, matched precisely including case and punctuation.[LOGO_HERE]
Page SequenceOptionalPages to search for the placeholder. Use all, specific pages (1,3,5), or a range (1-5). Default all.all
Image HeightRequiredHeight in pixels to scale the replacement image to, maintaining aspect ratio.50
Image WidthRequiredWidth in pixels to scale the replacement image to, maintaining aspect ratio.100
Output File NameRequiredFilename for the resulting PDF, must include the .pdf extension.replace_text_with_image.pdf
AsyncOptionalEnables background processing for large PDFs. Default false.false
Binary Data Output NameOptionalName of the binary property the output item exposes. Default is data.data

Çıkış Alanları

Başarılı bir koşu bir getiri sağlar. n8n eşya taşıma JSON meta veriler ve güncellenmiş ikili dosya PDF.

AlanTipİçeriğinde neler var?
successBooleanTrue when the replacement succeeded. Use to route error-handling branches.
messageStringHuman-readable status message for the replacement result.
fileNameStringGenerated filename, matching Output File Name.
mimeTypeStringMIME type of the output, always application/pdf.
fileSizeNumberSize of the resulting PDF in bytes.
pagesProcessedNumberNumber of pages searched for the placeholder text.
Binary (data)BinaryThe updated PDF under Binary Data Output Name (default data). Pass into Write Binary File, Email, or any cloud-storage upload.

Metni Resimle Değiştirme Özelliğini Nasıl Kurarım? n8n?

  1. Eklemek PDF4me senin n8n iş akışını seçin ve Metni Resimle Değiştir aksiyon.
  2. İçinde Bağlantı kurmak için kimlik bilgisi, sizinkini seçin PDF4me kimlik bilgileri veya tıklayın Yeni Kimlik Bilgisi Oluştur ve yapıştırın API anahtar.
  3. Ayarlamak PDF Giriş Veri Türü ve kaynağı sağlayın PDF aracılığıyla PDF İkili Alan, Base64 PDF İçerik, veya PDF URL.
  4. Ayarlamak Görüntü Giriş Veri Türü ve yedek görüntüyü şu yolla sağlayın: Görüntü İkili Alanı, Base64 Görüntü İçeriği, veya Görüntü URL.
  5. Girmek Değiştirilecek Metin tam olarak göründüğü gibi PDFve ayarla Sayfa Sırası Eğer belirli sayfaları hedeflemeniz gerekiyorsa.
  6. Ayarlamak Görüntü Yüksekliği Ve Görüntü Genişliği Değiştirilecek görüntüyü ölçeklendirmek ve ayarlamak için Çıktı Dosya Adı.
  7. Olanak vermek Async büyük için PDFs Gerekirse düğümü çalıştırın ve güncellenmiş yönlendirmeyi gerçekleştirin. PDF Bir sonraki adıma geçiyoruz.

Tipik Kurulumlar

İş Akışı ÖrnekleriCommon n8n workflow patterns using Replace Text With Image.
Teklif şablonuna müşteri logosu ekleme
  1. Bir müşteri için yeni bir teklif oluşturulduğunda CRM webhook'u tetiklenir.
  2. PDF4me "Metni Resimle Değiştir" işlevi, "Değiştirilecek Metin" ayarıyla birlikte çalışır. [MÜŞTERİ_LOGOSU] ve Görüntü Giriş Veri Türü URL Müşterinin logosunu işaret ederek.
  3. Markalı teklif, son inceleme için satış temsilcisine e-posta ile gönderilir.
Oluşturulan sözleşme üzerindeki imza damgası
  1. Sözleşme şu yolla oluşturulur: PDF4me Belgeyi şu şekilde oluşturun: [İMZA] Yer tutucu.
  2. PDF4me Metni Görüntüyle Değiştir özelliği, imzalayanın imza görüntüsüyle ve Sayfa Sıralaması özelliğiyle yalnızca son sayfayı hedefleyerek çalışır.
  3. İmzalanmış gibi görünen sözleşme arşivlenmiştir. SharePoint.
Katalogda ürün görseli değiştirme PDF
  1. Bir "Öğeler Üzerinde Döngü" düğümü, envanter veritabanındaki ürün kayıtları üzerinde yineleme yapar.
  2. PDF4me Metni Resimle Değiştir işlemi, öğe başına çalışır ve bir resmi değiştirir. [ÜRÜN_RESMİ] Bulut depolamadan alınan her ürünün fotoğrafını içeren yer tutucu.
  3. Her kişiselleştirilmiş katalog sayfası, aşağı akışta tek bir dağıtılabilir dosyada birleştirilir. PDF.
Onay damgası grafiği, imza atıldıktan sonra gösterilir.
  1. Bir yönetici, dahili bir araçta bir belgeyi onaylanmış olarak işaretlediğinde bir onay webhook'u tetiklenir.
  2. PDF4me "Metni Resimle Değiştir" işlemi şu şekilde çalışır: [ONAY_DAMGASI] Yer tutucu, onay grafiğiyle değiştirildi.
  3. Son halini alan PDF Dosya adında onay tarihi de yer alarak arşivlenir.

Pratik İpuçları

Use a distinctive placeholder string
A unique token like [CLIENT_LOGO] avoids accidentally matching unrelated text elsewhere in the document.
Match Image Height/Width to the source aspect ratio
Mismatched dimensions can stretch or squash the inserted image; check the source image proportions first.
Narrow Page Sequence when possible
Targeting only the pages that contain the placeholder is faster and avoids unintended matches on other pages.
PDF and image sources can differ
Pull the template PDF from Binary Data while sourcing the logo from a URL, or any other combination that fits your workflow.
Enable Async for large PDFs
Large documents benefit from asynchronous processing so the workflow execution does not time out.
Use the Word variant for .docx files
This node processes PDFs; for Word documents use the separate Replace Text With Image in Word Document node.

Kopya Kağıdı

AlanDeğer
ActionReplace Text With Image
PDF Input Data TypeBinary Data
PDF Binary Fielddata
Image Input Data TypeBinary Data
Image Binary Fielddata
Text to Replace[LOGO_HERE]
Page Sequenceall
Image Height50
Image Width100
Output File Namereplace_text_with_image.pdf
CredentialsPDF4me API credential

Sıkça Sorulan Sorular

Does Text to Replace need to match exactly?+
Yes. PDF4me performs precise text matching, so Text to Replace must match the placeholder in the PDF exactly, including spaces, punctuation, and capitalization, similar to the exact-match requirements described in community discussions on replacing content inside a PDF.
Can I replace text on only some pages?+
Yes. Page Sequence accepts all, specific page numbers such as 1,3,5, or ranges such as 1-5, so you can target only the pages that contain the placeholder.
What image formats can replace the text?+
JPG, PNG, GIF, and BMP. Supply the image via Image Binary Field, Base64 Image Content, or Image URL depending on Image Input Data Type.
Does the image keep its aspect ratio?+
PDF4me scales the image to the Image Height and Image Width you specify while maintaining aspect ratio, so choose dimensions that match the source image's proportions, the same general scaling consideration covered in Adobe's guidance on placing graphics onto a PDF page.
Is this the same as the Word variant of this action?+
No. This action operates on PDF documents. A separate Replace Text With Image in Word Document node exists in n8n for .docx files, using Word-specific merge-field style placeholders instead of exact-text matching.

İlgili Eylemler

Diğer Platformlarda Aynı Görev

Yardım Alın