Skip to content

Conversation

@gfd2020
Copy link
Collaborator

@gfd2020 gfd2020 commented Feb 10, 2025

This PR exports the IPED html report in PDF format using the wkhtmltopdf program.

Implements Issue #1039

@gfd2020
Copy link
Collaborator Author

gfd2020 commented Feb 10, 2025

Hi @lfcnassif .

Could you please check if the PR is going in the right direction?

Just a preview of the result of transforming html into PDF.
To run on Windows, the wkhtmltopdf program must be in the tools path ( tools\wkhtmltopdf\wkhtmltopdf.exe )

@lfcnassif
Copy link
Member

lfcnassif commented Feb 11, 2025

Thank you @gfd2020 for working on this PR!

Thinking about a best effort approach, converting the current HTML report to PDF, instead of generating a PDF report from scratch using a PDF library (e.g. PDFBox), seems fine to me, at least as a first implementation. It should also make future maintenance easier, because it reuses a lot of the current report code, and that an important aspect to take into account.

Maybe @wladimirleite could also comment on this, since he is the original HTMLReport's author.

PS: If there are no limitations when comparing to a "create PDF from scratch approach", it is even better!

@wladimirleite
Copy link
Member

wladimirleite commented Feb 11, 2025

Maybe @wladimirleite could also comment on this, since he is the original HTMLReport's author.

It seems a great approach!

To be honest, I don't use the HTMLReport myself anymore (i.e. I only send the IPED analysis tool for my cases).
Some users ("end users" that are not familiar with IPED) were opening the HTML report and believed that it was the only report available. So they were missing a lot of features (search, sort, filter, complete metadata etc.) only available in the Java application.

But I do understand that the HTML report may be useful in some scenarios. The same applies for a PDF report. Converting the HTML to PDF seems indeed the best approach, as it would provide an alternative way to access the report, without the cost (code + test + maintain) of creating the PDF from the scratch.

@gfd2020
Copy link
Collaborator Author

gfd2020 commented Feb 11, 2025

report.pdf

I have attached an example of the report in PDF. Although wkhtmltopdf is powerful, it has limitations. So, I did my best to stay as close to the html report.

@gfd2020 gfd2020 requested a review from lfcnassif June 3, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants