# Is there any way to export robot report.html,log.html as pdf

**URL:** <https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107>\
**Category:** Robot Framework\
**Created:** [27 December 2022 12:24 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107 "2022-12-27T12:24:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sk5](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/sk5/32/2180_2.png) [@sk5](https://forum.robotframework.org/u/sk5)\
**Post date:** [27 December 2022 12:24 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107/1 "2022-12-27T12:24:53Z")

</div>

Is there any way to export robot report.html,log.html as pdf ,I tried using python packages to convert html to pdf but have some issue since there are script element i guess.so it didn’t work.Is there any support from robot or any other approach .Any help would be much appreciated.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [27 December 2022 15:34 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107/2 "2022-12-27T15:34:52Z")

</div>

Hi @sk5,

Most OS’s have a print to pdf function built into the print dialogue, notably most windows versions don’t though you can install a pdf printer driver to solve this (free or commercial, there are several)

Also Chrome’s builtin print dialogue might also have the print to PDF functionality.

I know this is not an automated solution as it involves opening the reports in a browser and the printing it to a pdf manually, but i’m sure you could automate it if you need to do it often.

Dave.

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [13 May 2024 10:53 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107/3 "2024-05-13T10:53:22Z")

</div>

Just a follow up for anyone that finds this thread:

> **[Slack is your productivity platform](https://robotframework.slack.com/?redir=%2Farchives%2FC3C28F9DF%2Fp1710622140942579%3Fname%3DC3C28F9DF%26perma%3D1710622140942579)**
>
> Slack is a new way to communicate with your team. It’s faster, better organised and more secure than email.

If you don’t have Slack, the TLDR is:

Use rebot to expand all the keywords in the log, then use chrome to print to pdf

```python
rebot --expandkeywords name:* ./output.xml
Chrome --virtual-time-budget=10000 --headless --print-to-pdf=./chromium_long_log.pdf ./log.html

```

Hopefully this helps someone,

Dave.

---

<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:** [13 May 2024 17:24 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107/4 "2024-05-13T17:24:36Z")

</div>

Hi,

That’s a cool tool, as sometimes external teams need to have an overview of what’s happening in this robot 😁  
I use the - - flattenkeywords to clear things, but this could be useful too.

Thanks and regards

Charlie

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [14 May 2024 09:59 UTC](https://forum.robotframework.org/t/is-there-any-way-to-export-robot-report-html-log-html-as-pdf/5107/5 "2024-05-14T09:59:19Z")

</div>

Hi Charlie,

The `--expandkeywords` option lets you control what gets expanded, so yeah it’s pretty useful, if it wasn’t for that slack thread I’d never have looked up how to do this.

Helping others solve problems is actually a good way to increase your own knowledge 👍

Dave.
