メインコンテンツへスキップ

テキストを検索して置換する PDF と n8n

このノードの機能

PDF4me テキストの検索と置換 検索 PDF テキストパターンに対して、出現箇所すべてを新しいコンテンツに置き換えます。 n8n Adobe Acrobat で手動で編集することなくワークフローを自動化できます。ドキュメント全体または特定のページ範囲を対象とし、フォント、色、サイズ、周囲のレイアウトを保持し、複数の置換を連結して複合置換を実行できます。 買収後のベンダー名の一括変更、製品カタログ全体のブランディング刷新、誤字脱字の修正、見積書の価格更新、用語の標準化、テンプレートを使用した文書のパーソナライズ。

関連ブログ記事
この機能に関するブログ記事はまだありません。近日公開予定です。
その間、PDF4me ブログを閲覧して、あらゆるプラットフォームのチュートリアルやワークフローをご覧ください。
ブログをご覧ください →

認証 API リクエスト​

毎 PDF4me ノード n8n 有効な 接続するための認証情報. 作成または選択して、 PDF4me API ワークフローがテキスト置換リクエストを安全に認証できるようにするためのキー。

見逃してはならない重要な事実​

フォント、色、レイアウトをそのまま保持します
古いテキストの各出現箇所は、元のフォント、色、サイズを保持したまま、同じ文字位置に置き換えられます。周囲のテキスト、画像、ページ番号、および文書構造は変更されません。 PDF-to-Word-to-PDF 往復通信はレイアウトをずらしたり、書式を崩したりすることが多い。
ページ範囲を指定して、変更が必要な箇所のみを更新します。
ページシーケンスは以下をサポートします 全て、単一ページ(1、2、3)、範囲(1-5、10-15)、および混合(1,2,3-7,10) ドキュメントの残りの部分には手を加えず、表紙、署名ページ、または特定の章のみを更新します。
大規模ドキュメントの非同期処理
大規模または高ボリュームのシナリオでは、非同期オプションを有効にしてください。操作はバックグラウンドで実行され、ワークフローのスループットが向上します。数十または数百の処理を行うエンタープライズシナリオに推奨されます。 PDF1回の実行あたり秒。
PDF4me パラメータ (PDF 入力データタイプ、入力バイナリフィールド、古いテキスト、新しいテキスト、ページシーケンス、出力ファイル名) を表示する n8n ノード。自動 PDF テキスト置換用に構成されています。

地図 PDF バイナリ、旧テキストと新テキストを入力し、ページシーケンスを設定して、変更された PDF 1つのノードで返されます。

パラメータ​

必須: 接続するための認証情報、 PDF 入力データタイプ、古いテキスト、新しいテキスト、ページシーケンス、出力ファイル名、バイナリデータ出力名はすべて指定する必要があります。一致する入力フィールド(入力バイナリフィールド、 Base64 PDF コンテンツ、または PDF URL) は選択されたものに基づいて必要です PDF 入力データ型。

パラメータ必須その機能例
PDF Input Data TypeRequiredChoose how to provide the PDF file. Options: Binary Data, Base64 String, URL. Default is `Binary Data`.Binary Data
PDF Binary FieldConditionalName of the binary property that contains the PDF file. Shown when PDF Input Data Type is Binary Data. Default is `data`.data
PDF Base64 ContentConditionalBase64 encoded PDF content. Shown when PDF Input Data Type is Base64 String.JVBERi0xLjQK...
PDF URLConditionalURL to the PDF file. Shown when PDF Input Data Type is URL.https://example.com/contract.pdf
Old TextRequiredText to be searched and replaced in the PDF.Old Vendor Inc.
New TextRequiredText to replace the old text with.New Vendor LLC
Page SequenceOptionalSpecify page indices as comma-separated values or ranges (e.g., "0, 1, 2-" or "1, 2, 3-7"). Leave empty to process all pages.1,2,3
Output File NameOptionalName for the output PDF file. Default is `find_and_replace_output.pdf`.find_and_replace_output.pdf
AsyncOptionalIgnored: the node always sends the request with IsAsync true, whatever this is set to. Default is `Yes`.Yes
Binary Data Output NameOptionalCustom name for the binary data in n8n output. Default is `data`.data

