From 225410a57402ea43e710e38a081e9449ffff5b17 Mon Sep 17 00:00:00 2001 From: Sebastian Drenckberg Date: Fri, 1 Apr 2022 15:25:14 +0200 Subject: [PATCH 1/2] rename project and namespace --- .gitignore | 2 +- .gitlab-ci.yml | 2 +- .vscode/launch.json | 4 +- .vscode/tasks.json | 6 +- LICENSE | 2 +- ...n => PDSLLabs.Public.QMSL.PDFGenerator.sln | 8 +- .../Controllers/AbsbHomepagePdfController.cs | 6 +- .../Controllers/EvaluationReportController.cs | 6 +- .../Controllers/FactSheetController.cs | 6 +- .../Controllers/SurveyPdfController.cs | 6 +- .../AbsbHomepagePdf/Appendix.cs | 16 +- .../AbsbHomepagePdf/Cover.cs | 16 +- .../DocumentStructures/BaseSection.cs | 132 +++---- .../DocumentStructures/BaseTableOfContents.cs | 2 +- .../EvaluationReport/Appendix.cs | 340 ++++++++--------- .../CourseGeneralInformation.cs | 10 +- .../CourseInformationTables.cs | 240 ++++++------ .../EvaluationReport/Cover.cs | 10 +- .../EvaluationReport/CriterionTarget.cs | 10 +- .../EvaluationReportBaseSection.cs | 338 ++++++++--------- .../EvaluationReport/EvaluationResults.cs | 10 +- .../EvaluationReport/KpiEvaluation.cs | 12 +- .../EvaluationReport/KpiEvaluationReports.cs | 344 +++++++++--------- .../EvaluationReport/Preface.cs | 10 +- .../EvaluationReport/TableOfContents.cs | 276 +++++++------- .../DocumentStructures/FactSheet/Chapter.cs | 6 +- .../DocumentStructures/FactSheet/Cover.cs | 6 +- .../FactSheet/FactSheetBaseSection.cs | 6 +- .../DocumentStructures/FactSheet/Footer.cs | 108 +++--- .../DocumentStructures/FactSheet/Header.cs | 8 +- .../FactSheet/HeaderFooterBase.cs | 260 ++++++------- .../SurveyBasePdf/Chapter.cs | 14 +- .../DocumentStructures/SurveyBasePdf/Cover.cs | 14 +- .../SurveyBasePdf/Footer.cs | 12 +- .../SurveyBasePdf/Header.cs | 6 +- .../SurveyBasePdf/Imprint.cs | 14 +- .../SurveyBasePdf/PreNoteAndSummary.cs | 8 +- .../SurveyBasePdf/SurveyPdfBaseSection.cs | 4 +- .../SurveyBasePdf/TableOfContents.cs | 8 +- .../NuGet.config | 0 .../PDSLLabs.Public.QMSL.PDFGenerator.csproj | 6 +- .../Program.cs | 2 +- .../Properties/launchSettings.example.json | 0 .../Renderers/AbsbHomepagePdfRenderer.cs | 6 +- .../Renderers/EvaluationReportRenderer.cs | 12 +- .../Renderers/FactSheetRenderer.cs | 11 +- .../Renderers/IRenderer.cs | 2 +- .../Renderers/SurveyBasePdfRenderer.cs | 16 +- .../Startup.cs | 2 +- .../Utilities/Bookmarks.cs | 4 +- .../Utilities/Conversion.cs | 2 +- .../Utilities/CustomSplitCharacters.cs | 2 +- .../Utilities/Globals.cs | 264 +++++++------- .../Utilities/Panel.cs | 2 +- .../Utilities/ParagraphFactory.cs | 222 +++++------ .../appsettings.Development.json | 0 .../appsettings.json | 0 .../nlog.config | 8 +- lib/PDFGenerator.Models.dll | Bin 28160 -> 0 bytes lib/PDSLLabs.QMSL.PDFGenerator.Models.dll | Bin 0 -> 28672 bytes nomad/live.nomad | 10 +- nomad/testing.nomad | 10 +- 62 files changed, 1434 insertions(+), 1435 deletions(-) rename pdf-generator.sln => PDSLLabs.Public.QMSL.PDFGenerator.sln (82%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Controllers/AbsbHomepagePdfController.cs (84%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Controllers/EvaluationReportController.cs (86%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Controllers/FactSheetController.cs (87%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Controllers/SurveyPdfController.cs (86%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/AbsbHomepagePdf/Appendix.cs (90%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/AbsbHomepagePdf/Cover.cs (72%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/BaseSection.cs (94%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/BaseTableOfContents.cs (94%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/Appendix.cs (93%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs (89%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/CourseInformationTables.cs (91%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/Cover.cs (87%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/CriterionTarget.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs (93%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/EvaluationResults.cs (95%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/KpiEvaluation.cs (89%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs (91%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/Preface.cs (93%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/EvaluationReport/TableOfContents.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/Chapter.cs (97%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/Cover.cs (82%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/FactSheetBaseSection.cs (78%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/Footer.cs (89%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/Header.cs (93%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/FactSheet/HeaderFooterBase.cs (94%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/Chapter.cs (94%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/Cover.cs (73%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/Footer.cs (78%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/Header.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/Imprint.cs (79%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs (87%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs (87%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/DocumentStructures/SurveyBasePdf/TableOfContents.cs (90%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/NuGet.config (100%) rename pdf-generator/pdf-generator.csproj => PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj (78%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Program.cs (97%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Properties/launchSettings.example.json (100%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Renderers/AbsbHomepagePdfRenderer.cs (85%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Renderers/EvaluationReportRenderer.cs (95%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Renderers/FactSheetRenderer.cs (85%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Renderers/IRenderer.cs (83%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Renderers/SurveyBasePdfRenderer.cs (90%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Startup.cs (98%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/Bookmarks.cs (95%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/Conversion.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/CustomSplitCharacters.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/Globals.cs (98%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/Panel.cs (94%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/Utilities/ParagraphFactory.cs (92%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/appsettings.Development.json (100%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/appsettings.json (100%) rename {pdf-generator => PDSLLabs.Public.QMSL.PDFGenerator}/nlog.config (84%) delete mode 100644 lib/PDFGenerator.Models.dll create mode 100644 lib/PDSLLabs.QMSL.PDFGenerator.Models.dll diff --git a/.gitignore b/.gitignore index f77eae4..abf4705 100644 --- a/.gitignore +++ b/.gitignore @@ -559,4 +559,4 @@ $RECYCLE.BIN/ # Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) -/pdf-generator/Properties/launchSettings.json \ No newline at end of file +/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.json \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4f061f..92c650c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -74,7 +74,7 @@ deploy_integration: only: [/^integration/.*$/] script: - iisreset - - Copy-Item -Path ".\output\*" -Destination "C:\inetpub\wwwroot\wss\VirtualDirectories\pdf-generator\" -Recurse -Exclude "web.config" + - Copy-Item -Path ".\output\*" -Destination "C:\inetpub\wwwroot\wss\VirtualDirectories\pdf-generator-qmsl\" -Recurse -Exclude "web.config" - iisreset variables: ErrorActionPreference: stop diff --git a/.vscode/launch.json b/.vscode/launch.json index d8f7e72..7688439 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,9 +9,9 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/pdf-generator/bin/Debug/netcoreapp3.1/pdf-generator.dll", + "program": "${workspaceFolder}/PDSLLabs.Public.QMSL.PDFGenerator/bin/Debug/netcoreapp3.1/pdf-generator.dll", "args": [], - "cwd": "${workspaceFolder}/pdf-generator", + "cwd": "${workspaceFolder}/PDSLLabs.Public.QMSL.PDFGenerator", "stopAtEntry": false, "serverReadyAction": { "action": "openExternally", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 7b18005..500e9e0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/pdf-generator/pdf-generator.csproj", + "${workspaceFolder}/PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -19,7 +19,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/pdf-generator/pdf-generator.csproj", + "${workspaceFolder}/PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], @@ -32,7 +32,7 @@ "args": [ "watch", "run", - "${workspaceFolder}/pdf-generator/pdf-generator.csproj", + "${workspaceFolder}/PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" ], diff --git a/LICENSE b/LICENSE index 6412641..f478f6c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Datencockpit +Copyright (c) 2022 QMS-Lehre Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pdf-generator.sln b/PDSLLabs.Public.QMSL.PDFGenerator.sln similarity index 82% rename from pdf-generator.sln rename to PDSLLabs.Public.QMSL.PDFGenerator.sln index ca5e0c3..1721c47 100644 --- a/pdf-generator.sln +++ b/PDSLLabs.Public.QMSL.PDFGenerator.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pdf-generator", "pdf-generator\pdf-generator.csproj", "{4501EAF1-485C-4230-9F81-8A562DB5FC5A}" +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30011.22 +MinimumVisualStudioVersion = 16.0.30011.22 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PDSLLabs.Public.QMSL.PDFGenerator", "PDSLLabs.Public.QMSL.PDFGenerator\PDSLLabs.Public.QMSL.PDFGenerator.csproj", "{4501EAF1-485C-4230-9F81-8A562DB5FC5A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/pdf-generator/Controllers/AbsbHomepagePdfController.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/AbsbHomepagePdfController.cs similarity index 84% rename from pdf-generator/Controllers/AbsbHomepagePdfController.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Controllers/AbsbHomepagePdfController.cs index b2f1f48..637b567 100644 --- a/pdf-generator/Controllers/AbsbHomepagePdfController.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/AbsbHomepagePdfController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using PDFGenerator.Models.AbsbHomepagePdf; -using PDFGenerator.Renderers; +using PDSLLabs.Public.QMSL.PDFGenerator.Renderers; +using PDSLLabs.QMSL.PDFGenerator.Models.AbsbHomepagePdf; -namespace PDFGenerator.Controllers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Controllers { [ApiController] [Route("[controller]")] diff --git a/pdf-generator/Controllers/EvaluationReportController.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/EvaluationReportController.cs similarity index 86% rename from pdf-generator/Controllers/EvaluationReportController.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Controllers/EvaluationReportController.cs index 4ef47ae..62f4f16 100644 --- a/pdf-generator/Controllers/EvaluationReportController.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/EvaluationReportController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using PDFGenerator.Renderers; -using EvaluationReportModel = PDFGenerator.Models.EvaluationReport.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Renderers; +using EvaluationReportModel = PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport.EvaluationReport; -namespace PDFGenerator.Controllers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Controllers { [ApiController] [Route("[controller]")] diff --git a/pdf-generator/Controllers/FactSheetController.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/FactSheetController.cs similarity index 87% rename from pdf-generator/Controllers/FactSheetController.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Controllers/FactSheetController.cs index a654635..4968d6b 100644 --- a/pdf-generator/Controllers/FactSheetController.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/FactSheetController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using PDFGenerator.Renderers; -using FactSheetModel = PDFGenerator.Models.FactSheet.FactSheet; +using PDSLLabs.Public.QMSL.PDFGenerator.Renderers; +using FactSheetModel = PDSLLabs.QMSL.PDFGenerator.Models.FactSheet.FactSheet; -namespace PDFGenerator.Controllers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Controllers { [Route("[controller]")] [ApiController] diff --git a/pdf-generator/Controllers/SurveyPdfController.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/SurveyPdfController.cs similarity index 86% rename from pdf-generator/Controllers/SurveyPdfController.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Controllers/SurveyPdfController.cs index 2b469b6..65b2e54 100644 --- a/pdf-generator/Controllers/SurveyPdfController.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Controllers/SurveyPdfController.cs @@ -1,9 +1,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Renderers; +using PDSLLabs.Public.QMSL.PDFGenerator.Renderers; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; -namespace PDFGenerator.Controllers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Controllers { [ApiController] [Route("[controller]")] diff --git a/pdf-generator/DocumentStructures/AbsbHomepagePdf/Appendix.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Appendix.cs similarity index 90% rename from pdf-generator/DocumentStructures/AbsbHomepagePdf/Appendix.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Appendix.cs index 97bbdcc..5bbea36 100644 --- a/pdf-generator/DocumentStructures/AbsbHomepagePdf/Appendix.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Appendix.cs @@ -3,17 +3,17 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.DocumentStructures.SurveyPdfDocStructures; -using PDFGenerator.Models.AbsbHomepagePdf; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.AbsbHomepagePdf; using System.Collections.Generic; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures { public class Appendix : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/AbsbHomepagePdf/Cover.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Cover.cs similarity index 72% rename from pdf-generator/DocumentStructures/AbsbHomepagePdf/Cover.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Cover.cs index c1a8f42..de7c2f3 100644 --- a/pdf-generator/DocumentStructures/AbsbHomepagePdf/Cover.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/AbsbHomepagePdf/Cover.cs @@ -1,15 +1,15 @@ using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.DocumentStructures.SurveyPdfDocStructures; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures { public class Cover : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/BaseSection.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseSection.cs similarity index 94% rename from pdf-generator/DocumentStructures/BaseSection.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseSection.cs index 98e4058..c03839b 100644 --- a/pdf-generator/DocumentStructures/BaseSection.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseSection.cs @@ -1,77 +1,77 @@ -using iText.Kernel.Geom; +using iText.Kernel.Geom; using iText.Kernel.Pdf; -using iText.Layout; -using iText.Layout.Element; +using iText.Layout; +using iText.Layout.Element; using iText.Layout.Layout; -using iText.Layout.Properties; -using PDFGenerator.Utilities; +using iText.Layout.Properties; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; -namespace PDFGenerator.DocumentStructures -{ - public abstract class BaseSection - { - protected PdfOutline RootOutline { get; } - protected Document Document { get; set; } - protected Bookmarks Bookmarks { get; } - public static Text NewLine { get; } = new Text("\n"); - - public BaseSection(Document document) +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures +{ + public abstract class BaseSection + { + protected PdfOutline RootOutline { get; } + protected Document Document { get; set; } + protected Bookmarks Bookmarks { get; } + public static Text NewLine { get; } = new Text("\n"); + + public BaseSection(Document document) + { + Document = document; + } + public BaseSection(Document document, Bookmarks bookmarks) { - Document = document; - } - public BaseSection(Document document, Bookmarks bookmarks) - { - // get root outline from the PdfDocument: false indicates iText does not need to update the outlines. - RootOutline = document.GetPdfDocument().GetOutlines(false); + // get root outline from the PdfDocument: false indicates iText does not need to update the outlines. + RootOutline = document.GetPdfDocument().GetOutlines(false); Bookmarks = bookmarks; - Document = document; - } - - /// - /// Adds page break to document. - /// - public void AddPageBreak() - { - Document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE)); - } - - /// - /// Gets default page size. - /// - /// The default page size. - protected PageSize GetPageSize() - { - return Document.GetPdfDocument().GetDefaultPageSize(); + Document = document; + } + + /// + /// Adds page break to document. + /// + public void AddPageBreak() + { + Document.Add(new AreaBreak(AreaBreakType.NEXT_PAGE)); + } + + /// + /// Gets default page size. + /// + /// The default page size. + protected PageSize GetPageSize() + { + return Document.GetPdfDocument().GetDefaultPageSize(); } - /// - /// Gets the current page. - /// - /// The current page. - protected int GetCurrentPage() - { - return Document.GetPdfDocument().GetNumberOfPages(); + /// + /// Gets the current page. + /// + /// The current page. + protected int GetCurrentPage() + { + return Document.GetPdfDocument().GetNumberOfPages(); } - /// - /// Resizes image to fit page size. - /// + /// + /// Resizes image to fit page size. + /// /// Image to be resized. /// Optional extra space. - /// Optional custom maximum height. - /// The resized image. - protected Image GetScaledImage(Image image, float marginTop = 0, float customMaxHeight = 0f) - { - PageSize pageSize = GetPageSize(); - float maxWidth = pageSize.GetWidth() - Document.GetLeftMargin() - Document.GetRightMargin(); - float maxHeight = customMaxHeight > 0 ? customMaxHeight : pageSize.GetHeight() - Document.GetTopMargin() - Document.GetBottomMargin() - marginTop; - - if (image.GetImageWidth() > maxWidth || image.GetImageHeight() > maxHeight) - { - return image.ScaleToFit(maxWidth, maxHeight); - } - - return image; + /// Optional custom maximum height. + /// The resized image. + protected Image GetScaledImage(Image image, float marginTop = 0, float customMaxHeight = 0f) + { + PageSize pageSize = GetPageSize(); + float maxWidth = pageSize.GetWidth() - Document.GetLeftMargin() - Document.GetRightMargin(); + float maxHeight = customMaxHeight > 0 ? customMaxHeight : pageSize.GetHeight() - Document.GetTopMargin() - Document.GetBottomMargin() - marginTop; + + if (image.GetImageWidth() > maxWidth || image.GetImageHeight() > maxHeight) + { + return image.ScaleToFit(maxWidth, maxHeight); + } + + return image; } /// @@ -97,6 +97,6 @@ namespace PDFGenerator.DocumentStructures } return result.GetOccupiedArea().GetBBox().GetY(); - } - } -} + } + } +} diff --git a/pdf-generator/DocumentStructures/BaseTableOfContents.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseTableOfContents.cs similarity index 94% rename from pdf-generator/DocumentStructures/BaseTableOfContents.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseTableOfContents.cs index 2161f21..f588aa9 100644 --- a/pdf-generator/DocumentStructures/BaseTableOfContents.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/BaseTableOfContents.cs @@ -4,7 +4,7 @@ using iText.Layout; using System.Collections.Generic; using System.IO; -namespace PDFGenerator.DocumentStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures { public struct TocItem { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/Appendix.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Appendix.cs similarity index 93% rename from pdf-generator/DocumentStructures/EvaluationReport/Appendix.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Appendix.cs index f0148a2..5a462c9 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/Appendix.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Appendix.cs @@ -1,114 +1,114 @@ using iText.IO.Image; -using iText.Kernel.Geom; -using iText.Kernel.Pdf; -using iText.Kernel.Pdf.Xobject; -using iText.Layout; -using iText.Layout.Borders; -using iText.Layout.Element; -using PDFGenerator.Models.EvaluationReport; -using PDFGenerator.Utilities; -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; - - -namespace PDFGenerator.DocumentStructures.EvaluationReport -{ - internal class Appendix : EvaluationReportBaseSection - { - private PDFAppendix PDFAppendix { get; } - private bool FirstFile { get; set; } - - public Appendix(PDFAppendix appendix, Document document, Bookmarks bookmarks, TableOfContents tableOfContents) - : base(document, bookmarks, tableOfContents) - { - PDFAppendix = appendix; - FirstFile = true; - } - - /// - /// Includes custom uploads to attachments available. - /// - /// Custom attachments to be added. - public void UpdateAppendix(Dictionary customUploads) - { - foreach (KeyValuePair item in customUploads) - { - if (!PDFAppendix.Attachments.ContainsKey(item.Key)) - { - PDFAppendix.Attachments.Add(item.Key, item.Value); - } - } - } - - /// - /// Renders the attachments for the appendix section. - /// - public override void Render() - { - if (PDFAppendix.Attachments.Count == 0 && PDFAppendix.ReportAttachments.Count == 0) - { - return; - } - - Bookmarks.AddRootOutline(PDFAppendix.Heading, RootOutline); - - TocItem tocItem = new TocItem - { - Title = PDFAppendix.Heading, - Indent = 0, - Page = GetCurrentPage() - }; +using iText.Kernel.Geom; +using iText.Kernel.Pdf; +using iText.Kernel.Pdf.Xobject; +using iText.Layout; +using iText.Layout.Borders; +using iText.Layout.Element; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; + + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport +{ + internal class Appendix : EvaluationReportBaseSection + { + private PDFAppendix PDFAppendix { get; } + private bool FirstFile { get; set; } + + public Appendix(PDFAppendix appendix, Document document, Bookmarks bookmarks, TableOfContents tableOfContents) + : base(document, bookmarks, tableOfContents) + { + PDFAppendix = appendix; + FirstFile = true; + } + + /// + /// Includes custom uploads to attachments available. + /// + /// Custom attachments to be added. + public void UpdateAppendix(Dictionary customUploads) + { + foreach (KeyValuePair item in customUploads) + { + if (!PDFAppendix.Attachments.ContainsKey(item.Key)) + { + PDFAppendix.Attachments.Add(item.Key, item.Value); + } + } + } + + /// + /// Renders the attachments for the appendix section. + /// + public override void Render() + { + if (PDFAppendix.Attachments.Count == 0 && PDFAppendix.ReportAttachments.Count == 0) + { + return; + } + + Bookmarks.AddRootOutline(PDFAppendix.Heading, RootOutline); + + TocItem tocItem = new TocItem + { + Title = PDFAppendix.Heading, + Indent = 0, + Page = GetCurrentPage() + }; TableOfContents.AddToTOC(tocItem); FirstFile = false; Paragraph p = new Paragraph(new Text(PDFAppendix.Heading).AddStyle(Styles.ChapterTitle)).SetDestination(PDFAppendix.Heading); Document.Add(p); - int counter = 1; - foreach (KeyValuePair>> attachment in PDFAppendix.ReportAttachments) + int counter = 1; + foreach (KeyValuePair>> attachment in PDFAppendix.ReportAttachments) { AddReportAttachment(attachment); if (counter < PDFAppendix.ReportAttachments.Count) { AddPageBreak(); - } - counter++; + } + counter++; } - foreach (KeyValuePair attachment in PDFAppendix.Attachments) + foreach (KeyValuePair attachment in PDFAppendix.Attachments) { if (PDFAppendix.ReportAttachments != null && PDFAppendix.ReportAttachments.Count > 0) { AddPageBreak(); - } + } AddAttachment(attachment); } - SetPageOrientation(Orientation.Portrait); + SetPageOrientation(Orientation.Portrait); } private void AddReportAttachment(KeyValuePair>> attachment) { - TocItem tocItem = new TocItem - { - Title = attachment.Key, - Indent = 1, - Page = GetCurrentPage() - }; + TocItem tocItem = new TocItem + { + Title = attachment.Key, + Indent = 1, + Page = GetCurrentPage() + }; TableOfContents.AddToTOC(tocItem); Paragraph paragraph = new Paragraph(attachment.Key).AddStyle(Styles.ChapterSubtitle).SetMarginBottom(8f).SetDestination(attachment.Key); Document.Add(paragraph); Table table = new Table(1, false).UseAllAvailableWidth().SetKeepTogether(true).SetMarginTop(20f); - ImageData imageData; - Image image; - int counter = 1; - foreach (KeyValuePair> reports in attachment.Value) - { - paragraph = new Paragraph(reports.Key).AddStyle(Styles.ChapterSubsubtitle).SetMarginBottom(-4f); - Document.Add(paragraph); + ImageData imageData; + Image image; + int counter = 1; + foreach (KeyValuePair> reports in attachment.Value) + { + paragraph = new Paragraph(reports.Key).AddStyle(Styles.ChapterSubsubtitle).SetMarginBottom(-4f); + Document.Add(paragraph); if (reports.Value == null || reports.Value.Count == 0) { paragraph = new Paragraph(PDFAppendix.NoDataAvailable).AddStyle(Styles.Paragraph).SetMarginBottom(15f); @@ -129,100 +129,100 @@ namespace PDFGenerator.DocumentStructures.EvaluationReport table.AddCell(cell); } - } + } Document.Add(table); - table = new Table(1, false).UseAllAvailableWidth().SetKeepTogether(true).SetMarginTop(20f); + table = new Table(1, false).UseAllAvailableWidth().SetKeepTogether(true).SetMarginTop(20f); if (attachment.Value.Count < counter) { AddPageBreak(); - } - counter++; + } + counter++; } } - /// - /// Adds a single attachment to document. - /// - /// The item composed of an attachment key and content. - private void AddAttachment(KeyValuePair item) - { - PdfReader attachment = new PdfReader(new MemoryStream(item.Value)); - PdfDocument source = new PdfDocument(attachment); - PdfDocument dest = Document.GetPdfDocument(); - - // avoiding the exception 'PdfReader not opened with owner password' from third party encrypted PDF uploads involves - // manipulating both 'unethicalReading' and 'encrypted' flags from PdfReader - - // In case the original author of the document defined permissions these permissions are ignored by setting 'unethicalReading' to true. - // This is not a problem, as setting such permissions has become obsolete, since PDF became an ISO standard and - // there is no longer a penalty for removing those permissions - // (refer to https://stackoverflow.com/questions/48064902/itext-7-pdfreader-is-not-opened-with-owner-password-error) - attachment.SetUnethicalReading(true); - - // Mislead iText into thinking that the original PDF file was not encrypted - attachment.GetType() - .GetField("encrypted", BindingFlags.NonPublic | BindingFlags.Instance) - .SetValue(attachment, false); - - // detect page orientation - Rectangle attachmentPageSize = source.GetPage(1).GetPageSizeWithRotation(); - PageSize pageSize = GetPageSize(); - - // if attachment orientation is landscape, but destination pdf is not - if ((attachmentPageSize.GetHeight() < attachmentPageSize.GetWidth()) && ((int)Math.Round(attachmentPageSize.GetHeight()) < pageSize.GetHeight())) - { - SetPageOrientation(Orientation.Landscape); - } - - // if attachment orientation is portrait but destination pdf is not - else if ((attachmentPageSize.GetHeight() > attachmentPageSize.GetWidth()) && ((int)Math.Round(attachmentPageSize.GetHeight()) > pageSize.GetHeight())) - { - SetPageOrientation(Orientation.Portrait); - } - - // table for inserting imported pages - // true flag: Avoid memory overhead problems from big imported files - Table table = new Table(1, true) - .UseAllAvailableWidth() - .SetDestination(item.Key); - - Document.Add(table); - - TocItem tocItem = new TocItem - { - Title = item.Key, - Indent = 1, - Page = GetCurrentPage() - }; - TableOfContents.AddToTOC(tocItem); - - for (int i = 1; i <= source.GetNumberOfPages(); i++) - { - PdfPage page = source.GetPage(i); - PdfFormXObject pageCopy = page.CopyAsFormXObject(dest); - Image image = new Image(pageCopy); - - - Cell cell = new Cell() - .Add(GetScaledImage(image)) - .SetBorder(Border.NO_BORDER) - .SetPadding(0) - .SetKeepTogether(true); - - table.AddCell(cell); - - // flush content of a single page to render part of the table: - // memory used be rendered cell objects is made available to the garbage collector for release - table.Flush(); - } - - // once all the cells are added write the remainder of the table that was not rendered yet - table.Complete(); - - source.Close(); - } - } -} + /// + /// Adds a single attachment to document. + /// + /// The item composed of an attachment key and content. + private void AddAttachment(KeyValuePair item) + { + PdfReader attachment = new PdfReader(new MemoryStream(item.Value)); + PdfDocument source = new PdfDocument(attachment); + PdfDocument dest = Document.GetPdfDocument(); + + // avoiding the exception 'PdfReader not opened with owner password' from third party encrypted PDF uploads involves + // manipulating both 'unethicalReading' and 'encrypted' flags from PdfReader + + // In case the original author of the document defined permissions these permissions are ignored by setting 'unethicalReading' to true. + // This is not a problem, as setting such permissions has become obsolete, since PDF became an ISO standard and + // there is no longer a penalty for removing those permissions + // (refer to https://stackoverflow.com/questions/48064902/itext-7-pdfreader-is-not-opened-with-owner-password-error) + attachment.SetUnethicalReading(true); + + // Mislead iText into thinking that the original PDF file was not encrypted + attachment.GetType() + .GetField("encrypted", BindingFlags.NonPublic | BindingFlags.Instance) + .SetValue(attachment, false); + + // detect page orientation + Rectangle attachmentPageSize = source.GetPage(1).GetPageSizeWithRotation(); + PageSize pageSize = GetPageSize(); + + // if attachment orientation is landscape, but destination pdf is not + if ((attachmentPageSize.GetHeight() < attachmentPageSize.GetWidth()) && ((int)Math.Round(attachmentPageSize.GetHeight()) < pageSize.GetHeight())) + { + SetPageOrientation(Orientation.Landscape); + } + + // if attachment orientation is portrait but destination pdf is not + else if ((attachmentPageSize.GetHeight() > attachmentPageSize.GetWidth()) && ((int)Math.Round(attachmentPageSize.GetHeight()) > pageSize.GetHeight())) + { + SetPageOrientation(Orientation.Portrait); + } + + // table for inserting imported pages + // true flag: Avoid memory overhead problems from big imported files + Table table = new Table(1, true) + .UseAllAvailableWidth() + .SetDestination(item.Key); + + Document.Add(table); + + TocItem tocItem = new TocItem + { + Title = item.Key, + Indent = 1, + Page = GetCurrentPage() + }; + TableOfContents.AddToTOC(tocItem); + + for (int i = 1; i <= source.GetNumberOfPages(); i++) + { + PdfPage page = source.GetPage(i); + PdfFormXObject pageCopy = page.CopyAsFormXObject(dest); + Image image = new Image(pageCopy); + + + Cell cell = new Cell() + .Add(GetScaledImage(image)) + .SetBorder(Border.NO_BORDER) + .SetPadding(0) + .SetKeepTogether(true); + + table.AddCell(cell); + + // flush content of a single page to render part of the table: + // memory used be rendered cell objects is made available to the garbage collector for release + table.Flush(); + } + + // once all the cells are added write the remainder of the table that was not rendered yet + table.Complete(); + + source.Close(); + } + } +} diff --git a/pdf-generator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs similarity index 89% rename from pdf-generator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs index b70a3b1..be645c3 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseGeneralInformation.cs @@ -1,13 +1,13 @@ using iText.Layout; using iText.Layout.Element; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; using System.Collections.Generic; using System.Linq; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class CourseGeneralInformation : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/CourseInformationTables.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseInformationTables.cs similarity index 91% rename from pdf-generator/DocumentStructures/EvaluationReport/CourseInformationTables.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseInformationTables.cs index 664b851..98789a1 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/CourseInformationTables.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CourseInformationTables.cs @@ -1,118 +1,118 @@ -using iText.Kernel.Colors; +using iText.Kernel.Colors; using iText.Kernel.Pdf.Action; -using iText.Layout; -using iText.Layout.Element; -using iText.Layout.Properties; -using PDFGenerator.Models.EvaluationReport; -using PDFGenerator.Utilities; -using System.Collections.Generic; -using System.Linq; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; - -namespace PDFGenerator.DocumentStructures.EvaluationReport -{ - public class CourseInformationTables : EvaluationReportBaseSection - { - private PDFCourseInformationTables Tables { get; } - public CourseInformationTables(PDFCourseInformationTables tables, Document document, Bookmarks bookmarks, TableOfContents tableOfContents) - : base(document, bookmarks, tableOfContents) - { - Tables = tables; - } - - /// - /// Renders the tables for general course information. - /// - public override void Render() - { - // negative values indicate that a specific expression should not be considered neither in the bookmark tree nor in table of contents - string[] sections = Tables.Sections.Where(section => section.Value >= 0).Select(section => section.Key).ToArray(); - string[] tableTitles = Tables.Sections.Where(section => section.Value < 0).Select(section => section.Key).ToArray(); - int sectionCount = 0; - - Bookmarks.AddRootOutline(sections[sectionCount], RootOutline); - - TocItem tocItem = new TocItem - { - Title = sections[sectionCount], - Indent = Tables.Sections[sections[sectionCount]], - Page = GetCurrentPage() - }; - TableOfContents.AddToTOC(tocItem); - - Paragraph p = new Paragraph(new Text(sections[sectionCount]).AddStyle(Styles.ChapterTitle)).SetDestination(sections[sectionCount++]); - Document.Add(p); - - - Table table; - foreach (List> TablesForSubject in Tables.Tables) - { - Bookmarks.AddOutline(sections[sectionCount], OutlineLevel.Level1); - - tocItem = new TocItem - { - Title = sections[sectionCount], - Indent = Tables.Sections[sections[sectionCount]], - Page = GetCurrentPage() - }; - TableOfContents.AddToTOC(tocItem); - - p = new Paragraph(new Text(sections[sectionCount]).AddStyle(Styles.ChapterSubtitle)).SetDestination(sections[sectionCount++]); - Document.Add(p); - - AddLineBreak(); - - int listCount = 0; - foreach (List entry in TablesForSubject) - { - // specific for po-version tables if available - if (listCount > 0 && listCount < TablesForSubject.Count - 1) - { - string header = listCount == 1 ? tableTitles[0] : tableTitles[1]; - - p = new Paragraph(new Text(header).AddStyle(Styles.ChapterSubtitle)); - Document.Add(p); - AddLineBreak(); - } - // add more distance between tables - else if (listCount > 0) - { - Document.Add(new Paragraph(string.Empty).SetMarginBottom(8f)); - } - - - table = new Table(UnitValue.CreatePercentArray(new float[] { 1f, 1f })) - .SetWidth(UnitValue.CreatePercentValue(100)) - .SetFixedLayout() - .SetMarginTop(-2f) - .SetMarginBottom(10f); - - foreach (CourseInformationTableEntry item in entry) - { - AddCell(table, item.Title, true); - AddCell(table, item.Content != null ? item.Content : "", false, item.IsLink); - } - - listCount++; - Document.Add(table); - } - } - - AddPageBreak(); +using iText.Layout; +using iText.Layout.Element; +using iText.Layout.Properties; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; +using System.Collections.Generic; +using System.Linq; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport +{ + public class CourseInformationTables : EvaluationReportBaseSection + { + private PDFCourseInformationTables Tables { get; } + public CourseInformationTables(PDFCourseInformationTables tables, Document document, Bookmarks bookmarks, TableOfContents tableOfContents) + : base(document, bookmarks, tableOfContents) + { + Tables = tables; + } + + /// + /// Renders the tables for general course information. + /// + public override void Render() + { + // negative values indicate that a specific expression should not be considered neither in the bookmark tree nor in table of contents + string[] sections = Tables.Sections.Where(section => section.Value >= 0).Select(section => section.Key).ToArray(); + string[] tableTitles = Tables.Sections.Where(section => section.Value < 0).Select(section => section.Key).ToArray(); + int sectionCount = 0; + + Bookmarks.AddRootOutline(sections[sectionCount], RootOutline); + + TocItem tocItem = new TocItem + { + Title = sections[sectionCount], + Indent = Tables.Sections[sections[sectionCount]], + Page = GetCurrentPage() + }; + TableOfContents.AddToTOC(tocItem); + + Paragraph p = new Paragraph(new Text(sections[sectionCount]).AddStyle(Styles.ChapterTitle)).SetDestination(sections[sectionCount++]); + Document.Add(p); + + + Table table; + foreach (List> TablesForSubject in Tables.Tables) + { + Bookmarks.AddOutline(sections[sectionCount], OutlineLevel.Level1); + + tocItem = new TocItem + { + Title = sections[sectionCount], + Indent = Tables.Sections[sections[sectionCount]], + Page = GetCurrentPage() + }; + TableOfContents.AddToTOC(tocItem); + + p = new Paragraph(new Text(sections[sectionCount]).AddStyle(Styles.ChapterSubtitle)).SetDestination(sections[sectionCount++]); + Document.Add(p); + + AddLineBreak(); + + int listCount = 0; + foreach (List entry in TablesForSubject) + { + // specific for po-version tables if available + if (listCount > 0 && listCount < TablesForSubject.Count - 1) + { + string header = listCount == 1 ? tableTitles[0] : tableTitles[1]; + + p = new Paragraph(new Text(header).AddStyle(Styles.ChapterSubtitle)); + Document.Add(p); + AddLineBreak(); + } + // add more distance between tables + else if (listCount > 0) + { + Document.Add(new Paragraph(string.Empty).SetMarginBottom(8f)); + } + + + table = new Table(UnitValue.CreatePercentArray(new float[] { 1f, 1f })) + .SetWidth(UnitValue.CreatePercentValue(100)) + .SetFixedLayout() + .SetMarginTop(-2f) + .SetMarginBottom(10f); + + foreach (CourseInformationTableEntry item in entry) + { + AddCell(table, item.Title, true); + AddCell(table, item.Content != null ? item.Content : "", false, item.IsLink); + } + + listCount++; + Document.Add(table); + } + } + + AddPageBreak(); } - /// - /// Adds a new cell to table. - /// - /// The table on which a new cell is added. - /// The cell content. + /// + /// Adds a new cell to table. + /// + /// The table on which a new cell is added. + /// The cell content. /// Flag to differentiate between left and right column. - /// Falg to differentiate between normal text an a clickable link - private void AddCell(Table table, string text, bool leftColumn, bool isLink = false) + /// Falg to differentiate between normal text an a clickable link + private void AddCell(Table table, string text, bool leftColumn, bool isLink = false) { - Text cellContent; + Text cellContent; if (isLink) { cellContent = new Link(text, PdfAction.CreateURI(text)); @@ -120,19 +120,19 @@ namespace PDFGenerator.DocumentStructures.EvaluationReport else { cellContent = new Text(text); - } + } Cell cell = new Cell().Add( new Paragraph( cellContent.AddStyle(Styles.Small).SetFontColor(ColorConstants.BLACK) ).SetMultipliedLeading(0.9f) ).SetKeepTogether(true) - .SetPadding(4.7f); - if (leftColumn) - { - cell.SetBackgroundColor(new DeviceRgb(142, 186, 229)); - } - - table.AddCell(cell); - } - } -} + .SetPadding(4.7f); + if (leftColumn) + { + cell.SetBackgroundColor(new DeviceRgb(142, 186, 229)); + } + + table.AddCell(cell); + } + } +} diff --git a/pdf-generator/DocumentStructures/EvaluationReport/Cover.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Cover.cs similarity index 87% rename from pdf-generator/DocumentStructures/EvaluationReport/Cover.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Cover.cs index f46d4c8..9457fa3 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/Cover.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Cover.cs @@ -3,14 +3,14 @@ using iText.Kernel.Geom; using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; using System; -using static PDFGenerator.Utilities.Conversion; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Conversion; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class Cover : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/CriterionTarget.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CriterionTarget.cs similarity index 92% rename from pdf-generator/DocumentStructures/EvaluationReport/CriterionTarget.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CriterionTarget.cs index a7b46c4..fab0793 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/CriterionTarget.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/CriterionTarget.cs @@ -1,14 +1,14 @@ using iText.Kernel.Colors; using iText.Layout; using iText.Layout.Element; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; using System.Collections.Generic; using System.Linq; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -using Target = PDFGenerator.Models.EvaluationReport.CriterionTarget; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using Target = PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport.CriterionTarget; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class CriterionTarget : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs similarity index 93% rename from pdf-generator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs index cbcbe52..63ae842 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationReportBaseSection.cs @@ -1,171 +1,171 @@ -using iText.IO.Image; -using iText.Kernel.Geom; -using iText.Kernel.Pdf; -using iText.Kernel.Pdf.Action; -using iText.Layout; -using iText.Layout.Borders; -using iText.Layout.Element; -using iText.Layout.Properties; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; -using System.Collections.Generic; -using System.IO; -using System.Text.RegularExpressions; -using static PDFGenerator.Utilities.Globals; - -namespace PDFGenerator.DocumentStructures.EvaluationReport -{ - public abstract class EvaluationReportBaseSection : BaseSection +using iText.IO.Image; +using iText.Kernel.Geom; +using iText.Kernel.Pdf; +using iText.Kernel.Pdf.Action; +using iText.Layout; +using iText.Layout.Borders; +using iText.Layout.Element; +using iText.Layout.Properties; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; +using System.Collections.Generic; +using System.IO; +using System.Text.RegularExpressions; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport +{ + public abstract class EvaluationReportBaseSection : BaseSection { - protected TableOfContents TableOfContents { get; set; } - - public EvaluationReportBaseSection(Document document, Bookmarks bookmarks, TableOfContents tableOfContents) : base(document, bookmarks) - { + protected TableOfContents TableOfContents { get; set; } + + public EvaluationReportBaseSection(Document document, Bookmarks bookmarks, TableOfContents tableOfContents) : base(document, bookmarks) + { TableOfContents = tableOfContents; - } - - /// - /// Renders the content in each section. - /// - public abstract void Render(); - - /// - /// Adds upload files directly to the document if they are images. - /// Uploads consisting of PDF files are added to the available custom uploads to be rendered as attachments in appendix - /// and links are added to the document referring to them instead. - /// If the custom uploads are neither PDF files nor image files an exception is thrown. - /// - /// New custom uploads to be considered. - /// Already available custom uploads. - protected void AddCustomUploads(CustomUploads uploads, Dictionary customUploads) - { - if (uploads.Files == null) - { - if (!string.IsNullOrEmpty(uploads.Paragraph)) - { - Document.Add(ParagraphFactory.GetStandardParagraph(uploads.Paragraph)); - return; - } - - return; - } - - bool imagesAvailable = false; - foreach (KeyValuePair file in uploads.Files) - { - // only accept files in image or PDF format, otherwise an exception is thrown below - - // firstly, check if file is a valid image - if (ImageDataFactory.IsSupportedType(file.Value)) - { - ImageData imageData = ImageDataFactory.Create(file.Value); - Image image = new Image(imageData) - .SetMarginTop(10f) - .SetHorizontalAlignment(HorizontalAlignment.CENTER) - .SetMarginBottom(15f); - - AddScaledImage(image); - imagesAvailable = true; - - continue; - } - - // secondly, if data does not correspond to a PDF file, an exception is thrown - new PdfReader(new MemoryStream(file.Value)); - - if (!customUploads.ContainsKey(file.Key)) - { - customUploads.Add(file.Key, file.Value); - } - - // ensure that the sentence is only written once - if (customUploads.Count == 1) - { - Document.Add(ParagraphFactory.GetStandardParagraph("Weitere Dokumente siehe Anhang.")); - } - - Document.Add( - ParagraphFactory.GetStandardParagraph(file.Key) - .SetMarginTop(-2f) - .SetAction(PdfAction.CreateGoTo(file.Key)) - ); - }; - - if (!imagesAvailable && !string.IsNullOrEmpty(uploads.Paragraph)) - { - Document.Add(ParagraphFactory.GetStandardParagraph(uploads.Paragraph)); - } - } - - /// - /// Adds paragraph above the table. - /// - /// The table on which the paragraph is added. - /// The paragraphs content. - /// Flag indicating whether the content is a table header. - /// Given style for paragraph. - protected void AddParagraphWithLeadingToTable(Table table, string text, bool header, Style style = null) - { - Cell cell = new Cell().SetBorder(Border.NO_BORDER); - Paragraph p; - - if (header) - { - cell.SetPaddingTop(12.5f).SetPaddingBottom(7f); - p = ParagraphFactory.GetTableHeaderParagraph(text, style); - } - else - { - cell.SetPaddingTop(0f); - p = ParagraphFactory.GetStandardParagraph(text); - } - p.SetKeepTogether(true); - - cell.Add(p); - table.AddCell(cell); - } - - /// - /// Changes the page orientation. - /// - /// Orientation to change to. - protected void SetPageOrientation(Orientation orientation) - { - if (orientation == Orientation.Landscape) - { - Document.GetPdfDocument().SetDefaultPageSize(PageSize.A4.Rotate()); - return; - } - - Document.GetPdfDocument().SetDefaultPageSize(PageSize.A4); - } - - /// - /// Adds line break to document. - /// - protected void AddLineBreak() - { - Document.Add(ParagraphFactory.GetTableHeaderParagraph(string.Empty)); - } - - /// - /// Prevents the default trim of leading whitespaces in the string - /// and immediately after a linebreak on iText7 by adding a NULL character ('\u0000') - /// - /// Text which leading whitespaces to be preserved. - /// Text with preserved leading whitespaces. - protected string PreserveLeadingSpaces(string text) - { - return "\u0000" + Regex.Replace(text, @"\n", "\n\u0000"); - } - - /// - /// Adds scaled image to document. - /// - /// Image to add do document. - private void AddScaledImage(Image image) - { - Document.Add(GetScaledImage(image)); - } - } -} + } + + /// + /// Renders the content in each section. + /// + public abstract void Render(); + + /// + /// Adds upload files directly to the document if they are images. + /// Uploads consisting of PDF files are added to the available custom uploads to be rendered as attachments in appendix + /// and links are added to the document referring to them instead. + /// If the custom uploads are neither PDF files nor image files an exception is thrown. + /// + /// New custom uploads to be considered. + /// Already available custom uploads. + protected void AddCustomUploads(CustomUploads uploads, Dictionary customUploads) + { + if (uploads.Files == null) + { + if (!string.IsNullOrEmpty(uploads.Paragraph)) + { + Document.Add(ParagraphFactory.GetStandardParagraph(uploads.Paragraph)); + return; + } + + return; + } + + bool imagesAvailable = false; + foreach (KeyValuePair file in uploads.Files) + { + // only accept files in image or PDF format, otherwise an exception is thrown below + + // firstly, check if file is a valid image + if (ImageDataFactory.IsSupportedType(file.Value)) + { + ImageData imageData = ImageDataFactory.Create(file.Value); + Image image = new Image(imageData) + .SetMarginTop(10f) + .SetHorizontalAlignment(HorizontalAlignment.CENTER) + .SetMarginBottom(15f); + + AddScaledImage(image); + imagesAvailable = true; + + continue; + } + + // secondly, if data does not correspond to a PDF file, an exception is thrown + new PdfReader(new MemoryStream(file.Value)); + + if (!customUploads.ContainsKey(file.Key)) + { + customUploads.Add(file.Key, file.Value); + } + + // ensure that the sentence is only written once + if (customUploads.Count == 1) + { + Document.Add(ParagraphFactory.GetStandardParagraph("Weitere Dokumente siehe Anhang.")); + } + + Document.Add( + ParagraphFactory.GetStandardParagraph(file.Key) + .SetMarginTop(-2f) + .SetAction(PdfAction.CreateGoTo(file.Key)) + ); + }; + + if (!imagesAvailable && !string.IsNullOrEmpty(uploads.Paragraph)) + { + Document.Add(ParagraphFactory.GetStandardParagraph(uploads.Paragraph)); + } + } + + /// + /// Adds paragraph above the table. + /// + /// The table on which the paragraph is added. + /// The paragraphs content. + /// Flag indicating whether the content is a table header. + /// Given style for paragraph. + protected void AddParagraphWithLeadingToTable(Table table, string text, bool header, Style style = null) + { + Cell cell = new Cell().SetBorder(Border.NO_BORDER); + Paragraph p; + + if (header) + { + cell.SetPaddingTop(12.5f).SetPaddingBottom(7f); + p = ParagraphFactory.GetTableHeaderParagraph(text, style); + } + else + { + cell.SetPaddingTop(0f); + p = ParagraphFactory.GetStandardParagraph(text); + } + p.SetKeepTogether(true); + + cell.Add(p); + table.AddCell(cell); + } + + /// + /// Changes the page orientation. + /// + /// Orientation to change to. + protected void SetPageOrientation(Orientation orientation) + { + if (orientation == Orientation.Landscape) + { + Document.GetPdfDocument().SetDefaultPageSize(PageSize.A4.Rotate()); + return; + } + + Document.GetPdfDocument().SetDefaultPageSize(PageSize.A4); + } + + /// + /// Adds line break to document. + /// + protected void AddLineBreak() + { + Document.Add(ParagraphFactory.GetTableHeaderParagraph(string.Empty)); + } + + /// + /// Prevents the default trim of leading whitespaces in the string + /// and immediately after a linebreak on iText7 by adding a NULL character ('\u0000') + /// + /// Text which leading whitespaces to be preserved. + /// Text with preserved leading whitespaces. + protected string PreserveLeadingSpaces(string text) + { + return "\u0000" + Regex.Replace(text, @"\n", "\n\u0000"); + } + + /// + /// Adds scaled image to document. + /// + /// Image to add do document. + private void AddScaledImage(Image image) + { + Document.Add(GetScaledImage(image)); + } + } +} diff --git a/pdf-generator/DocumentStructures/EvaluationReport/EvaluationResults.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationResults.cs similarity index 95% rename from pdf-generator/DocumentStructures/EvaluationReport/EvaluationResults.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationResults.cs index 15d047b..df9758c 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/EvaluationResults.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/EvaluationResults.cs @@ -3,13 +3,13 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.EvaluationReport; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; using System.Collections.Generic; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class EvaluationResults : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluation.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluation.cs similarity index 89% rename from pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluation.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluation.cs index cd7de18..4e86ddd 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluation.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluation.cs @@ -2,14 +2,14 @@ using iText.Kernel.Colors; using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; using System.Collections.Generic; -using Constants = PDFGenerator.Utilities.Globals.Constants; -using KPIEvaluation = PDFGenerator.Models.EvaluationReport.KpiEvaluation; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using Constants = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants; +using KPIEvaluation = PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport.KpiEvaluation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class KpiEvaluation : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs similarity index 91% rename from pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs index e87fde0..062e39b 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/KpiEvaluationReports.cs @@ -1,182 +1,182 @@ -using iText.IO.Image; -using iText.Kernel.Pdf.Action; -using iText.Layout; -using iText.Layout.Borders; -using iText.Layout.Element; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; -using System.Collections.Generic; -using Reports = PDFGenerator.Models.EvaluationReport.KpiEvaluationReports; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; - -namespace PDFGenerator.DocumentStructures.EvaluationReport -{ - public class KpiEvaluationReports : EvaluationReportBaseSection - { - private Reports Reports { get; } - private Table Table { get; set; } - private Dictionary CustomUploads { get; set; } - - public KpiEvaluationReports(Reports reports, Dictionary customUploads, Document document, - Bookmarks bookmarks, TableOfContents tableOfContents) : base(document, bookmarks, tableOfContents) - { - Reports = reports; - CustomUploads = customUploads; - } - - /// - /// Renders the report section for the current kpi. - /// - public override void Render() - { - if (Reports.Paragraphs != null) - { +using iText.IO.Image; +using iText.Kernel.Pdf.Action; +using iText.Layout; +using iText.Layout.Borders; +using iText.Layout.Element; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; +using System.Collections.Generic; +using Reports = PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport.KpiEvaluationReports; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport +{ + public class KpiEvaluationReports : EvaluationReportBaseSection + { + private Reports Reports { get; } + private Table Table { get; set; } + private Dictionary CustomUploads { get; set; } + + public KpiEvaluationReports(Reports reports, Dictionary customUploads, Document document, + Bookmarks bookmarks, TableOfContents tableOfContents) : base(document, bookmarks, tableOfContents) + { + Reports = reports; + CustomUploads = customUploads; + } + + /// + /// Renders the report section for the current kpi. + /// + public override void Render() + { + if (Reports.Paragraphs != null) + { Table = new Table(1, false).UseAllAvailableWidth().SetMarginTop(-10f); AddParagraphWithLeadingToTable(Table, Reports.Paragraphs[0], true); AddLinks(); - AddReports(); - + AddReports(); + Document.Add(Table); - } - + } + if (Reports.UploadedFilesForKpi != null) { AddCustomUploads(Reports.UploadedFilesForKpi, CustomUploads); - } - } - - /// - /// Adds links for the report section. - /// - private void AddLinks() - { - if (Reports.ExternalLinks != null) - { - Link link; - Paragraph hyperlink; - foreach (KeyValuePair item in Reports.ExternalLinks) - { - link = new Link(item.Key, PdfAction.CreateURI(item.Value)); - link.AddStyle(Styles.Link); - - hyperlink = new Paragraph(link).SetMarginTop(-1f).SetMultipliedLeading(1f); - - Table.AddCell(new Cell().Add(hyperlink).SetBorder(Border.NO_BORDER).SetPaddingBottom(9f)); - } - } - - if (Reports.InternalLinksOnSamePhrase != null) - { - Paragraph links; - Link link; - foreach (List linkSet in Reports.InternalLinksOnSamePhrase) - { - string expression = "Report(s) siehe Anhang. ("; - links = ParagraphFactory.GetCustomParagraph(expression, Styles.Paragraph, 0, 9, 1f); - - for (int i = 0; i < linkSet.Count; i++) - { - link = new Link(linkSet[i], PdfAction.CreateGoTo(linkSet[i])); - link.AddStyle(Styles.Paragraph); - links.Add(link); - if (i < linkSet.Count - 1) - { - links.Add(", "); - } - } - - links.Add(")"); - Table.AddCell(new Cell().Add(links).SetBorder(Border.NO_BORDER).SetPaddingBottom(9f)); - } - } - - if (Reports.InternalLinks != null) - { - foreach (KeyValuePair item in Reports.InternalLinks) - { - Paragraph link = ParagraphFactory.GetStandardParagraph(item.Key) - .SetMarginTop(-2f) - .SetAction(PdfAction.CreateGoTo(item.Value)); - - Table.AddCell(new Cell().Add(link).SetBorder(Border.NO_BORDER).SetPaddingBottom(0f)); - } - } - } - - /// - /// Adds reports and/or paragraphs for the report section. - /// - private void AddReports() - { - if (Reports.Reports == null) - { - // index 0 is reserved for the headline - for (int i = 1; i < Reports.Paragraphs.Count; i++) - { - Paragraph p = ParagraphFactory.GetStandardParagraph(Reports.Paragraphs[i]); - Table.AddCell(new Cell().SetPaddingTop(0f).SetBorder(Border.NO_BORDER).Add(p)); - } - - return; - } - - AddPageBreak(); - - // if order between images and text is important - if (Reports.ReportElementOrder != null) - { - int countImages = 0; - int countParagraphs = 1; - Reports.ReportElementOrder.ForEach(type => - { - if (type == LayoutElement.Image) - { - AddImageToTable(Reports.Reports[countImages++]); - } - - if (type == LayoutElement.Paragraph) - { - Paragraph p = ParagraphFactory.GetStandardParagraph(Reports.Paragraphs[countParagraphs++]); - Table.AddCell(new Cell().SetPaddingTop(0f).SetBorder(Border.NO_BORDER).Add(p)); - } - }); - - return; - } - - Reports.Reports.ForEach(item => - { - if (item != null) - { - AddImageToTable(item); - } - }); - } - - /// - /// Adds a single report. - /// - /// List of images representing the report. - private void AddImageToTable(List images) - { - ImageData imageData; - Image image; - foreach (byte[] imageB in images) - { - imageData = ImageDataFactory.Create(imageB); - image = new Image(imageData); - - Cell cell = new Cell() - .Add(GetScaledImage(image)) - .SetBorder(Border.NO_BORDER) - .SetPadding(0) - .SetPaddingBottom(12f); - - Table.AddCell(cell); - } - } - } -} + } + } + + /// + /// Adds links for the report section. + /// + private void AddLinks() + { + if (Reports.ExternalLinks != null) + { + Link link; + Paragraph hyperlink; + foreach (KeyValuePair item in Reports.ExternalLinks) + { + link = new Link(item.Key, PdfAction.CreateURI(item.Value)); + link.AddStyle(Styles.Link); + + hyperlink = new Paragraph(link).SetMarginTop(-1f).SetMultipliedLeading(1f); + + Table.AddCell(new Cell().Add(hyperlink).SetBorder(Border.NO_BORDER).SetPaddingBottom(9f)); + } + } + + if (Reports.InternalLinksOnSamePhrase != null) + { + Paragraph links; + Link link; + foreach (List linkSet in Reports.InternalLinksOnSamePhrase) + { + string expression = "Report(s) siehe Anhang. ("; + links = ParagraphFactory.GetCustomParagraph(expression, Styles.Paragraph, 0, 9, 1f); + + for (int i = 0; i < linkSet.Count; i++) + { + link = new Link(linkSet[i], PdfAction.CreateGoTo(linkSet[i])); + link.AddStyle(Styles.Paragraph); + links.Add(link); + if (i < linkSet.Count - 1) + { + links.Add(", "); + } + } + + links.Add(")"); + Table.AddCell(new Cell().Add(links).SetBorder(Border.NO_BORDER).SetPaddingBottom(9f)); + } + } + + if (Reports.InternalLinks != null) + { + foreach (KeyValuePair item in Reports.InternalLinks) + { + Paragraph link = ParagraphFactory.GetStandardParagraph(item.Key) + .SetMarginTop(-2f) + .SetAction(PdfAction.CreateGoTo(item.Value)); + + Table.AddCell(new Cell().Add(link).SetBorder(Border.NO_BORDER).SetPaddingBottom(0f)); + } + } + } + + /// + /// Adds reports and/or paragraphs for the report section. + /// + private void AddReports() + { + if (Reports.Reports == null) + { + // index 0 is reserved for the headline + for (int i = 1; i < Reports.Paragraphs.Count; i++) + { + Paragraph p = ParagraphFactory.GetStandardParagraph(Reports.Paragraphs[i]); + Table.AddCell(new Cell().SetPaddingTop(0f).SetBorder(Border.NO_BORDER).Add(p)); + } + + return; + } + + AddPageBreak(); + + // if order between images and text is important + if (Reports.ReportElementOrder != null) + { + int countImages = 0; + int countParagraphs = 1; + Reports.ReportElementOrder.ForEach(type => + { + if (type == LayoutElement.Image) + { + AddImageToTable(Reports.Reports[countImages++]); + } + + if (type == LayoutElement.Paragraph) + { + Paragraph p = ParagraphFactory.GetStandardParagraph(Reports.Paragraphs[countParagraphs++]); + Table.AddCell(new Cell().SetPaddingTop(0f).SetBorder(Border.NO_BORDER).Add(p)); + } + }); + + return; + } + + Reports.Reports.ForEach(item => + { + if (item != null) + { + AddImageToTable(item); + } + }); + } + + /// + /// Adds a single report. + /// + /// List of images representing the report. + private void AddImageToTable(List images) + { + ImageData imageData; + Image image; + foreach (byte[] imageB in images) + { + imageData = ImageDataFactory.Create(imageB); + image = new Image(imageData); + + Cell cell = new Cell() + .Add(GetScaledImage(image)) + .SetBorder(Border.NO_BORDER) + .SetPadding(0) + .SetPaddingBottom(12f); + + Table.AddCell(cell); + } + } + } +} diff --git a/pdf-generator/DocumentStructures/EvaluationReport/Preface.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Preface.cs similarity index 93% rename from pdf-generator/DocumentStructures/EvaluationReport/Preface.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Preface.cs index 2f58e65..10c4e30 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/Preface.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/Preface.cs @@ -3,13 +3,13 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Utilities; -using PDFGenerator.Models.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport; using System.Linq; -using static PDFGenerator.Utilities.Globals; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.DocumentStructures.EvaluationReport +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { public class Preface : EvaluationReportBaseSection { diff --git a/pdf-generator/DocumentStructures/EvaluationReport/TableOfContents.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/TableOfContents.cs similarity index 92% rename from pdf-generator/DocumentStructures/EvaluationReport/TableOfContents.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/TableOfContents.cs index 4d78040..84ca5f5 100644 --- a/pdf-generator/DocumentStructures/EvaluationReport/TableOfContents.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/EvaluationReport/TableOfContents.cs @@ -1,147 +1,145 @@ -using iText.Kernel.Pdf.Action; -using iText.Kernel.Pdf.Canvas.Draw; -using iText.Layout; -using iText.Layout.Element; -using iText.Layout.Properties; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; - -namespace PDFGenerator.DocumentStructures.EvaluationReport +using iText.Kernel.Pdf.Action; +using iText.Kernel.Pdf.Canvas.Draw; +using iText.Layout; +using iText.Layout.Element; +using iText.Layout.Properties; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport { + public class TableOfContents : BaseTableOfContents + { + public TableOfContents(Document document) : base(document) + { + } - public class TableOfContents : BaseTableOfContents - { - public TableOfContents(Document document) : base(document) + /// + /// Adds the table of contents to the document. + /// + /// The PDF document. + /// The page number for the beginning of appendix. + protected override void AddTOC(Document document, int appendixStart) { + Paragraph paragraph = new Paragraph(new Text("Inhaltsverzeichnis").AddStyle(Styles.ChapterTitle)).SetMarginBottom(20f); + document.Add(paragraph); + + float width = document.GetPdfDocument().GetDefaultPageSize().GetWidth(); + TabStop tabStop = new TabStop(width, TabAlignment.RIGHT, new DottedLine()); // maximal document width exclusive margin + + foreach (TocItem item in TocItems) + { + Text title = new Text(item.Title); + Text page = item.Page < appendixStart ? new Text("\t" + (TocPages + item.Page)) : new Text("\t" + ToRoman(item.Page + 1 - appendixStart)); + + if (item.Indent == 0) + { + title.AddStyle(Styles.ChapterSubtitle); + page.AddStyle(Styles.ChapterSubtitle); + + paragraph = new Paragraph() + .AddTabStops(tabStop) + .Add(title) + .Add(new Tab()) + .Add(page) + .SetAction(PdfAction.CreateGoTo(item.Title)) + .SetMarginTop(10f); + + document.Add(paragraph); + continue; + } + title.AddStyle(Styles.Paragraph); + page.AddStyle(Styles.Paragraph); + + paragraph = new Paragraph() + .AddTabStops(tabStop) + .Add(title) + .Add(new Tab()) + .Add(page) + .SetAction(PdfAction.CreateGoTo(item.Title)) + .SetMarginTop(-1.43f) + .SetMarginLeft(17f * item.Indent) + .SetMultipliedLeading(1.4f); + + document.Add(paragraph); + } } - /// - /// Adds the table of contents to the document. - /// - /// The PDF document. - /// The page number for the beginning of appendix. - protected override void AddTOC(Document document, int appendixStart) - { - Paragraph paragraph = new Paragraph(new Text("Inhaltsverzeichnis").AddStyle(Styles.ChapterTitle)).SetMarginBottom(20f); - document.Add(paragraph); - - float width = document.GetPdfDocument().GetDefaultPageSize().GetWidth(); - TabStop tabStop = new TabStop(width, TabAlignment.RIGHT, new DottedLine()); // maximal document width exclusive margin - - foreach (TocItem item in TocItems) - { - Text title = new Text(item.Title); - Text page = item.Page < appendixStart ? new Text("\t" + (TocPages + item.Page)) : new Text("\t" + ToRoman(item.Page + 1 - appendixStart)); - - if (item.Indent == 0) - { - title.AddStyle(Styles.ChapterSubtitle); - page.AddStyle(Styles.ChapterSubtitle); - - paragraph = new Paragraph() - .AddTabStops(tabStop) - .Add(title) - .Add(new Tab()) - .Add(page) - .SetAction(PdfAction.CreateGoTo(item.Title)) - .SetMarginTop(10f); - - document.Add(paragraph); - continue; - } - - title.AddStyle(Styles.Paragraph); - page.AddStyle(Styles.Paragraph); - - paragraph = new Paragraph() - .AddTabStops(tabStop) - .Add(title) - .Add(new Tab()) - .Add(page) - .SetAction(PdfAction.CreateGoTo(item.Title)) - .SetMarginTop(-1.43f) - .SetMarginLeft(17f * item.Indent) - .SetMultipliedLeading(1.4f); - - document.Add(paragraph); + /// + /// Converts a number to roman numerals. + /// + /// Page number to convert. + /// The converted number in roman numerals. + public static string ToRoman(int number) + { + if (number >= 1000) + { + return "m" + ToRoman(number - 1000); + } + + if (number >= 900) + { + return "cm" + ToRoman(number - 900); + } + + if (number >= 500) + { + return "d" + ToRoman(number - 500); + } + + if (number >= 400) + { + return "cd" + ToRoman(number - 400); } - } - - /// - /// Converts a number to roman numerals. - /// - /// Page number to convert. - /// The converted number in roman numerals. - public static string ToRoman(int number) - { - if (number >= 1000) - { - return "m" + ToRoman(number - 1000); - } - - if (number >= 900) - { - return "cm" + ToRoman(number - 900); - } - - if (number >= 500) - { - return "d" + ToRoman(number - 500); - } - - if (number >= 400) - { - return "cd" + ToRoman(number - 400); - } - - if (number >= 100) - { - return "c" + ToRoman(number - 100); - } - - if (number >= 90) - { - return "xc" + ToRoman(number - 90); - } - - if (number >= 50) - { - return "l" + ToRoman(number - 50); - } - - if (number >= 40) - { - return "xl" + ToRoman(number - 40); - } - - if (number >= 10) - { - return "x" + ToRoman(number - 10); - } - - if (number >= 9) - { - return "ix" + ToRoman(number - 9); - } - - if (number >= 5) - { - return "v" + ToRoman(number - 5); - } - - if (number >= 4) - { - return "iv" + ToRoman(number - 4); - } - - if (number >= 1) - { - return "i" + ToRoman(number - 1); - } - - // if number < 1 - return string.Empty; - } - } -} + + if (number >= 100) + { + return "c" + ToRoman(number - 100); + } + + if (number >= 90) + { + return "xc" + ToRoman(number - 90); + } + + if (number >= 50) + { + return "l" + ToRoman(number - 50); + } + + if (number >= 40) + { + return "xl" + ToRoman(number - 40); + } + + if (number >= 10) + { + return "x" + ToRoman(number - 10); + } + + if (number >= 9) + { + return "ix" + ToRoman(number - 9); + } + + if (number >= 5) + { + return "v" + ToRoman(number - 5); + } + + if (number >= 4) + { + return "iv" + ToRoman(number - 4); + } + + if (number >= 1) + { + return "i" + ToRoman(number - 1); + } + + // if number < 1 + return string.Empty; + } + } +} diff --git a/pdf-generator/DocumentStructures/FactSheet/Chapter.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Chapter.cs similarity index 97% rename from pdf-generator/DocumentStructures/FactSheet/Chapter.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Chapter.cs index bd7ba89..d1f3e46 100644 --- a/pdf-generator/DocumentStructures/FactSheet/Chapter.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Chapter.cs @@ -3,12 +3,12 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.FactSheet; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; using System.Collections.Generic; using System.Linq; -namespace PDFGenerator.DocumentStructures.FactSheet +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet { public class Chapter : FactSheetBaseSection { diff --git a/pdf-generator/DocumentStructures/FactSheet/Cover.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Cover.cs similarity index 82% rename from pdf-generator/DocumentStructures/FactSheet/Cover.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Cover.cs index f9fdf16..678fd36 100644 --- a/pdf-generator/DocumentStructures/FactSheet/Cover.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Cover.cs @@ -1,9 +1,9 @@ using iText.Layout; using iText.Layout.Properties; -using PDFGenerator.Models.FactSheet; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; -namespace PDFGenerator.DocumentStructures.FactSheet +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet { public class Cover : FactSheetBaseSection { diff --git a/pdf-generator/DocumentStructures/FactSheet/FactSheetBaseSection.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/FactSheetBaseSection.cs similarity index 78% rename from pdf-generator/DocumentStructures/FactSheet/FactSheetBaseSection.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/FactSheetBaseSection.cs index ae08ad0..d7e8b0c 100644 --- a/pdf-generator/DocumentStructures/FactSheet/FactSheetBaseSection.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/FactSheetBaseSection.cs @@ -1,9 +1,9 @@ using iText.Layout; -using PDFGenerator.Models.FactSheet; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; using System.Collections.Generic; -using Styles = PDFGenerator.Utilities.Globals.Constants.FactSheet.Styles; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.FactSheet.Styles; -namespace PDFGenerator.DocumentStructures.FactSheet +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet { public abstract class FactSheetBaseSection : BaseSection { diff --git a/pdf-generator/DocumentStructures/FactSheet/Footer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Footer.cs similarity index 89% rename from pdf-generator/DocumentStructures/FactSheet/Footer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Footer.cs index e790d43..ecfbde1 100644 --- a/pdf-generator/DocumentStructures/FactSheet/Footer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Footer.cs @@ -1,42 +1,42 @@ -using iText.Kernel.Geom; -using iText.Layout; -using iText.Layout.Element; -using iText.Layout.Properties; -using PDFGenerator.Models.FactSheet; -using System; -using static PDFGenerator.Utilities.Globals.Constants.FactSheet; - -namespace PDFGenerator.DocumentStructures.FactSheet -{ - public class Footer : HeaderFooterBase - { - private PDFHeaderFooter PDFFooter { get; } - - public Footer(PDFHeaderFooter footer, Document document, System.IO.MemoryStream inputStream) : base(document, inputStream) - { - PDFFooter = footer; - } - - /// - /// Initializes content for footer. - /// - protected override void InitializeElements() - { - PageSize pageSize = GetPageSize(); - - // add titles on the left/or right side - if (PDFFooter.Titles != null) - { - if (PDFFooter.Titles.ContainsKey(Alignment.Left)) - { - string text = string.Join(Environment.NewLine, PDFFooter.Titles[Alignment.Left]); - AddItem(text, Margins.LeftMargin, TextAlignment.LEFT); - } - - if (PDFFooter.Titles.ContainsKey(Alignment.Right)) - { - string text = string.Join(Environment.NewLine, PDFFooter.Titles[Alignment.Right]); - AddItem(text, pageSize.GetRight() - Margins.RightMargin, TextAlignment.RIGHT); +using iText.Kernel.Geom; +using iText.Layout; +using iText.Layout.Element; +using iText.Layout.Properties; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; +using System; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.FactSheet; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet +{ + public class Footer : HeaderFooterBase + { + private PDFHeaderFooter PDFFooter { get; } + + public Footer(PDFHeaderFooter footer, Document document, System.IO.MemoryStream inputStream) : base(document, inputStream) + { + PDFFooter = footer; + } + + /// + /// Initializes content for footer. + /// + protected override void InitializeElements() + { + PageSize pageSize = GetPageSize(); + + // add titles on the left/or right side + if (PDFFooter.Titles != null) + { + if (PDFFooter.Titles.ContainsKey(Alignment.Left)) + { + string text = string.Join(Environment.NewLine, PDFFooter.Titles[Alignment.Left]); + AddItem(text, Margins.LeftMargin, TextAlignment.LEFT); + } + + if (PDFFooter.Titles.ContainsKey(Alignment.Right)) + { + string text = string.Join(Environment.NewLine, PDFFooter.Titles[Alignment.Right]); + AddItem(text, pageSize.GetRight() - Margins.RightMargin, TextAlignment.RIGHT); } } @@ -48,20 +48,20 @@ namespace PDFGenerator.DocumentStructures.FactSheet TextAlignment = TextAlignment.LEFT, VerticalAlignment = VerticalAlignment.BOTTOM }; - } - - /// - /// Adds new pararaph to footer. - /// - /// The paragrah text to be added. - /// The x-position. - /// The text alignment. - private void AddItem(string text, float positionX, TextAlignment alignment) - { - Paragraph content = new Paragraph(new Text(text).AddStyle(Styles.Footer)) + } + + /// + /// Adds new pararaph to footer. + /// + /// The paragrah text to be added. + /// The x-position. + /// The text alignment. + private void AddItem(string text, float positionX, TextAlignment alignment) + { + Paragraph content = new Paragraph(new Text(text).AddStyle(Styles.Footer)) .SetMultipliedLeading(1.0f); - AddItem(content, positionX, PDFFooter.Indent, alignment, VerticalAlignment.BOTTOM); - } - } -} + AddItem(content, positionX, PDFFooter.Indent, alignment, VerticalAlignment.BOTTOM); + } + } +} diff --git a/pdf-generator/DocumentStructures/FactSheet/Header.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Header.cs similarity index 93% rename from pdf-generator/DocumentStructures/FactSheet/Header.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Header.cs index 294e6f4..f48a21f 100644 --- a/pdf-generator/DocumentStructures/FactSheet/Header.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/Header.cs @@ -3,14 +3,14 @@ using iText.Kernel.Geom; using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.FactSheet; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; using System; using System.IO; using System.Linq; -using static PDFGenerator.Utilities.Conversion; -using static PDFGenerator.Utilities.Globals.Constants.FactSheet; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Conversion; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.FactSheet; -namespace PDFGenerator.DocumentStructures.FactSheet +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet { public class Header : HeaderFooterBase { diff --git a/pdf-generator/DocumentStructures/FactSheet/HeaderFooterBase.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/HeaderFooterBase.cs similarity index 94% rename from pdf-generator/DocumentStructures/FactSheet/HeaderFooterBase.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/HeaderFooterBase.cs index 444fc13..a971c36 100644 --- a/pdf-generator/DocumentStructures/FactSheet/HeaderFooterBase.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/FactSheet/HeaderFooterBase.cs @@ -1,139 +1,139 @@ -using iText.IO.Image; -using iText.Kernel.Geom; -using iText.Kernel.Pdf; -using iText.Kernel.Pdf.Canvas; -using iText.Layout; -using iText.Layout.Element; -using iText.Layout.Properties; -using System.Collections.Generic; -using System.IO; -using static PDFGenerator.Utilities.Globals.Constants.FactSheet; +using iText.IO.Image; +using iText.Kernel.Geom; +using iText.Kernel.Pdf; +using iText.Kernel.Pdf.Canvas; +using iText.Layout; +using iText.Layout.Element; +using iText.Layout.Properties; +using System.Collections.Generic; +using System.IO; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.FactSheet; -namespace PDFGenerator.DocumentStructures.FactSheet -{ - public abstract class HeaderFooterBase : FactSheetBaseSection - { - private MemoryStream InputStream { get; } - - protected class HeaderFooterElement - { - public Paragraph Paragraph { get; set; } - public ImageData ImageData { get; set; } - public Rectangle ImageRectangle { get; set; } - public float PositionX { get; set; } - public float PositionY { get; set; } - public TextAlignment TextAlignment { get; set; } - public VerticalAlignment VerticalAlignment { get; set; } - } - protected List Items { get; set; } - protected HeaderFooterElement PageNumber { get; set; } - public MemoryStream ResultStream { get; private set; } - - protected abstract void InitializeElements(); - - public HeaderFooterBase(Document document, MemoryStream inputStream) : base(document) - { - InputStream = inputStream; - Items = new List(); - } - - /// - /// Renders the content for the document header and footer. - /// - public void Render() - { - InitializeElements(); - - ResultStream = new MemoryStream(); - PdfDocument pdfDocument = new PdfDocument(new PdfReader(new MemoryStream(InputStream.ToArray())), new PdfWriter(ResultStream)); - - using (Document document = new Document(pdfDocument)) - { - int firstPage = 1; - int totalPages = pdfDocument.GetNumberOfPages(); - Paragraph pageNumberParagraph = null; +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet +{ + public abstract class HeaderFooterBase : FactSheetBaseSection + { + private MemoryStream InputStream { get; } + + protected class HeaderFooterElement + { + public Paragraph Paragraph { get; set; } + public ImageData ImageData { get; set; } + public Rectangle ImageRectangle { get; set; } + public float PositionX { get; set; } + public float PositionY { get; set; } + public TextAlignment TextAlignment { get; set; } + public VerticalAlignment VerticalAlignment { get; set; } + } + protected List Items { get; set; } + protected HeaderFooterElement PageNumber { get; set; } + public MemoryStream ResultStream { get; private set; } + + protected abstract void InitializeElements(); + + public HeaderFooterBase(Document document, MemoryStream inputStream) : base(document) + { + InputStream = inputStream; + Items = new List(); + } + + /// + /// Renders the content for the document header and footer. + /// + public void Render() + { + InitializeElements(); + + ResultStream = new MemoryStream(); + PdfDocument pdfDocument = new PdfDocument(new PdfReader(new MemoryStream(InputStream.ToArray())), new PdfWriter(ResultStream)); + + using (Document document = new Document(pdfDocument)) + { + int firstPage = 1; + int totalPages = pdfDocument.GetNumberOfPages(); + Paragraph pageNumberParagraph = null; if (PageNumber != null) { pageNumberParagraph = PageNumber.Paragraph; - } - // header and footer for cover excluded - for (int page = firstPage + 1; page <= totalPages; page++) - { - // get page size from the given the page number - Rectangle ps = pdfDocument.GetPage(page).GetPageSizeWithRotation(); - float height = ps.GetHeight(); - float width = ps.GetWidth(); - - Items.ForEach(item => - { - if (item.ImageData != null) - { - RenderImage(pdfDocument, item, page); - } - if (item.Paragraph != null) - { - RenderParagraph(document, item, page); - } - }); + } + // header and footer for cover excluded + for (int page = firstPage + 1; page <= totalPages; page++) + { + // get page size from the given the page number + Rectangle ps = pdfDocument.GetPage(page).GetPageSizeWithRotation(); + float height = ps.GetHeight(); + float width = ps.GetWidth(); + + Items.ForEach(item => + { + if (item.ImageData != null) + { + RenderImage(pdfDocument, item, page); + } + if (item.Paragraph != null) + { + RenderParagraph(document, item, page); + } + }); if (pageNumberParagraph != null) { - PageNumber.Paragraph = new Paragraph(new Text($"Seite {page}").AddStyle(Styles.Footer)) + PageNumber.Paragraph = new Paragraph(new Text($"Seite {page}").AddStyle(Styles.Footer)) .SetMultipliedLeading(1.0f); RenderParagraph(document, PageNumber, page); } - } - } - } - - /// - /// Adds new paragraph to header/footer. - /// - /// The paragraph to be added. - /// The x-position. - /// /// The y-position. - /// The text alignment. - /// /// The vertical alignment. - protected void AddItem(Paragraph paragraph, float positionX, float positionY, TextAlignment textAlignment, VerticalAlignment verticalAlignment) - { - Items.Add(new HeaderFooterElement - { - Paragraph = paragraph, - PositionX = positionX, - PositionY = positionY, - TextAlignment = textAlignment, - VerticalAlignment = verticalAlignment - }); - } - - /// - /// Adds text to the document header or footer. - /// - /// the PDF document. - /// the content to be inserted. - /// the page to insert the text. - private void RenderParagraph(Document document, HeaderFooterElement item, int page) - { - document.ShowTextAligned( - item.Paragraph, - item.PositionX, - item.PositionY, - page, - item.TextAlignment, - item.VerticalAlignment, - 0 - ); - } - - /// - /// Adds image to the document header or footer. - /// - /// the PDF document. - /// the content to be inserted. - /// the page to insert the image. - private void RenderImage(PdfDocument pdfDocument, HeaderFooterElement item, int page) - { - PdfCanvas canvas = new PdfCanvas(pdfDocument.GetPage(page).GetLastContentStream(), pdfDocument.GetPage(page).GetResources(), pdfDocument); - canvas.AddImage(item.ImageData, item.ImageRectangle, true); - } - } -} + } + } + } + + /// + /// Adds new paragraph to header/footer. + /// + /// The paragraph to be added. + /// The x-position. + /// /// The y-position. + /// The text alignment. + /// /// The vertical alignment. + protected void AddItem(Paragraph paragraph, float positionX, float positionY, TextAlignment textAlignment, VerticalAlignment verticalAlignment) + { + Items.Add(new HeaderFooterElement + { + Paragraph = paragraph, + PositionX = positionX, + PositionY = positionY, + TextAlignment = textAlignment, + VerticalAlignment = verticalAlignment + }); + } + + /// + /// Adds text to the document header or footer. + /// + /// the PDF document. + /// the content to be inserted. + /// the page to insert the text. + private void RenderParagraph(Document document, HeaderFooterElement item, int page) + { + document.ShowTextAligned( + item.Paragraph, + item.PositionX, + item.PositionY, + page, + item.TextAlignment, + item.VerticalAlignment, + 0 + ); + } + + /// + /// Adds image to the document header or footer. + /// + /// the PDF document. + /// the content to be inserted. + /// the page to insert the image. + private void RenderImage(PdfDocument pdfDocument, HeaderFooterElement item, int page) + { + PdfCanvas canvas = new PdfCanvas(pdfDocument.GetPage(page).GetLastContentStream(), pdfDocument.GetPage(page).GetResources(), pdfDocument); + canvas.AddImage(item.ImageData, item.ImageRectangle, true); + } + } +} diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/Chapter.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Chapter.cs similarity index 94% rename from pdf-generator/DocumentStructures/SurveyBasePdf/Chapter.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Chapter.cs index 6fbf5c8..33a709e 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/Chapter.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Chapter.cs @@ -3,17 +3,17 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; using System.Collections.Generic; using System.Linq; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class Chapter : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/Cover.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Cover.cs similarity index 73% rename from pdf-generator/DocumentStructures/SurveyBasePdf/Cover.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Cover.cs index bdf0d6f..4661c5d 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/Cover.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Cover.cs @@ -1,14 +1,14 @@ using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class Cover : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/Footer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Footer.cs similarity index 78% rename from pdf-generator/DocumentStructures/SurveyBasePdf/Footer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Footer.cs index 0eeae67..9976a37 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/Footer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Footer.cs @@ -5,14 +5,14 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.SurveyPdf; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; using System.IO; -using static PDFGenerator.Utilities.Globals; -using Margins = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Margins = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class Footer { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/Header.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Header.cs similarity index 92% rename from pdf-generator/DocumentStructures/SurveyBasePdf/Header.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Header.cs index d9609ba..0f03de8 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/Header.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Header.cs @@ -4,12 +4,12 @@ using iText.Kernel.Pdf; using iText.Kernel.Pdf.Canvas; using iText.Layout; using iText.Layout.Element; -using PDFGenerator.Models.SurveyPdf; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; using System.IO; using System.Linq; -using static PDFGenerator.Utilities.Conversion; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Conversion; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class Header { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/Imprint.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Imprint.cs similarity index 79% rename from pdf-generator/DocumentStructures/SurveyBasePdf/Imprint.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Imprint.cs index b2ac7e1..1008e7a 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/Imprint.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/Imprint.cs @@ -2,14 +2,14 @@ using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; -using static PDFGenerator.Utilities.Globals; -using Margins = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Margins = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class Imprint : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs similarity index 87% rename from pdf-generator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs index d7a033a..8e6bec3 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/PreNoteAndSummary.cs @@ -3,11 +3,11 @@ using iText.Layout; using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class PreNoteAndSummary : SurveyPdfBaseSection { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs similarity index 87% rename from pdf-generator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs index 40a17db..963de51 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/SurveyPdfBaseSection.cs @@ -1,7 +1,7 @@ using iText.Layout; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public abstract class SurveyPdfBaseSection : BaseSection { diff --git a/pdf-generator/DocumentStructures/SurveyBasePdf/TableOfContents.cs b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/TableOfContents.cs similarity index 90% rename from pdf-generator/DocumentStructures/SurveyBasePdf/TableOfContents.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/TableOfContents.cs index 97b8743..5c34ce2 100644 --- a/pdf-generator/DocumentStructures/SurveyBasePdf/TableOfContents.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/DocumentStructures/SurveyBasePdf/TableOfContents.cs @@ -2,11 +2,11 @@ using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Styles = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Styles; -namespace PDFGenerator.DocumentStructures.SurveyPdfDocStructures +namespace PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures { public class TableOfContents : BaseTableOfContents { diff --git a/pdf-generator/NuGet.config b/PDSLLabs.Public.QMSL.PDFGenerator/NuGet.config similarity index 100% rename from pdf-generator/NuGet.config rename to PDSLLabs.Public.QMSL.PDFGenerator/NuGet.config diff --git a/pdf-generator/pdf-generator.csproj b/PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj similarity index 78% rename from pdf-generator/pdf-generator.csproj rename to PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj index e81f3f4..9ec50e8 100644 --- a/pdf-generator/pdf-generator.csproj +++ b/PDSLLabs.Public.QMSL.PDFGenerator/PDSLLabs.Public.QMSL.PDFGenerator.csproj @@ -2,7 +2,7 @@ netcoreapp3.1 - PDFGenerator + PDSLLabs.Public.QMSL.PDFGenerator true 1591 @@ -17,8 +17,8 @@ - - ..\lib\PDFGenerator.Models.dll + + ..\lib\PDSLLabs.QMSL.PDFGenerator.Models.dll diff --git a/pdf-generator/Program.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Program.cs similarity index 97% rename from pdf-generator/Program.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Program.cs index dc1a6ad..9301e03 100644 --- a/pdf-generator/Program.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Program.cs @@ -5,7 +5,7 @@ using Microsoft.Extensions.Logging; using NLog.Web; using System; -namespace PDFGenerator +namespace PDSLLabs.Public.QMSL.PDFGenerator { public class Program { diff --git a/pdf-generator/Properties/launchSettings.example.json b/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json similarity index 100% rename from pdf-generator/Properties/launchSettings.example.json rename to PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json diff --git a/pdf-generator/Renderers/AbsbHomepagePdfRenderer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/AbsbHomepagePdfRenderer.cs similarity index 85% rename from pdf-generator/Renderers/AbsbHomepagePdfRenderer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Renderers/AbsbHomepagePdfRenderer.cs index 9fc022e..1095fd4 100644 --- a/pdf-generator/Renderers/AbsbHomepagePdfRenderer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/AbsbHomepagePdfRenderer.cs @@ -1,8 +1,8 @@ using iText.Layout; -using PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures; -using PDFGenerator.Models.AbsbHomepagePdf; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.AbsbHomepagePdfDocStructures; +using PDSLLabs.QMSL.PDFGenerator.Models.AbsbHomepagePdf; -namespace PDFGenerator.Renderers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Renderers { public class AbsbHomepagePdfRenderer : SurveyPdfRenderer { diff --git a/pdf-generator/Renderers/EvaluationReportRenderer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/EvaluationReportRenderer.cs similarity index 95% rename from pdf-generator/Renderers/EvaluationReportRenderer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Renderers/EvaluationReportRenderer.cs index 312f2c4..fe1473b 100644 --- a/pdf-generator/Renderers/EvaluationReportRenderer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/EvaluationReportRenderer.cs @@ -4,15 +4,15 @@ using iText.Kernel.Pdf.Canvas; using iText.Layout; using iText.Layout.Element; using iText.Layout.Properties; -using PDFGenerator.DocumentStructures.EvaluationReport; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.EvaluationReport; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; using System.Collections.Generic; using System.IO; -using EvaluationReportModel = PDFGenerator.Models.EvaluationReport.EvaluationReport; -using Margins = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Margins; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; +using EvaluationReportModel = PDSLLabs.QMSL.PDFGenerator.Models.EvaluationReport.EvaluationReport; +using Margins = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Margins; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; -namespace PDFGenerator.Renderers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Renderers { public class EvaluationReportRenderer : IRenderer { diff --git a/pdf-generator/Renderers/FactSheetRenderer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/FactSheetRenderer.cs similarity index 85% rename from pdf-generator/Renderers/FactSheetRenderer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Renderers/FactSheetRenderer.cs index b5cfa19..105bc87 100644 --- a/pdf-generator/Renderers/FactSheetRenderer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/FactSheetRenderer.cs @@ -1,13 +1,14 @@ using iText.Kernel.Geom; using iText.Kernel.Pdf; using iText.Layout; -using PDFGenerator.DocumentStructures.FactSheet; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.FactSheet; +using PDSLLabs.QMSL.PDFGenerator.Models.FactSheet; using System.IO; using System.Linq; -using FactSheetModel = PDFGenerator.Models.FactSheet.FactSheet; -using Margins = PDFGenerator.Utilities.Globals.Constants.FactSheet.Margins; +using FactSheetModel = PDSLLabs.QMSL.PDFGenerator.Models.FactSheet.FactSheet; +using Margins = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.FactSheet.Margins; -namespace PDFGenerator.Renderers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Renderers { public class FactSheetRenderer : IRenderer { @@ -70,7 +71,7 @@ namespace PDFGenerator.Renderers private void RenderChapters() { Chapter chapter = new Chapter(FactSheet.NoDataAvailable, Document); - foreach (Models.FactSheet.PDFChapter pdfChapter in FactSheet.Chapters.Where(item => item != null)) + foreach (PDFChapter pdfChapter in FactSheet.Chapters.Where(item => item != null)) { chapter.UpdateChapter(pdfChapter); chapter.Render(); diff --git a/pdf-generator/Renderers/IRenderer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/IRenderer.cs similarity index 83% rename from pdf-generator/Renderers/IRenderer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Renderers/IRenderer.cs index 421085d..9866d38 100644 --- a/pdf-generator/Renderers/IRenderer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/IRenderer.cs @@ -1,4 +1,4 @@ -namespace PDFGenerator.Renderers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Renderers { internal interface IRenderer { diff --git a/pdf-generator/Renderers/SurveyBasePdfRenderer.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/SurveyBasePdfRenderer.cs similarity index 90% rename from pdf-generator/Renderers/SurveyBasePdfRenderer.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Renderers/SurveyBasePdfRenderer.cs index 6284ce7..5c5c7ce 100644 --- a/pdf-generator/Renderers/SurveyBasePdfRenderer.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Renderers/SurveyBasePdfRenderer.cs @@ -1,18 +1,18 @@ using iText.Kernel.Pdf; using iText.Layout; -using PDFGenerator.DocumentStructures.SurveyPdfDocStructures; -using PDFGenerator.Models.SurveyPdf; -using PDFGenerator.Utilities; +using PDSLLabs.Public.QMSL.PDFGenerator.DocumentStructures.SurveyPdfDocStructures; +using PDSLLabs.Public.QMSL.PDFGenerator.Utilities; +using PDSLLabs.QMSL.PDFGenerator.Models.SurveyPdf; using System; using System.Collections.Generic; using System.IO; using System.Linq; -using static PDFGenerator.Utilities.Globals; -using Constants = PDFGenerator.Utilities.Globals.Constants; -using Margins = PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; -using Orientation = PDFGenerator.Utilities.Globals.Orientation; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using Constants = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants; +using Margins = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf.Margins; +using Orientation = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Orientation; -namespace PDFGenerator.Renderers +namespace PDSLLabs.Public.QMSL.PDFGenerator.Renderers { public class SurveyPdfRenderer : IRenderer { diff --git a/pdf-generator/Startup.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Startup.cs similarity index 98% rename from pdf-generator/Startup.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Startup.cs index ab72d92..2847c3f 100644 --- a/pdf-generator/Startup.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Startup.cs @@ -8,7 +8,7 @@ using Newtonsoft.Json.Serialization; using System; using System.IO; -namespace PDFGenerator +namespace PDSLLabs.Public.QMSL.PDFGenerator { public class Startup { diff --git a/pdf-generator/Utilities/Bookmarks.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Bookmarks.cs similarity index 95% rename from pdf-generator/Utilities/Bookmarks.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Bookmarks.cs index f8a08dd..79a0ff7 100644 --- a/pdf-generator/Utilities/Bookmarks.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Bookmarks.cs @@ -2,9 +2,9 @@ using iText.Kernel.Pdf; using iText.Kernel.Pdf.Navigation; using System; using System.Collections.Generic; -using static PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; -namespace PDFGenerator.Utilities +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities { public class Bookmarks { diff --git a/pdf-generator/Utilities/Conversion.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Conversion.cs similarity index 92% rename from pdf-generator/Utilities/Conversion.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Conversion.cs index 472f211..5185590 100644 --- a/pdf-generator/Utilities/Conversion.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Conversion.cs @@ -1,4 +1,4 @@ -namespace PDFGenerator.Utilities +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities { public class Conversion { diff --git a/pdf-generator/Utilities/CustomSplitCharacters.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/CustomSplitCharacters.cs similarity index 92% rename from pdf-generator/Utilities/CustomSplitCharacters.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/CustomSplitCharacters.cs index 5a26870..245ee78 100644 --- a/pdf-generator/Utilities/CustomSplitCharacters.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/CustomSplitCharacters.cs @@ -1,7 +1,7 @@ using iText.IO.Font.Otf; using iText.Layout.Splitting; -namespace PDFGenerator.Utilities +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities { public class CustomSplitCharacters : DefaultSplitCharacters { diff --git a/pdf-generator/Utilities/Globals.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Globals.cs similarity index 98% rename from pdf-generator/Utilities/Globals.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Globals.cs index 5662e90..6719b5b 100644 --- a/pdf-generator/Utilities/Globals.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Globals.cs @@ -1,111 +1,111 @@ -using iText.IO.Font; -using iText.IO.Font.Constants; -using iText.Kernel.Colors; -using iText.Kernel.Font; +using iText.IO.Font; +using iText.IO.Font.Constants; +using iText.Kernel.Colors; +using iText.Kernel.Font; using iText.Kernel.Geom; -using iText.Layout; +using iText.Layout; using System.Collections.Generic; -namespace PDFGenerator.Utilities -{ - public class Globals - { - public class Constants - { - // BaseFont in iText7 is replaced with PdfFont - // default font in iText7 is Helvetica with size 12 pt and color black (typically known as Normal) - - // because Arial font (located in windows default font directory) is possibly unaccessible and not supported by iText7 - // it is replaced with Helvetica as it more or less looks like Windows Arial font - // (refer to https://www.mikesdotnetting.com/article/81/itextsharp-working-with-fonts) - - private static PdfFont NormalFont => PdfFontFactory.CreateFont(StandardFonts.HELVETICA, PdfEncodings.WINANSI, true); - private static PdfFont BoldFont => PdfFontFactory.CreateFont(StandardFonts.HELVETICA_BOLD, PdfEncodings.WINANSI, true); - private static DeviceRgb DefaultFontColor => new DeviceRgb(0, 84, 159); - private static DeviceRgb ImageCaptionColor => new DeviceRgb(79, 129, 189); - public static DeviceRgb LightGreyFontColor => new DeviceRgb(156, 158, 159); - private static DeviceRgb ExtraLightGreyFontColor => new DeviceRgb(236, 237, 237); - private static DeviceRgb GreyFontColor => new DeviceRgb(128, 128, 128); - public static Dictionary PageOrientation = new Dictionary { { Orientation.Portrait, PageSize.A4 }, { Orientation.Landscape, PageSize.A4.Rotate() } }; - - public static class EvaluationReport - { - public static class Margins - { - public static float TopMargin { get; } = 56.69f; - public static float RightMargin { get; } = 56.69f; - public static float BottomMargin { get; } = 56.69f; - public static float LeftMargin { get; } = 56.69f; - } - - public static class Styles - { +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities +{ + public class Globals + { + public class Constants + { + // BaseFont in iText7 is replaced with PdfFont + // default font in iText7 is Helvetica with size 12 pt and color black (typically known as Normal) + + // because Arial font (located in windows default font directory) is possibly unaccessible and not supported by iText7 + // it is replaced with Helvetica as it more or less looks like Windows Arial font + // (refer to https://www.mikesdotnetting.com/article/81/itextsharp-working-with-fonts) + + private static PdfFont NormalFont => PdfFontFactory.CreateFont(StandardFonts.HELVETICA, PdfEncodings.WINANSI, true); + private static PdfFont BoldFont => PdfFontFactory.CreateFont(StandardFonts.HELVETICA_BOLD, PdfEncodings.WINANSI, true); + private static DeviceRgb DefaultFontColor => new DeviceRgb(0, 84, 159); + private static DeviceRgb ImageCaptionColor => new DeviceRgb(79, 129, 189); + public static DeviceRgb LightGreyFontColor => new DeviceRgb(156, 158, 159); + private static DeviceRgb ExtraLightGreyFontColor => new DeviceRgb(236, 237, 237); + private static DeviceRgb GreyFontColor => new DeviceRgb(128, 128, 128); + public static Dictionary PageOrientation = new Dictionary { { Orientation.Portrait, PageSize.A4 }, { Orientation.Landscape, PageSize.A4.Rotate() } }; + + public static class EvaluationReport + { + public static class Margins + { + public static float TopMargin { get; } = 56.69f; + public static float RightMargin { get; } = 56.69f; + public static float BottomMargin { get; } = 56.69f; + public static float LeftMargin { get; } = 56.69f; + } + + public static class Styles + { public static Style ChapterTitle => new Style().SetFont(BoldFont).SetFontSize(16); - public static Style ChapterSubtitle => new Style().SetFont(BoldFont).SetFontSize(12); - public static Style ChapterSubsubtitle => new Style().SetFont(BoldFont).SetFontSize(11); - public static Style SubjectName => new Style().SetFont(BoldFont).SetFontSize(10); - public static Style CoverTitle => new Style().SetFont(BoldFont).SetFontSize(25); - public static Style CoverSubtitle => new Style().SetFont(BoldFont).SetFontSize(20.5f); - public static Style CoverDate => new Style().SetFont(NormalFont).SetFontSize(20.5f); - public static Style CoverSubsubtitleSubject => new Style().SetFont(NormalFont).SetFontSize(16f); + public static Style ChapterSubtitle => new Style().SetFont(BoldFont).SetFontSize(12); + public static Style ChapterSubsubtitle => new Style().SetFont(BoldFont).SetFontSize(11); + public static Style SubjectName => new Style().SetFont(BoldFont).SetFontSize(10); + public static Style CoverTitle => new Style().SetFont(BoldFont).SetFontSize(25); + public static Style CoverSubtitle => new Style().SetFont(BoldFont).SetFontSize(20.5f); + public static Style CoverDate => new Style().SetFont(NormalFont).SetFontSize(20.5f); + public static Style CoverSubsubtitleSubject => new Style().SetFont(NormalFont).SetFontSize(16f); public static Style Paragraph => new Style().SetFont(NormalFont).SetFontSize(11); - public static Style Link => Small.SetFontColor(DefaultFontColor); - public static Style Small => new Style().SetFont(NormalFont).SetFontSize(10); - public static Style SmallBold => new Style().SetFont(BoldFont).SetFontSize(9); - public static Style ImageCaption => new Style().SetFont(NormalFont).SetFontSize(9f).SetFontColor(ImageCaptionColor); - } - } - - public static class FactSheet + public static Style Link => Small.SetFontColor(DefaultFontColor); + public static Style Small => new Style().SetFont(NormalFont).SetFontSize(10); + public static Style SmallBold => new Style().SetFont(BoldFont).SetFontSize(9); + public static Style ImageCaption => new Style().SetFont(NormalFont).SetFontSize(9f).SetFontColor(ImageCaptionColor); + } + } + + public static class FactSheet { - public static class Margins - { - public static float TopMargin { get; } = 72f; - public static float RightMargin { get; } = 72f; - public static float BottomMargin { get; } = 72f; - public static float LeftMargin { get; } = 72f; - } - - public static class Styles - { - public static Style Title => new Style().SetFont(BoldFont).SetFontSize(28).SetFontColor(DefaultFontColor); - public static Style Subtitle => new Style().SetFont(BoldFont).SetFontSize(24).SetFontColor(LightGreyFontColor); - public static Style ChapterTitle => new Style().SetFont(BoldFont).SetFontSize(12).SetFontColor(DefaultFontColor); - public static Style SectionTitle => new Style().SetFont(BoldFont).SetFontSize(11).SetFontColor(DefaultFontColor); - public static Style SectionSubtitle => new Style().SetFont(NormalFont).SetFontSize(11).SetFontColor(DefaultFontColor); - public static Style SectionSubsubtitle => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); - public static Style ReportHeader => new Style().SetFont(BoldFont).SetFontSize(9).SetFontColor(DefaultFontColor); - public static Style ReportSubHeader => new Style().SetFont(NormalFont).SetFontSize(9).SetFontColor(DefaultFontColor); - public static Style Paragraph => new Style().SetFont(NormalFont).SetFontSize(11); - public static Style Footer => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(LightGreyFontColor); - public static Style Header => new Style().SetFont(NormalFont).SetFontSize(12).SetFontColor(LightGreyFontColor); - public static Style Header_Bold => Header.SetFont(BoldFont); - } - } - - public static class SurveyPdf + public static class Margins + { + public static float TopMargin { get; } = 72f; + public static float RightMargin { get; } = 72f; + public static float BottomMargin { get; } = 72f; + public static float LeftMargin { get; } = 72f; + } + + public static class Styles + { + public static Style Title => new Style().SetFont(BoldFont).SetFontSize(28).SetFontColor(DefaultFontColor); + public static Style Subtitle => new Style().SetFont(BoldFont).SetFontSize(24).SetFontColor(LightGreyFontColor); + public static Style ChapterTitle => new Style().SetFont(BoldFont).SetFontSize(12).SetFontColor(DefaultFontColor); + public static Style SectionTitle => new Style().SetFont(BoldFont).SetFontSize(11).SetFontColor(DefaultFontColor); + public static Style SectionSubtitle => new Style().SetFont(NormalFont).SetFontSize(11).SetFontColor(DefaultFontColor); + public static Style SectionSubsubtitle => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); + public static Style ReportHeader => new Style().SetFont(BoldFont).SetFontSize(9).SetFontColor(DefaultFontColor); + public static Style ReportSubHeader => new Style().SetFont(NormalFont).SetFontSize(9).SetFontColor(DefaultFontColor); + public static Style Paragraph => new Style().SetFont(NormalFont).SetFontSize(11); + public static Style Footer => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(LightGreyFontColor); + public static Style Header => new Style().SetFont(NormalFont).SetFontSize(12).SetFontColor(LightGreyFontColor); + public static Style Header_Bold => Header.SetFont(BoldFont); + } + } + + public static class SurveyPdf { - public static class Margins - { - public static float TopMargin { get; } = 56.69f; - public static float RightMargin { get; } = 56.69f; + public static class Margins + { + public static float TopMargin { get; } = 56.69f; + public static float RightMargin { get; } = 56.69f; public static float BottomMarginPortrait { get; } = 40f; - public static float BottomMarginLandscape { get; } = 30f; - public static float LeftMargin { get; } = 56.69f; - - public static float LeftMarginImprintLandscape { get; } = 350f; - public static float LeftMarginImprintPortrait { get; } = 220f; - public static float TopMarginImprintLandscape { get; } = 240f; - public static float TopMarginImprintPortrait { get; } = 480f; - - public static float TopMarginChapterTitleLandscape { get; } = 30f; + public static float BottomMarginLandscape { get; } = 30f; + public static float LeftMargin { get; } = 56.69f; + + public static float LeftMarginImprintLandscape { get; } = 350f; + public static float LeftMarginImprintPortrait { get; } = 220f; + public static float TopMarginImprintLandscape { get; } = 240f; + public static float TopMarginImprintPortrait { get; } = 480f; + + public static float TopMarginChapterTitleLandscape { get; } = 30f; public static float TopMarginChapterTitlePortrait { get; } = 300f; - public static float TopMarginCoverLandscape { get; } = 70f; + public static float TopMarginCoverLandscape { get; } = 70f; public static float TopMarginCoverPortrait { get; } = 100f; - public static float TopMarginCover2Landscape { get; } = 50f; + public static float TopMarginCover2Landscape { get; } = 50f; public static float TopMarginCover2Portrait { get; } = 90f; public static float FooterYPositionPortrait { get; } = 40f; @@ -149,37 +149,37 @@ namespace PDFGenerator.Utilities } }; - } - - public static class Styles - { - public static Style CoverTitle => new Style().SetFont(BoldFont).SetFontSize(36).SetFontColor(DefaultFontColor); - public static Style CoverSubtitle => new Style().SetFont(BoldFont).SetFontSize(30).SetFontColor(DefaultFontColor); - public static Style CoverFakSubtitle => new Style().SetFont(NormalFont).SetFontSize(32).SetFontColor(DefaultFontColor); - public static Style CoverSubsubtitle => new Style().SetFont(BoldFont).SetFontSize(26).SetFontColor(DefaultFontColor); - public static Style ChapterCoverNumber => new Style().SetFont(NormalFont).SetFontSize(300).SetFontColor(ExtraLightGreyFontColor); - public static Style ChapterCoverTitle => new Style().SetFont(NormalFont).SetFontSize(18).SetFontColor(LightGreyFontColor); - public static Style Title => new Style().SetFont(BoldFont).SetFontSize(14).SetFontColor(DefaultFontColor); - public static Style TOCContent => new Style().SetFont(NormalFont).SetFontSize(12f).SetFontColor(DefaultFontColor); + } + + public static class Styles + { + public static Style CoverTitle => new Style().SetFont(BoldFont).SetFontSize(36).SetFontColor(DefaultFontColor); + public static Style CoverSubtitle => new Style().SetFont(BoldFont).SetFontSize(30).SetFontColor(DefaultFontColor); + public static Style CoverFakSubtitle => new Style().SetFont(NormalFont).SetFontSize(32).SetFontColor(DefaultFontColor); + public static Style CoverSubsubtitle => new Style().SetFont(BoldFont).SetFontSize(26).SetFontColor(DefaultFontColor); + public static Style ChapterCoverNumber => new Style().SetFont(NormalFont).SetFontSize(300).SetFontColor(ExtraLightGreyFontColor); + public static Style ChapterCoverTitle => new Style().SetFont(NormalFont).SetFontSize(18).SetFontColor(LightGreyFontColor); + public static Style Title => new Style().SetFont(BoldFont).SetFontSize(14).SetFontColor(DefaultFontColor); + public static Style TOCContent => new Style().SetFont(NormalFont).SetFontSize(12f).SetFontColor(DefaultFontColor); public static Style Paragraph => new Style().SetFont(NormalFont).SetFontSize(11).SetFontColor(DefaultFontColor); - public static Style ParagraphBold => new Style().SetFont(BoldFont).SetFontSize(11).SetFontColor(DefaultFontColor); - public static Style Normal => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); - public static Style Small => new Style().SetFont(NormalFont).SetFontSize(9).SetFontColor(DefaultFontColor); - public static Style Footer => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(GreyFontColor); - public static Style Explanations => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); - public static Style ExplanationsHeader => Explanations.SetFont(BoldFont); + public static Style ParagraphBold => new Style().SetFont(BoldFont).SetFontSize(11).SetFontColor(DefaultFontColor); + public static Style Normal => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); + public static Style Small => new Style().SetFont(NormalFont).SetFontSize(9).SetFontColor(DefaultFontColor); + public static Style Footer => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(GreyFontColor); + public static Style Explanations => new Style().SetFont(NormalFont).SetFontSize(10).SetFontColor(DefaultFontColor); + public static Style ExplanationsHeader => Explanations.SetFont(BoldFont); } - } - } - - public enum Orientation - { - Portrait, - Landscape - } - + } + } + + public enum Orientation + { + Portrait, + Landscape + } + public enum OrientationMargins { LeftMarginImprint, @@ -192,13 +192,13 @@ namespace PDFGenerator.Utilities SectionHeadingFirstColumnPercentage, PaddingBottomReportImage, MarginTableOfContentHeadline - } - - public enum OutlineLevel - { - Level0, - Level1, - Level2 - } - } -} + } + + public enum OutlineLevel + { + Level0, + Level1, + Level2 + } + } +} diff --git a/pdf-generator/Utilities/Panel.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Panel.cs similarity index 94% rename from pdf-generator/Utilities/Panel.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Panel.cs index 1e23de6..7de2443 100644 --- a/pdf-generator/Utilities/Panel.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/Panel.cs @@ -3,7 +3,7 @@ using iText.Layout.Borders; using iText.Layout.Element; using iText.Layout.Properties; -namespace PDFGenerator.Utilities +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities { public class Panel { diff --git a/pdf-generator/Utilities/ParagraphFactory.cs b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/ParagraphFactory.cs similarity index 92% rename from pdf-generator/Utilities/ParagraphFactory.cs rename to PDSLLabs.Public.QMSL.PDFGenerator/Utilities/ParagraphFactory.cs index 8c78e22..11a3063 100644 --- a/pdf-generator/Utilities/ParagraphFactory.cs +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Utilities/ParagraphFactory.cs @@ -1,120 +1,120 @@ -using iText.Layout; -using iText.Layout.Borders; -using iText.Layout.Element; -using iText.Layout.Properties; -using static PDFGenerator.Utilities.Globals; -using static PDFGenerator.Utilities.Globals.Constants.SurveyPdf; -using Styles = PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; - -namespace PDFGenerator.Utilities -{ - public class ParagraphFactory - { - /// - /// Creates a standard paragraph. - /// - /// The paragraph content. - /// The created paragraph. - public static Paragraph GetStandardParagraph(string text) - { - return GetCustomParagraph(text, Styles.Paragraph, 0, 9, 1.05f); - } - - /// - /// Creates a paragraph for the preface section. - /// - /// The paragraph content. - /// The created paragraph. - public static Paragraph GetPrefaceParagraph(string text) - { - return GetCustomParagraph(text, Styles.Paragraph, 0.5f, 10, 1.35f); - } - - /// - /// Creates a paragraph for the table header. - /// - /// The paragraph content. - /// The created paragraph. - public static Paragraph GetTableHeaderParagraph(string text) - { - return GetTableHeaderParagraph(text, null); - } - - /// - /// Creates a paragraph for the table header. - /// - /// The paragraph content. - /// The paragraph style. - /// The created paragraph. - public static Paragraph GetTableHeaderParagraph(string text, Style style) - { - float multiplyLeading = 1.15f; - if (style == null) - { - style = Styles.ChapterSubsubtitle; - } - - return GetCustomParagraph(text, style, 0, 3.5f, multiplyLeading); - } - - /// - /// Creates a paragraph with custom properties. - /// - /// The paragraph content. - /// The paragraph style. - /// The paragraph top margin width. - /// The paragraph bottom margin width. - /// The paragraph leading value. - /// The italic stle for a font if true. - /// The created paragraph. - public static Paragraph GetCustomParagraph(string text, Style font, float spacingbefore, float spacingafter, float multipliedLeading, bool isItalic = false) - { - Text styledText = new Text(text); - styledText.AddStyle(font); - - Paragraph paragraph = new Paragraph(styledText); - // remark: 1.5 is itext Standard - paragraph.SetMultipliedLeading(multipliedLeading); - paragraph.SetMarginTop(spacingbefore); - paragraph.SetMarginBottom(spacingafter); - paragraph.SetTextAlignment(TextAlignment.JUSTIFIED); - - return isItalic ? paragraph.SetItalic() : paragraph; +using iText.Layout; +using iText.Layout.Borders; +using iText.Layout.Element; +using iText.Layout.Properties; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals; +using static PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.SurveyPdf; +using Styles = PDSLLabs.Public.QMSL.PDFGenerator.Utilities.Globals.Constants.EvaluationReport.Styles; + +namespace PDSLLabs.Public.QMSL.PDFGenerator.Utilities +{ + public class ParagraphFactory + { + /// + /// Creates a standard paragraph. + /// + /// The paragraph content. + /// The created paragraph. + public static Paragraph GetStandardParagraph(string text) + { + return GetCustomParagraph(text, Styles.Paragraph, 0, 9, 1.05f); + } + + /// + /// Creates a paragraph for the preface section. + /// + /// The paragraph content. + /// The created paragraph. + public static Paragraph GetPrefaceParagraph(string text) + { + return GetCustomParagraph(text, Styles.Paragraph, 0.5f, 10, 1.35f); + } + + /// + /// Creates a paragraph for the table header. + /// + /// The paragraph content. + /// The created paragraph. + public static Paragraph GetTableHeaderParagraph(string text) + { + return GetTableHeaderParagraph(text, null); + } + + /// + /// Creates a paragraph for the table header. + /// + /// The paragraph content. + /// The paragraph style. + /// The created paragraph. + public static Paragraph GetTableHeaderParagraph(string text, Style style) + { + float multiplyLeading = 1.15f; + if (style == null) + { + style = Styles.ChapterSubsubtitle; + } + + return GetCustomParagraph(text, style, 0, 3.5f, multiplyLeading); + } + + /// + /// Creates a paragraph with custom properties. + /// + /// The paragraph content. + /// The paragraph style. + /// The paragraph top margin width. + /// The paragraph bottom margin width. + /// The paragraph leading value. + /// The italic stle for a font if true. + /// The created paragraph. + public static Paragraph GetCustomParagraph(string text, Style font, float spacingbefore, float spacingafter, float multipliedLeading, bool isItalic = false) + { + Text styledText = new Text(text); + styledText.AddStyle(font); + + Paragraph paragraph = new Paragraph(styledText); + // remark: 1.5 is itext Standard + paragraph.SetMultipliedLeading(multipliedLeading); + paragraph.SetMarginTop(spacingbefore); + paragraph.SetMarginBottom(spacingafter); + paragraph.SetTextAlignment(TextAlignment.JUSTIFIED); + + return isItalic ? paragraph.SetItalic() : paragraph; } - /// - /// Creates a paragraph with content split in two columns. - /// - /// The text to be rendered in the left column. - /// The text to be rendered in the right column. - /// The paragraph style. + /// + /// Creates a paragraph with content split in two columns. + /// + /// The text to be rendered in the left column. + /// The text to be rendered in the right column. + /// The paragraph style. /// Optional paragraph margin top. - /// Orientation of document - /// Paragraph with the given content. - public static Paragraph CreateTwoColumnParagraph(string textLeft, string textRight, Style font, Orientation pageOrientation, float marginTop = 15f) - { - float firstColumnWidth = Margins.OrientationMarginValues[pageOrientation][OrientationMargins.SectionHeadingFirstColumnPercentage]; - Paragraph paragraph = new Paragraph().SetTextAlignment(TextAlignment.LEFT).SetMultipliedLeading(1f).SetMarginTop(marginTop); - Table table = new Table(new UnitValue[] { new UnitValue(UnitValue.PERCENT, firstColumnWidth), new UnitValue(UnitValue.PERCENT, 100f - firstColumnWidth) }).UseAllAvailableWidth(); - - table.SetBorder(Border.NO_BORDER); - Cell cLeft = new Cell(); - Cell cRight = new Cell(); - cLeft.SetBorder(Border.NO_BORDER); - cRight.SetBorder(Border.NO_BORDER); + /// Orientation of document + /// Paragraph with the given content. + public static Paragraph CreateTwoColumnParagraph(string textLeft, string textRight, Style font, Orientation pageOrientation, float marginTop = 15f) + { + float firstColumnWidth = Margins.OrientationMarginValues[pageOrientation][OrientationMargins.SectionHeadingFirstColumnPercentage]; + Paragraph paragraph = new Paragraph().SetTextAlignment(TextAlignment.LEFT).SetMultipliedLeading(1f).SetMarginTop(marginTop); + Table table = new Table(new UnitValue[] { new UnitValue(UnitValue.PERCENT, firstColumnWidth), new UnitValue(UnitValue.PERCENT, 100f - firstColumnWidth) }).UseAllAvailableWidth(); + + table.SetBorder(Border.NO_BORDER); + Cell cLeft = new Cell(); + Cell cRight = new Cell(); + cLeft.SetBorder(Border.NO_BORDER); + cRight.SetBorder(Border.NO_BORDER); if (!string.IsNullOrEmpty(textLeft)) { - cLeft.Add(new Paragraph(new Text(textLeft)).AddStyle(font).SetMultipliedLeading(1f)); - } + cLeft.Add(new Paragraph(new Text(textLeft)).AddStyle(font).SetMultipliedLeading(1f)); + } if (!string.IsNullOrEmpty(textRight)) { cRight.Add(new Paragraph(new Text(textRight)).AddStyle(font).SetMultipliedLeading(1f)); } - table.AddCell(cLeft); - table.AddCell(cRight); - paragraph.Add(table); - - return paragraph; - } - } -} + table.AddCell(cLeft); + table.AddCell(cRight); + paragraph.Add(table); + + return paragraph; + } + } +} diff --git a/pdf-generator/appsettings.Development.json b/PDSLLabs.Public.QMSL.PDFGenerator/appsettings.Development.json similarity index 100% rename from pdf-generator/appsettings.Development.json rename to PDSLLabs.Public.QMSL.PDFGenerator/appsettings.Development.json diff --git a/pdf-generator/appsettings.json b/PDSLLabs.Public.QMSL.PDFGenerator/appsettings.json similarity index 100% rename from pdf-generator/appsettings.json rename to PDSLLabs.Public.QMSL.PDFGenerator/appsettings.json diff --git a/pdf-generator/nlog.config b/PDSLLabs.Public.QMSL.PDFGenerator/nlog.config similarity index 84% rename from pdf-generator/nlog.config rename to PDSLLabs.Public.QMSL.PDFGenerator/nlog.config index 06bc674..18243b0 100644 --- a/pdf-generator/nlog.config +++ b/PDSLLabs.Public.QMSL.PDFGenerator/nlog.config @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" internalLogLevel="Info" - internalLogFile="c:\tmp\logs\pdf-generator\pdf-generator-internal-nlog.txt"> + internalLogFile="c:\tmp\logs\pdf-generator-qmsl\pdf-generator-qmsl-internal-nlog.txt"> @@ -13,14 +13,14 @@ - - - diff --git a/lib/PDFGenerator.Models.dll b/lib/PDFGenerator.Models.dll deleted file mode 100644 index a533680ced656bbb5f32b19ebd296932329dac84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28160 zcmeHwdw5jkwf@>W_bbU{a)sywqCkO2Kt)s_fdmM0i6kltl^K#Dj7&0dGC@Gm33$O< zz1CVU?L@7$t+v`)YL8ZvR*pU1THAU(T9ek+gRS+}R;|Z+-nG89XC}$ebIw1%=RCis zgY(Y&zH9C8w)g&K@0l;-nzOE@G$KmJ^Rv&09>Oa>8U+6_L=i4L@?Q$+!JKDm98~p&$gS0)TbqeiTWK`s zthNuF+D2%qC(oKov=vUKaSJcOs|U{*od5N2BI8s6VQPEM-%d}>wad7TaZenAkH4h;r$3NXT;%lq4b;BU6@=L}F4(1{2^@sk`w2n-x& zW?LaJiXB4;43}dlNt9mVM1&yK?HEE}lsblz#I|KlLI);)&{T?SG1gSNSAq2)$#}EQznqvroQR^5& zU>xNbLSP*27)lcLPj@0hkUGOLgus~T7)o^8srHQ1d2YgSKAvEs1N)jzt z=tP7d^+d-I0^=mdP?Fg8WGA8|5n1F!grJbcjv)lb630-I*tWrm2tjJ2V<<_aE_EV8 zkh;tS`w<1gUErLkNtujv)jFCVg|d z3W3q;7)lbQpXx+}Aa%WCC`qKYIT0a9#e0USMhJ}4979QBTO3d(RR~hga114h)D2EV z2vW~<3?+%wvz&+!q;7N!C5hBcPDBV&KkpbqV4Uq3N)p>{b|ONM>U9huFno?71jZJ} zP?9LD!-)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 z0r>dUoe3p*C1)=BZT=mLwZa$!^w*7Tm!Z6FS^L|Am9}e9M>pERk5;U4UXGQ@ew6E% zRz#4CkJqp=IfUN~@}oukW8tk*j#F*-o*aL}ect89fc|^_c+!r19f22MCY{vi75%@1p6BZ5t diff --git a/lib/PDSLLabs.QMSL.PDFGenerator.Models.dll b/lib/PDSLLabs.QMSL.PDFGenerator.Models.dll new file mode 100644 index 0000000000000000000000000000000000000000..1323ee46cb378c4c6cbe5f5d513cf80bf05a3184 GIT binary patch literal 28672 zcmeHwd3;pm_5QhcvTtOWtbk5f1Vkesinu@m2@nksNk9}VGbBR@OeS$=qM)J^z#S`9 zYh7raShZTQ)oQ6$Ym-*Kw$`n!YZp!Ywzg=kT5D}fTYt|v@3}J*GSvP)zyAJegY(Su zJmR+wow? zr?nxP;K{XS5N&{yW!$ST!@CEs7+yq$!fn%UHn{)tGX#YHRkE;MUX&`7{}S&iO*YLz z#&YH{qP%z|8sxVD_;~Z|Bx+^-ul{)AU6&GB&`Xla)fbo3Z`;!+o&R)MEg^mh!CVsbqpaera6WZEjz)Ux{A+59Os7;6q@4{5(48S$54{!!CWUI z1gR%Gh7cI1IEIo$*;Ac}l0@V*Cn5xu%ySGOFy=dkl0?~BCn5x?b&jDVk-ET%2tn#X z#}ERe-Z6y0XmAW6Fcvw6l0@yNI}ssBJ;O1SBvPB4h!CVMbqpaemN|wH7?||U=_&+9 zvtuYp)PAND5rWhej-e!x+TuinAQhh(rWqkHRyu}~L|GhACRGSh&vFbUiPY6jLvJNLA1gZG+G~+A;MyF#4fw9RkguvMB7(!qK9770< zF2_)kXg}yggdnxsF@(VAaSS0a&T|YUiONDwLKIBA zseMjF2vWB@hLS|;4ksc6sXHA*2#m`dLkNt^9YaZ?vMZd35Tst|7(!rNTeSw902mZ;!>-^a@Gir{Xas14=?4%RUck<3AnusIw8N6RS7Q7`A>I`<^ z48(PGGpfe>#FZ`71YXE|@yf<}ysw3xodvxh(2Y4yerzJ^tno1`o7G>f?d}|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}jf=nB`1yLSW8ukbSBCK%b#1tP?#wxJ=A5uLjMYDF{+ZjNZP#{o$g@>E_u78>A3Yr-`9HU z*Dk+&9X8YX*~;AGsFCl^|6awoxT^`(2Leldok8jfbKm?m{5Vj4KADV44jrnIwf%or z{1LKuVSh3zVgnBx$BG->PgIKrQEoqaa zR4bxBxM9S7_+5!kMDZv1<>!I4LiCl_4M&jG2_JuTXH-qUL&Ll_+W9vdYlSfe_^Uq? z;4egdU9$E!h?Ta>&_);f!9UGdHni1cZ> z`n*TEPtG>6GJEIW**9|>G^0)4bG_I Date: Mon, 4 Apr 2022 10:49:40 +0200 Subject: [PATCH 2/2] adjust launchsettings.example.json --- .../Properties/launchSettings.example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json b/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json index 75b9b05..6682162 100644 --- a/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json +++ b/PDSLLabs.Public.QMSL.PDFGenerator/Properties/launchSettings.example.json @@ -17,7 +17,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "pdf-generator": { + "PDSLLabs.Public.QMSL.PDFGenerator": { "commandName": "Project", "launchBrowser": true, "launchUrl": "swagger/index.html", -- GitLab