Jonur / pi-cucumber-reports

Visual representation of the Test Automation Overview Report from Cucumber
0 stars 0 forks source link

Find a way to export PDFs #14

Closed seliardwb closed 5 years ago

Jonur commented 5 years ago

Hi @seliardwb , adding custom PDF functionality was very tricky, heavy and required quite a tricky servers-side scripting. Instead, I fixed the print CSS, so you can easily now just use the default Google Chrome's functionality for this.

In order to use the feature, enter the Print Preview (CTRL+P / CMD+P), select the preferred document's orientation (Portrait / Landscape) and make sure you have selected the "Background graphics" option from the extra settings. It is advised to select 75% if saving in landscape mode.

The background-color does not work on the list rows, but that's a good thing, as the text would be difficult to read on printed if it had a bacgkround-color. Give it a try, it works as expected for Google Chrome and it looks nice. The header, of course, is a little different, as it had to match the A4 settings.

Of course, git pull, npm i first.