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 / Print or Save Webpage ...
Power Automate
Unanswered

Print or Save Webpage to PDF

(0) ShareShare
ReportReport
Posted on by 10

Hello

 

I have already built a solution using web recorder which takes me to a specific webpage. We need to print to PDF the webpage.

 

On the page there is a Print button which does this:

 

javascript:window.print()

 

The problem is the web recorder does not record anything I do within the standard Chrome print dialog box (e.g. selecting the destination as 'Save as PDF', or actually clicking the blue 'Save' button.

 

I do not want to screenshot the webpage for formatting reasons.

 

Also, I would need some advice as to how to handle the actual PDF i.e once the save button is clicked, how to programmatically choose a file name and folder to save it.

 

I do not mind if the solution is to use another browser (currently using Chrome).

 

Thank you

I have the same question (0)
  • great1 Profile Picture
    10 on at

    Hello everyone.

     

    any help with this project would be much appreciated!

     

    many thanks in advance

     

    great1

  • Dudeonyx Profile Picture
    2 on at

    Switch to the Desktop recorder after you get to the print dialog.

     

    The print dialog isn't a webpage so the Web recorder won't work on it

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    By the moment I use this option with Chrome "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk-printing for resolve the problem, the flow is working.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    1. 'Launch new Edge' with the page you want
    2. 'Display select folder dialog' - select folder to save. %SelectedFolder% as variable produced
    3. 'Display input dialog' - define file name to save. Define %File% as variable produced
    4. 'Set variable' %FileName% = %SelectedFolder%\%File%
    5. 'Get window', foreground window
    6. 'Focus window', by instance = %AutomationWindow%
    7. 'Send keys' {LControlKey}({P})
    From here, use Desktop Recorder to get UI elements:
    8. Select Save as PDF and click button 'Save'
    9. In the 'Save as' window, select 'Name' field and populate it with %FileName%
    10. Click 'Save'

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks a  lot, work in Chrome too.

  • OXDevUser Profile Picture
    4 on at

    @Anonymous / @Anonymous: I'm always getting the error: "Failed to press button (button wasn't found)" in my Action 10.  Are you able to provide a step by step screencapture of how you were able to get it to work?

    OXDevUser_0-1638851779841.png

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    1) I would use {LControlKey}(p) - Send Keys can read “P” as Shift+p.

    2). I don’t think I have tried print to pdf and then had a save button, it’s usually a print button. If there is a save button, try send keys for control + s.

     

    Hope this helps. 

  • VJR Profile Picture
    7,635 on at

    Hi @OXDevUser 

     

    - After pressing Ctrl P

    - Give a wait stage for the print dialog to open

    - Then sendkeys for Enter

    This will hit the save button.

     

    Here it is assumed that you already have set the destination to "Save as Pdf"

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I know I'm late to the party but I just had this issue too.  What I did was to select Adobe DC as my default viewer to .png.  So I save webpage and it saves as png but when I open it, BOOM!  PDF

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard