This guide contains:
The PDF exporter plugin requires internet connectivity for installation and upgrade. Your Dradis instance can be taken offline afterwards.
Run the following in the console as dradispro
:
$ cd /home/dradispro $ git clone https://github.com/dradis/dradis-pdf_export.git
Edit file /opt/dradispro/dradispro/shared/addons/Gemfile.plugins
(create it if it does not already exist) and append the following to the end of the file:
gem 'dradis-pdf_export', path: '/home/dradispro/dradis-pdf_export'
Run the following in the console as dradispro
:
$ cd /opt/dradispro/dradispro/current/ $ ln -s /opt/dradispro/dradispro/shared/addons/Gemfile.plugins $ RAILS_ENV=production bundle install
Restart the app:
$ god restart dradispro-puma
Now, navigate to Export results in the header of one of your projects to see the new Generate PDF Reports option!
First, you're going to clone the PDF exporter locally. Navigate to the folder where you want to install the PDF exporter, then run the following in the console:
$ git clone https://github.com/dradis/dradis-pdf_export.git
Back in the dradis-ce
folder, edit file Gemfile.plugins
and add this line in the Export section:
gem 'dradis-pdf_export', path: '../path/to/dradis-pdf_export'
Make sure to update the path example above with your actual path to the correct folder!
Install the new PDF exporter by running this command from your local dradis-ce
folder:
$ bundle install
Restart the server ($ bundle exec rails server
), then navigate to Export results in the header to see the new Generate PDF Reports option!
We're using the powerful Prawn library to do the heavy lifting.
Essentially, you're just editing an .rb
file to customize it as needed. For more details on specific syntax options, check out the Prawn library linked above!
Create an exporter.rb
file! For a quick starting point, copy this sample PDF report template: exporter.rb and customize as needed.
Replace the existing file at /home/dradispro/dradis-pdf_export/lib/dradis/plugins/pdf_export/exporter.rb
with your new exporter.rb
file.
Run the following in the command line as dradispro
:
$ cd /opt/dradispro/dradispro/current/ $ RAILS_ENV=production bundle install $ god restart
Create an exporter.rb
file! For a quick starting point, copy this sample PDF report template: exporter.rb and customize as needed.
Replace the existing file at dradis-pdf_export/lib/dradis/plugins/pdf_export/exporter.rb
with your new exporter.rb
file.
Export from the Webapp
In the header of your project, navigate to Export
Navigate to the PDF tab and click Export
Export from the Command Line
Locate the ID of the project you want to export. If the browser shows https://192.168.56.102/pro/projects/50
, your project ID is 50
.
SSH into the box as dradispro and navigate to the current
folder:
$ cd /opt/dradispro/dradispro/current
Run the dradis:plugins:pdf:export
command.
For our example, with a project ID of 50, the command we need to run is this:
$ PROJECT_ID=50 RAILS_ENV=production bundle exec thor dradis:plugins:pdf:export --output=/tmp
Download your report from the output location (example: /tmp/
) displayed after the export finishes.
Export from the Webapp
In the header of your project, navigate to Export
Navigate to the PDF tab and click Export
Export from the Command Line
First, make sure that you are inside of the dradis-ce
folder
Run the dradis:plugins:pdf:export
command:
$ bundle exec thor dradis:plugins:pdf:export --output=/tmp
Download your report from the output location (example: /tmp/
) displayed after the export finishes.
Next help article: Creating Word reports with XSL transformations →
Your email is kept private. We don't do the spam thing.