web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding text or image o...
Power Automate
Answered

Adding text or image of text to PDF

(0) ShareShare
ReportReport
Posted on by 244

Hi

 

I'm trying to add an ID number to a PDF, before archiving it. It's a six digit number, which should be added at a specific position of the PDF on a specific page (i have several different formats, where I'd like to specify the location based on filename).

 

Has anyone had any success with something similar? Preferably without 3rd party software, but scripts would be an option.

Though, if a straight forward solution exists with 3rd party software, I'm also curious.

 

It could also be adding a picture of the text, if that makes it easier. I'm also willing to use Power Automate/ Flow, if that could simplify the process. But PAD would be preferable.

 

TIA

Daniel

I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @Daniel_Pa 

     

    Maybe this is not the answer what you want, but what about using Word app to open PDF file?

     

    In below example, I use Word app to open PDF file, type 012345 into the top of the document, and then export it to PDF format file again.

     

    shindomo_0-1632317974399.png

     

    System.RunApplication ApplicationPath: $'''C:\\Program Files\\Microsoft Office\\root\\Office16\\WINWORD.EXE''' CommandLineArguments: $'''/t \"C:\\Users\\User01\\Documents\\PDF Files\\PDF 01.pdf\"''' WindowStyle: System.ProcessWindowStyle.Normal ProcessId=> AppProcessId
    WAIT (UIAutomation.Windows.ToOpenByTitleClass Title: $'''Microsoft Word''' Class: $'''#32770''' FocusWindow: True)
    MouseAndKeyboard.SendKeys TextToSend: $'''{Return}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
    WAIT (UIAutomation.Windows.ToOpenByTitleClass Title: $'''PDF 01 - Word''' Class: $'''OpusApp''' FocusWindow: True)
    MouseAndKeyboard.SendKeys TextToSend: $'''012345{Return}{Return}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
    MouseAndKeyboard.SendKeys TextToSend: $'''{Alt}(){F}{E}{A}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
    WAIT (UIAutomation.Windows.ToOpenByTitleClass Title: $'''Publish as PDF or XPS''' Class: $'''#32770''' FocusWindow: True)
    MouseAndKeyboard.SendKeys TextToSend: $'''New PDF File Name{Return}''' DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
  • Daniel_Pa Profile Picture
    244 on at

    Hi shindomo

     

    Great suggestion! Really appreciate it.

    I just tested it, and its close to a working suggestion, although some elements from the PDF act a bit funky when opened in Word. Some letters are jumping around, unfortunately.

     

    If it wasn't for that, I would gladly use your solution! But, since the documents are legal contracts, i can't allow any other modifications besides the addition of the ID, before archiving.

     

    Best,

    Daniel

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Assuming you have Adobe Pro, I would look into Header and Footer options.  They are very customizable and it's how I did the Bates numbering for a recent divorce/custody case with over 600 pages.  I even see an option for "Apply to Multiple Files"

    MichaelAnnis_0-1632321559442.png

    Regardless of whether or not you can find a solution here in Adobe Pro, I also recommend Adobe Split Pro.  It is a 3rd party software that runs about $100-120 per computer license (that's for life, no membership).  I use it to split, merge, rename files, etc.  It probably has a function or two that would be useful for Bates numbering.

     

    Best of Luck!

  • Daniel_Pa Profile Picture
    244 on at

    Hi Michael

     

    Thanks for chiming in - always appreciate reading your suggestions here on the forum.

    I've also considered buying Adobe Pro, but I would need an option to place the text at a specific place on each template. Not in the header or footer, but in an "ID field" (formatted as "xxxx ID: ___________") in the text on the last page. Do you know if this is possible with Adobe Pro?

     

    Best,

    Daniel

  • Verified answer
    Daniel_Pa Profile Picture
    244 on at

    I think i have found a viable solution!

     

    Using the free Adobe Reader, I'm able to add comments, which is enough for this use case, and keeps the signing history for the document.

     

    Thanks for the inputs though! 🙂

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Grats.  With Adobe Pro, you can add text anywhere, but automating it would be harder.

  • Daniel_Pa Profile Picture
    244 on at

    Yeah, it looks like adding text programmatically to PDFs is kinda tricky. Unless you go all in and use some Python Libraries or something similar.

     

    But for now, with just a handful templates, i believe im fine with just hardcoding where to place the text through mouse clicks on screen coordinates and keyboard shortcuts.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard