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

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.

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.

Just a follow up for anyone that finds this thread:

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

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.

3 Likes

Hi,

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

Thanks and regards

Charlie

1 Like

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 :+1:

Dave.