0

I am trying to convert TestNG report to PDF. I have tried so many options present on google but all are converting HTML code to PDF but I required replica of index.html or emailable report to PDF.

Many are offering different plug-ins.. I do not have problem with them unless there presentation and information​ they sharing is some what equalvent to TestNG report.

I understand the index.html have other dependansies like css and other things like images.

Can anyone suggest a good option. Please specify the jars required and import if possible.

It will really help :)

Shubham Jain
  • 16,610
  • 15
  • 78
  • 125
  • Please read [ask] and [How much research effort is expected?](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users) Please provide the code you have tried and the execution result including any error messages, etc. I did a quick google and there are a LOT of options. Which of them have you tried and what was the result? – JeffC Apr 21 '17 at 20:45
  • Have a look at this - http://stackoverflow.com/questions/633780/converting-html-files-to-pdf. – Grasshopper Apr 22 '17 at 06:54

2 Answers2

1

If you want a pdf report, you can use this TestNG extension: http://uttesh.com/pdfngreport/

Or you can write your own by implementing the IReporter interface, and maybe combined with IText or any other pdf generation lib.

juherr
  • 5,640
  • 1
  • 21
  • 63
0

If don't want to use above plugin and you just want to convert your index.html, you can refer the following thread.

A java library for converting xml/html to pdf

Community
  • 1
  • 1
Gaurang Shah
  • 11,764
  • 9
  • 74
  • 137