Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

PDF versions of the reports


It has been confirmed to me (by Gurock) that there is something else that is still an issue preventing PDF reports from being created in the PDF folder.


Any updates on this topic?
I just started evaluating the tool before purchase and found this PDF issue.

Version info:

About TestRail

TestRail version (up-to-date)
Built on 7/5/2018
Database version 188

I’ll contact the support via email.


For the issue we found we have not gotten anything back from Gurock and we don’t really know what the issue is. for my work it is apparently not a permissions issue.


This is my error log, replying to myself.

Report file or resource not found

Details: <missing>

File: /var/www/testrail/sys/helpers/ex.php

Line: 25

Status Code: 404


Uri: /testrail/index.php?/reports/get_pdf/7/1 (GET)

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36


Server: Linux 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64


at ex::raise (ex.php:77)

at ex::raiset (reports.php:398)

at Reports_controller->_stream_file (reports.php:460)

at Reports_controller->get_pdf (controller.php:257)

at Controller->_invoke_web_call (controller.php:168)

at Controller->_invoke_web (controller.php:120)

at Controller->_invoke (gizmo.php:107)

at require_once (index.php:106)


Any thoughts by anyone?


It is not creating the file in the PDF folder… It looks like they take the HTML report file and do a conversion to create the PDF file and file into the PDF folder.


Hi @Asmo,

@BGanger is correct TestRail takes the HTML report and pipes this through PhantomJS to create a PDF version. Although the exact reason for this failure appears to vary, here are the top 3 solutions.

  1. Ensure PhantomJS has the proper permission to run. This solution is more common on Linux as sometimes the TestRail files are extracted using sudo and thus results in files down by root with permissions 700. In this case recursively modify the permissions of the /testtail/bin directory to 755.

  2. Another case which is more rare is because PhantomJS relies on zlib to perform the compression the module could be missing from the PHP installation. This can be verified by executing php -i or a info.php page. If missing, install it.

  3. Lastly, as a final option, install PhantomJS to ensure all dependencies are in place. Also to bypass the bundled phantomJS and hopefully any issues it carries. The procedure for this is well documented on the web and varies by hosting environment.

I hope one of the above can resolve your PDF issue and look forward to any feedback you might have.



Thanks for the advice. Here is the feedback from my colleague:

Key phrase: install PhantomJS to ensure all dependencies are in place. It’s not enough just to install phantomjs like apt-get install phantomjs

After installing libfontconfig and fontconfig packages, you are able to run it like: /var/www/testrail/bin/phantomjs_x86_64 -v

But pdf reports still don’t work.

It’s needed to install other packages, below there is full list:

apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig fontconfig libfontconfig1-dev libfontconfig1

it starts working after that.

Now I can confirm that this works. Maybe others find these tips useful. :smiley:


We had already done #1 and 2 and my internal support person did #3 today and still no dice for us. We already have a support case open and I believe that case # is 181858


Thank you @Asmo for that information! I sure this will help others as well.

@BGanger thanks for the ticket number. I’ll be taking a look at it shortly.


We fixed this… With the newest version of Test Rail and needing to update a couple other systems (PHP 7, ionCube Loader) we decided to move the instance of the site under the more normal inetpub/wwwroot folder. Doing this alone fixed the issue with the PDFs not being generated. We had not upgraded TR at that time - we simply moved the site to the more standard location.


Thanks for sharing BGanger, that’s an interesting solution and I hope you are enjoying the latest version of TestRail!