Skip to main content

Replace Text with Image - Image Insertion for Zapier

PDF4me Replace Text with Image swaps placeholders like [LOGO], SIGN_HERE, or {{PHOTO}} with actual images in Word docs—logos, signatures, or charts. Control sizing, page targeting (all, odd, even, first, last), and aspect ratio. Ideal for branding templates, inserting signatures in contracts, or embedding charts in reports—all without opening Word.

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's powerful Word text replacement services.

PDF4me Replace Text with Image Word Zapier - Document, File Name, Search Text, Image Content, Image Width, Image Height, page filtering
Configure Replace Text with Image—map Word File, Word File Name, Search Text, Image File; set Skip first page, Pages (e.g., all).

Configuration at a Glance

Example configuration from the Zapier interface

Word File mapped from step 4, Word File Name = abc.docx, Search Text = pellentesque, Image File mapped from step 3, Skip first page = False, Pages = all.

Word File

Map from step

Word File Name

abc.docx

Search Text

pellentesque

Image File

Map from step

Skip first page

True/False

Pages

all

:::tip Map Word File and Image File from previous steps Use the + button to map Word File, Word File Name, and Image File from earlier Zap steps (e.g., Google Drive, Dropbox, or a trigger). The Word file must provide full content, not "Exists but not shown" references. :::

:::warning File: (Exists but not shown) If you see "File: (Exists but not shown)" in the Word File or Image File field and get errors, select the option that provides the full file content instead. See Zapier & Power Automate Tips for details. :::

Key Features

  • Text-to-Image Replacement: Replace specific text strings with images throughout documents
  • Precise Text Matching: Case-sensitive text search and replacement
  • Image Size Control: Customize image dimensions with width and height parameters
  • Aspect Ratio Preservation: Maintain image proportions during resizing
  • Page Filtering: Target specific pages or page ranges for replacement
  • Advanced Filtering: Skip first page, target odd/even pages, or specify exact page numbers
  • Multiple Image Formats: Support for PNG, JPG, JPEG, BMP, GIF formats
  • Flexible Positioning: Insert images as Word shapes with precise positioning

Parameters

Complete list of parameters for the Replace Text with Image action. Parameter names match the Zapier configuration UI.

Quick setup checklist
  1. Map Word File and Word File Name from previous step
  2. Set Search Text to the placeholder to replace (e.g., pellentesque, [LOGO], SIGN_HERE)
  3. Map Image File from Drive, Dropbox, or trigger
  4. Set Skip first page (True/False) and Pages (all, odd, even, first, last)

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly. Advanced parameters provide fine-grained control over image sizing and page filtering.

ParameterTypeDescriptionExample
Word File***FileWord document—map from previous step (Drive, Dropbox, trigger)[4. File from Step 4]
Word File NameStringWord filename—with .docx or .doc extensionabc.docx
Search Text***StringText to find and replace—case-sensitive. All instances replaced with imagepellentesque
Image FileFileReplacement image—map from previous step. PNG, JPG, JPEG, BMP, GIF[3. File from Step 3]
Image WidthNumberImage Width in Points
• Width of replacement image in points
• Optional - uses original width if not specified
• Must be positive value
• If only Width specified, Height auto-calculated (aspect ratio)
• Precise sizing control when combined with Height
200
Image HeightNumberImage Height in Points
• Height of replacement image in points
• Optional - uses original height if not specified
• Must be positive value
• If only Height specified, Width auto-calculated (aspect ratio)
• Precise sizing control when combined with Width
150
Maintain Aspect RatioBooleanPreserve Image Proportions
Yes - Maintains original aspect ratio when resizing (default)
No - Uses exact width/height (may distort)
• When Yes, one dimension calculated to preserve proportions
• When No, both dimensions used exactly as specified
Yes
Skip First PageBooleanSkip Replacement on First Page
Yes - Skip text replacement on first page
No - Include first page (default)
• Useful when first page is cover/title page
• Applied before other page filtering
No
Apply To PagesStringApply to Specific Page Types
"all" - Apply to all pages (default)
"odd" - Odd-numbered pages only
"even" - Even-numbered pages only
"first" - First page only
"last" - Last page only
• Advanced targeting option
all
Page NumbersStringSpecific Page Numbers or Ranges
• Comma-separated page numbers or ranges
• Examples: "1,3,5", "2-4,6,8-10", "1,3,5-7"
• Combined with Apply To Pages for precise targeting
• Invalid page numbers silently ignored
1,3,5-7
Ignore Page NumbersStringPage Numbers to Exclude
• Comma-separated page numbers to skip
• Applied after other page filtering
• Examples: "2,4", "1,3,5"
• Useful for excluding cover or specific sections
2,4
Culture NameStringDocument Culture/Locale
• Culture code for document processing
• Examples: "en-US", "de-DE", "fr-FR"
• Default: null
• Affects document language and metadata
en-US

Output

The PDF4me Replace Text with Image action returns the modified Word document for use in subsequent Zap steps. The output format is common across all PDF4me Word file-returning actions in Zapier.

Key output fields (map these to your next step)

File Url

API endpoint to download the modified Word file. Map this to the next step's file input (Drive, Dropbox, or another PDF4me Word action).

api.pdf4me.com/Zapier/GetDocument?d=...
Alternate File Url

Alternative download URL with filename in path.

api.pdf4me.com/Zapier/GetAltDocument/.../document.docx
ParameterTypeDescription
Job IdStringUnique identifier for the Zapier job execution
File UrlURLAPI endpoint to download the modified Word file
Alternate File UrlURLAlternate download URL with filename in path
File NameStringBase filename without extension
Full File NameStringComplete filename with extension
File ExtensionStringFile extension (.docx)

Scenario Examples

The PDF4me Replace Text with Image action in Zapier provides comprehensive scenario templates designed for real-world template processing needs:

Automated Logo Placeholder Replacement Workflow

Replace logo placeholders with company logos automatically:

Complete Scenario Steps:

  1. Trigger: New proposal generated from template
  2. Get Proposal Template: Retrieve template with [LOGO] placeholder from library
  3. Get Company Logo: Fetch company logo PNG from assets folder
  4. Replace Logo Placeholder: Set Search Text = "[LOGO]"
  5. Set Logo Image: Map company logo to Image Content parameter
  6. Set Sizing: Image Width = 150, Maintain Aspect Ratio = Yes
  7. Apply to All Pages: Apply To Pages = "all" for consistent branding
  8. Skip Cover Page: Skip First Page = Yes if cover has different logo
  9. Upload Branded Proposal: Save to proposals folder with logo inserted
  10. Email Sales Team: Send ready-to-send proposal with branding

Business Benefits:

  • Brands 100+ proposals monthly automatically
  • Consistent logo sizing and placement across documents
  • Aspect ratio preservation maintains logo quality
  • Eliminates manual logo insertion saving 10 minutes per proposal

Industry Use Cases & Applications

  • Logo Insertion: Replace [LOGO] placeholders with company logos in proposal and report templates
  • Chart Embedding: Insert dynamically generated performance charts into monthly report templates
  • Signature Placement: Replace SIGN_HERE placeholders with authorized signature images in contracts
  • Product Images: Add product photos to specification templates replacing image placeholders
  • Brand Asset Population: Insert brand imagery (logos, icons, stamps) into marketing materials

Get Help