ページシーケンスパターン​

全て文書全体
デフォルト設定。グローバルなブランド更新や用語の標準化のために、すべてのページにわたるすべての出現箇所を置換します。
1、2、3特定ページ
カンマ区切り。特定のページのみを更新できます。表紙、署名ページ、または既知の場所の更新に便利です。
1-5、10-15ページ範囲
ハイフンで区切られた範囲。文書の残りの部分は変更せずに、特定の章またはセクションブロックのみを更新できます。
1,2,3-7,10混合ページ+範囲
個々のページや範囲を組み合わせることができます。複数セクションからなる契約書や技術マニュアルなど、複雑な文書に最大限の柔軟性を提供します。

出力​

ノードが返すフィールド。

分野タイプ内容物
successBooleanTrue when the operation succeeded.
messageStringStatus message, `Find and replace text operation completed successfully`.
fileNameStringFile name of the resulting file.
mimeTypeStringMIME type of the resulting file, for example `application/pdf`.
fileSizeNumberSize of the resulting file in bytes.
oldTextStringText that was searched for.
newTextStringReplacement text.
pageSequenceStringPage Sequence that was used, or `all pages` when the field was empty.
dataBinaryThe PDF with the text replaced.

クイックセットアップ​

  1. 追加 PDF4me あなたの n8n ワークフローを選択して選択する テキストの検索と置換 行動として。
  2. で 接続するための認証情報選択してください PDF4me 認証情報を使用するか、またはあなたの API 鍵。
  3. セット PDF 入力データタイプ に バイナリデータ そして地図 入力バイナリフィールド 前のノード(Dropbox、Google Drive、HTTPリクエストなど)のバイナリ出力に渡します。
  4. 入力 古いテキスト: 見つける正確なテキストパターン PDF (例えば。 Old Vendor Inc.)
  5. 入力 新しいテキスト: 置換テキスト (例: New Vendor LLC)
  6. セット ページシーケンス: 使用 all グローバル置換、または特定のページ/範囲など 1,2,3 または 1-5,10-15。
  7. セット 出力ファイル名 希望のファイル名に( .pdf 拡張)および バイナリデータ出力名 に data。
  8. オプションで有効化 非同期 大容量文書や大量処理向け。
  9. 実行します。出力バンドルには変更されたファイルが含まれています。 PDF すべての置換処理が完了し、アップロード、メール送信、またはさらなる処理の準備が整いました。

ワークフローの例​

ワークフローの例Common n8n workflow patterns using Find and Replace Text.
買収後のベンダー名の一括変更 → すべての契約を更新
  1. 買収後、法務チームはすべての有効な契約を更新する必要がある。 PDF 新しい法人名を反映させるため。
  2. A SharePoint ウォッチファイルは、active-contractsフォルダ内の各契約に対してトリガーとなるイベントを発生させます。
  3. PDF4me 検索と置換機能を使用すると、すべてのページ(ページシーケンス=すべて)で、古い会社名が新しい組織名に置き換えられます。フォントとレイアウトは保持されます。
  4. 追加の「テキストの検索と置換」ノードにより、同じ文書内の登録住所が旧本社から新本社に更新されます。
  5. 更新された契約は保存されます SharePoint バージョン管理されたファイル名を使用。Slack通知で法務部門に更新が通知されます。数百件の契約書が数分で更新され、Acrobatでの手動編集に数週間かかっていた作業が大幅に短縮されます。
見積書PDFのパーソナライズ → 顧客プレースホルダーの置換
  1. ウェブフックからの CRM 販売が新しい見積もりを生成すると発火する PDF テンプレートから。
  2. PDF4me 検索と置換テキストは、4回連続して実行され(連鎖ノード)、それぞれが1つのプレースホルダーを置換します。 {{CUSTOMER_NAME}}、 {{TOTAL_PRICE}}、 {{VALID_UNTIL}}、 {{ACCOUNT_MANAGER}}。
  3. パーソナライズされた見積もりは、件名と添付ファイルが動的に変化するGmail経由で顧客に送信されます。
  4. A Salesforce レコード更新ステップで最終見積もりを添付します PDF その機会に。
  5. Airtableのログには、顧客情報、見積もりID、合計金額、送信日時が記録され、売上報告に利用されます。
