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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / add text and image to ...
Power Apps
Unanswered

add text and image to existing pdf in power automate desktop

(0) ShareShare
ReportReport
Posted on by 159

Hi,

I want to add text and image in existing pdf using power automate desktop

Tried many things but still its not working

 

tried power shell script

Set-Location C:\.nuget\packages\freespire.pdf\8.6.0\lib\net6.0\
[void] [Reflection.Assembly]::LoadFile("C:\.nuget\packages\freespire.pdf\8.6.0\lib\net6.0\Spire.Pdf.dll")


spire.pdf.pdfdocument

$pdfdocument = New-Object spire.pdf.pdfdocument
$ImagePage=New-Object spire.pdf.Graphics.PdfImage
$page=New-Object spire.pdf.PdfPageBase
$font=New-Object spire.pdf.Graphics.PdfFont
$brush=New-Object spire.pdf.Graphics.PdfSolidBrush
$pdfdocument.LoadFromFile("C:\Downloads\ESS time entry\example.pdf")
$NumberofPages=$pdfdocument.Pages.Count
$page = $pdfdocument.Pages(0)
$ImagePage=$ImagePage.PdfImage.FromFile("C:\Downloads\ESS time entry\New Bitmap Image.bmp")
$page.Canvas.DrawString("abcdef", font, brush, 15, 25)

 

but nothing works

 

can anyone please help

 

Thanks

Neeraj

Categories:
I have the same question (0)
  • Resolutions Profile Picture
    125 on at

    It seems like you're trying to use PowerShell to manipulate PDFs using the Spire.PDF library. However, Power Automate Desktop does not directly support PowerShell scripting for PDF manipulation. Instead, you can achieve this task using Power Automate Desktop actions.

    Here's a general outline of how you can add text and an image to an existing PDF using Power Automate Desktop:

    1. **Open PDF:** Use the "Open Application" action to open the PDF file you want to modify.

    2. **Locate Insertion Point:** Use image recognition or coordinate-based actions to locate the insertion point in the PDF where you want to add the text and image.

    3. **Add Text:** Use the "Type Text" action to input the desired text at the identified insertion point.

    4. **Add Image:** Use the "Insert Image" action to insert the image at the identified insertion point.

    5. **Save PDF:** Use the appropriate action to save the modified PDF.

    6. **Close PDF Application:** Use the "Close Application" action to close the PDF application.

    Remember to adjust the actions and parameters based on your specific requirements and the PDF application you're using. Additionally, ensure that the PDF application supports automation through Power Automate Desktop.

    If you encounter specific issues or errors while implementing this workflow, feel free to provide more details, and I can assist you further.

    I hope this helps

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard