Skip to content

1047 Add capability to export Site Summary reports as PDFs#1049

Open
tom-karasch wants to merge 4 commits into
Devfrom
1047-create-site-summary-as-pdf
Open

1047 Add capability to export Site Summary reports as PDFs#1049
tom-karasch wants to merge 4 commits into
Devfrom
1047-create-site-summary-as-pdf

Conversation

@tom-karasch

Copy link
Copy Markdown
Member

Introduces a new PDF generation page for Site Summaries, allowing users to select an export destination (Local, Storage, or SharePoint) and preview the report content before generation.

@tom-karasch tom-karasch self-assigned this Apr 27, 2026
@tom-karasch tom-karasch added enhancement request New feature or request high priority Critical issue that should be addressed quickly Task Project Task labels Apr 27, 2026
@tom-karasch tom-karasch linked an issue Apr 27, 2026 that may be closed by this pull request
@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch 2 times, most recently from cfb905d to 23fcb2f Compare May 20, 2026 22:08
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch 3 times, most recently from 5f00b5a to 044c571 Compare June 5, 2026 23:21
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch 2 times, most recently from 3cfd0ff to e3821ae Compare June 23, 2026 19:53
@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch 2 times, most recently from 36566d0 to d4616e8 Compare July 8, 2026 15:15
@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch from d4616e8 to a207ce8 Compare July 13, 2026 22:24

using Stream inputStream = await client.GetStreamAsync(htmlSrc);

using (FileStream pdfDest = new FileStream(fileName, FileMode.Create, FileAccess.Write))
Introduces a new PDF generation page for Site Summaries, allowing users to select an export destination (Local, Storage, or SharePoint) and preview the report content before generation.
Introduces the `itext.pdfhtml` dependency and initial helper classes to support converting Site Summary reports to PDF. This includes a new `SiteSummaryLog` entity for tracking generated files and updated routing logic to handle different export destinations (Local, Storage, and SharePoint).

Includes a legacy VB.NET reference file in `docs/` for logic migration purposes.

Fixes #1047
Makes the Site Summary PDF output path configurable via `appsettings.json` to support various export destinations.

Renames the `FilePath` configuration key to `PdfFilePath` for specificity.

Adds a `PdfURL` property to `SiteSummaryLog` for storing web-accessible PDF links.
Enables the conversion of existing HTML Site Summary report views into PDF files for local export.

This is achieved by:
*   Refactoring `SiteSummaryPdfHelper` to fetch the rendered HTML content from a local endpoint.
*   Utilizing `itext.pdfhtml` to convert the fetched HTML stream to a PDF file.
*   Introducing a new `_PdfReportLayout.cshtml` and an `IsPdf` flag in the report query specification for conditional rendering optimized for PDF output.
*   Adding the `itext.bouncy-castle-adapter` dependency to support required PDF functionalities.
*   Updating the `IndexPdf` page to trigger and save these locally generated PDFs.
@tom-karasch
tom-karasch force-pushed the 1047-create-site-summary-as-pdf branch from a207ce8 to a2f8e6e Compare July 13, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement request New feature or request high priority Critical issue that should be addressed quickly Task Project Task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Site Summary as PDF

2 participants