# Print to PDF Question

**URL:** <https://forum.robotframework.org/t/print-to-pdf-question/6943>\
**Category:** SeleniumLibrary\
**Created:** [4 March 2024 11:19 UTC](https://forum.robotframework.org/t/print-to-pdf-question/6943 "2024-03-04T11:19:48Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)\
**Post date:** [5 March 2024 07:53 UTC](https://forum.robotframework.org/t/print-to-pdf-question/6943/4 "2024-03-05T07:53:36Z")

</div>

Hi,

It’s not a keyword it’s chrome startup option. Found several issues on forums and all, but finally this worked for me :

```
${browser_prefs} Create Dictionary download.default_directory=_yourfolder plugins.always_open_pdf_externally=${True}
${chrome_options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument --log-level\=3
Call Method ${chrome_options} add_experimental_option prefs ${browser_prefs}

```

Then Open Browser with options :

```
  Open Browser url chrome options=${chrome_options}

```

- **Note** : The -log-level is not necessary, it’s just an example if you have to add other arguments/options (gpu, sandbox…) to your ${chrome\_options}.
- **Note** : for _yourfolder_, depending of your OS you could use ${/} for path (have it working on Windows and Linux for example)

This will the PDF downloaded where it should normally open in a new tab.

Best Regards.

Charlie

---

_[View the full topic](https://forum.robotframework.org/t/print-to-pdf-question/6943)._