年間価格改定 → カタログ表紙のみ更新
  1. スケジュールトリガーは毎年1月1日に発動し、製品カタログを新しい価格で更新します。
  2. Googleドライブのリストステップでは、すべてのカタログを取得します。 PDF カタログフォルダ内。
  3. アイテムのループは、各アイテムを処理します。 PDF。 PDF4me 検索と置換テキスト「Pricing valid through 2024」を「Pricing valid through 2025」に更新し、ページシーケンスを 1,2 (表紙と概要ページのみ。本文はそのまま残す。)
  4. 2つ目の「テキストの検索と置換」ノードは、ページシーケンスの著作権表示の年フッターを更新します。 all。
  5. 更新されたカタログは、同じGoogleドライブの場所にアップロードされ、古いバージョンは上書きされます。マーケティング部門には、更新されたすべてのカタログを一覧表示するSlackサマリーが送信されます。

よくある質問​

Does Find and Replace Text preserve formatting and layout in the PDF?+
Yes. The replacement preserves the original font, color, size, and surrounding layout. Each occurrence of Old Text is replaced in place: the same character position, line, and text run. Surrounding text, images, page numbering, and document structure remain untouched. This is fundamentally different from converting a PDF to Word, editing, then converting back, which often shifts layout, breaks formatting, and forces manual cleanup. PDF4me modifies the PDF text stream directly without round-tripping through another format.
Can I find and replace text on specific pages only?+
Yes. The Page Sequence parameter accepts: all (entire document: the default), comma-separated page numbers like 1,2,3, page ranges like 1-5 or 10-15, or mixed combinations like 1,2,3-7,10. This is useful when you want to update only the title page, only specific chapters of a manual, only the cover and signature page of a contract, or only the pricing summary in a quote: and leave the body of the document completely untouched.
Does the find work on scanned PDFs or only on native PDFs?+
Find and Replace Text requires a selectable text layer in the source PDF. Native digital PDFs (created from Microsoft Word, Google Docs, LibreOffice, browser print, InDesign, BI tools, accounting software, etc.) work directly. Scanned or photographed PDFs must first be passed through an OCR step: the n8n node "Convert PDF to Editable PDF Using OCR" adds a searchable text layer over the scanned image, after which this node can find and replace within the text content. Chain the two nodes in sequence: OCR first, then Find and Replace.
Can I replace multiple different text patterns in one workflow run?+
Each Find and Replace Text node handles one find-and-replace pair per execution. To apply multiple substitutions, chain the node multiple times, each instance takes the output of the previous as input. For dynamic per-row substitution lists, use a SplitInBatches or Loop Over Items pattern: feed a list of {oldText, newText} pairs, loop, and call this node once per pair. The final output after the loop is the fully updated PDF with all substitutions applied in order. This pattern is the same one used by Microsoft Word and Adobe Acrobat for multi-replacement macros.
How does this compare to manually editing PDFs in Adobe Acrobat, PDFelement, or Foxit?+
Manual desktop PDF editors (Adobe Acrobat Pro, Foxit PhantomPDF, PDFelement, Nitro PDF, PDF-XChange Editor) require a human to open each file, run Find and Replace, save, and close: typically 1-3 minutes per document plus license fees per editor seat (Acrobat Pro is around $20/month/user). The PDF4me n8n node automates the same task: webhooks, schedules, or folder watches trigger the update across hundreds or thousands of PDFs without manual intervention. Use this for bulk vendor-name changes after acquisitions, branding updates across product catalogs, pricing refreshes on quote PDFs, terminology standardization across legal documents, or any standardization task across many documents. The same automation that would require an admin to spend hours in Acrobat runs end-to-end in seconds in n8n.

関連アクション​

ヘルプが必要な場合​