Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhtml2pdf report template #140

Merged
merged 27 commits into from
Feb 13, 2024
Merged

xhtml2pdf report template #140

merged 27 commits into from
Feb 13, 2024

Conversation

rutujaac
Copy link
Collaborator

@rutujaac rutujaac commented Feb 12, 2024

Non Pango Report PDF Template using xhtml2pdf:

  1. Introduces new function to generate PDF report from HTML Template using xhtml2pdf python library

Pass the value to renderer in Reports.generate_report function in reports.py
Default value for renderer is weasyprint


Reports.generate_report(data, outputPath='./report.pdf', format = 'pdf', renderer='xhtml2pdf')


Scenarios tested:

  1. Print report using default weasyprint renderer:
    Output:
image
  1. Print report using xhtml2pdf renderer:
    Output:
image
  1. Unsupported output file format:
    Ouput:
image
  1. Unsupported renderer:
    Output:
image

rutujaCopods and others added 25 commits January 31, 2024 11:07
Added length for snippetCount in report template
…jaac/pebblo-private into rutuja-xhtml2pdf-report-template
Copy link
Collaborator

@shreyas-damle shreyas-damle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please add output in the description of the PR with below
    • Supported format and renderer
    • Supported format and unsupported renderer
    • Unsupported format and supported renderer
  • I would suggest to add unit tests with this, so that we make sure that existing functionality is not breaking.
  • Load history changes are included in this, please remove those.

pebblo/reports/reports.py Outdated Show resolved Hide resolved
shreyas-damle
shreyas-damle previously approved these changes Feb 13, 2024
Copy link
Collaborator

@shreyas-damle shreyas-damle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. Please consider taking unit tests in next PR.

@shreyas-damle shreyas-damle merged commit 01e154d into daxa-ai:main Feb 13, 2024
5 checks passed
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