Stirling-PDF/common/build.gradle

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
980 B
Groovy
Raw Normal View History

Ensure Pixel gets disabled, PDF ToC support (#3659) # Description of Changes Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Dario Ghunney Ware <dariogware@gmail.com> Co-authored-by: Connor Yoh <con.yoh13@gmail.com> Co-authored-by: a <a> Co-authored-by: Reece <reecebrowne1995@gmail.com>
2025-06-11 17:21:37 +01:00
// Configure bootRun to disable it or point to a main class
bootRun {
enabled = false
}
chore: reformat Java codebase and centralize Spotless config (#3723) # Description of Changes Please provide a summary of the changes, including: - Extracted the `googleJavaFormatVersion` into a centralized Gradle property for easier management across modules. - Added consistent `spotless` formatting configuration to `common`, `proprietary`, and `stirling-pdf` modules. - Applied automatic import ordering and removed unused imports in numerous Java files. - Reordered and grouped imports consistently, improving overall code readability. - Removed excessive blank lines and standardized spacing. - Ensured a uniform coding style throughout the codebase using Spotless and Google Java Format with AOSP style. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.
2025-06-16 21:44:11 +02:00
spotless {
java {
target sourceSets.main.allJava
googleJavaFormat(googleJavaFormatVersion).aosp()
}
}
New common module (#3573) # Description of Changes Introduced a new `common` module for shared libs and commonly used classes. See the screenshot below for the file structure and classes that have been moved. --- <img width="452" alt="Screenshot 2025-05-22 at 11 46 56" src="https://github.com/user-attachments/assets/c9badabc-48f9-4079-b83e-7cfde0fb840f" /> <img width="470" alt="Screenshot 2025-05-22 at 11 47 30" src="https://github.com/user-attachments/assets/e8315b09-2e78-4c50-b9de-4dd9b9b0ecb1" /> ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [x] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [x] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.
2025-05-27 13:01:52 +01:00
dependencies {
api 'org.springframework.boot:spring-boot-starter-web'
api 'org.springframework.boot:spring-boot-starter-thymeleaf'
api 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20240325.1'
api 'com.fathzer:javaluator:3.0.6'
api 'com.posthog.java:posthog:1.2.0'
api 'org.apache.commons:commons-lang3:3.17.0'
api 'com.drewnoakes:metadata-extractor:2.19.0' // Image metadata extractor
api 'com.vladsch.flexmark:flexmark-html2md-converter:0.64.8'
api "org.apache.pdfbox:pdfbox:$pdfboxVersion"
api 'jakarta.servlet:jakarta.servlet-api:6.1.0'
api 'org.snakeyaml:snakeyaml-engine:2.9'
Bump org.springdoc:springdoc-openapi-starter-webmvc-ui from 2.8.8 to 2.8.9 (#3733) [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) from 2.8.8 to 2.8.9. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/springdoc/springdoc-openapi/releases">org.springdoc:springdoc-openapi-starter-webmvc-ui's releases</a>.</em></p> <blockquote> <h2>springdoc-openapi v2.8.9 released!</h2> <h2>What's Changed</h2> <ul> <li>Support for <a href="https://github.com/Positive"><code>@​Positive</code></a> by <a href="https://github.com/mpleine"><code>@​mpleine</code></a> in <a href="https://redirect.github.com/springdoc/springdoc-openapi/pull/3001">springdoc/springdoc-openapi#3001</a></li> <li>Fixes for Spring Boot 3.5.0 API by <a href="https://github.com/mschout"><code>@​mschout</code></a> in <a href="https://redirect.github.com/springdoc/springdoc-openapi/pull/3007">springdoc/springdoc-openapi#3007</a></li> <li>feat: type-use for method parameters by <a href="https://github.com/mymx2"><code>@​mymx2</code></a> in <a href="https://redirect.github.com/springdoc/springdoc-openapi/pull/3011">springdoc/springdoc-openapi#3011</a></li> </ul> <h3>Added</h3> <ul> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2944">#2944</a> - Support for <a href="https://github.com/Positive"><code>@​Positive</code></a></li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/3011">#3011</a> - type-use for method parameters</li> </ul> <h3>Changed</h3> <ul> <li>Upgrade spring-boot to version 3.5.0</li> </ul> <h3>Fixed</h3> <ul> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2982">#2982</a> - application/problem+json content type is not set for ProblemDetails</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2990">#2990</a> - Issues with POST Request, application/x-www-form-urlencoded and only one parameter</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2998">#2998</a> - io.swagger.v3.oas.annotations.Webhook does not work when defined on the method level</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/3012">#3012</a> - Order of examples is (sometimes) not preserved</li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mpleine"><code>@​mpleine</code></a> made their first contribution in <a href="https://redirect.github.com/springdoc/springdoc-openapi/pull/3001">springdoc/springdoc-openapi#3001</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/springdoc/springdoc-openapi/compare/v2.8.8...v2.8.9">https://github.com/springdoc/springdoc-openapi/compare/v2.8.8...v2.8.9</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md">org.springdoc:springdoc-openapi-starter-webmvc-ui's changelog</a>.</em></p> <blockquote> <h2>[2.8.9] - 2025-06-10</h2> <h3>Added</h3> <ul> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2944">#2944</a> - Support for <a href="https://github.com/Positive"><code>@​Positive</code></a></li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/3011">#3011</a> - type-use for method parameters</li> </ul> <h3>Changed</h3> <ul> <li>Upgrade spring-boot to version 3.5.0</li> </ul> <h3>Fixed</h3> <ul> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2982">#2982</a> - application/problem+json content type is not set for ProblemDetails</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2990">#2990</a> - Issues with POST Request, application/x-www-form-urlencoded and only one parameter</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2998">#2998</a> - io.swagger.v3.oas.annotations.Webhook does not work when defined on the method level</li> <li><a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/3012">#3012</a> - Order of examples is (sometimes) not preserved</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/830a98a0deef6d4758513e61a420433b3bc7c6c4"><code>830a98a</code></a> [maven-release-plugin] prepare release v2.8.9</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/976d8eccea8d99e8d5767073387f1053379d16b6"><code>976d8ec</code></a> docs update</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/1ebf9b82a57ff05992c6a69a0306cd079cf8c86d"><code>1ebf9b8</code></a> Order of examples is (sometimes) not preserved. Fixes <a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/3012">#3012</a></li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/10fd6ddf9e6fe2bec93425e74343b75a8a46f332"><code>10fd6dd</code></a> io.swagger.v3.oas.annotations.Webhook does not work when defined on the metho...</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/31ed191c1f530478ec2b4879a87fe94e0816a180"><code>31ed191</code></a> Issues with POST Request, application/x-www-form-urlencoded and only one para...</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/ceb4a10080f24755ac7cdef9707c7a3acfe3fc3b"><code>ceb4a10</code></a> application/problem+json content type is not set for ProblemDetails. Fixes <a href="https://redirect.github.com/springdoc/springdoc-openapi/issues/2982">#2982</a></li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/a23005bc5f3d9282c04f9f6cfba4d6b1ce91a0b8"><code>a23005b</code></a> Merge branch 'mymx2-feat/type-use'</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/290162f58b9e290089f40f2bdb251babeb27151e"><code>290162f</code></a> code review</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/9f05020341f745c8eb4140306bec606201f6d282"><code>9f05020</code></a> Merge branch 'mschout-spring-boot-3.5-support'</li> <li><a href="https://github.com/springdoc/springdoc-openapi/commit/6111073e41bb61bfbc76f580097fd120ff17b154"><code>6111073</code></a> code review</li> <li>Additional commits viewable in <a href="https://github.com/springdoc/springdoc-openapi/compare/v2.8.8...v2.8.9">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.springdoc:springdoc-openapi-starter-webmvc-ui&package-manager=gradle&previous-version=2.8.8&new-version=2.8.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 23:30:39 +01:00
api "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.9"
Add EML to PDF conversion functionality (#3650) This pull request introduces a new feature for converting EML (email) files to PDF format, along with various customization options. It includes backend support for the conversion process, frontend integration for user interaction, and updates to localization and navigation. ### Backend Changes: * **Added EML to PDF Conversion Logic**: Implemented a new controller `ConvertEmlToPDF` with an endpoint `/api/v1/convert/eml/pdf` to handle EML-to-PDF conversion requests. This includes validation, support for HTML intermediate files, and enhanced options such as attachment handling and size limits. (`src/main/java/stirling/software/SPDF/controller/api/converters/ConvertEmlToPDF.java`) * **New Model for Conversion Requests**: Introduced `EmlToPdfRequest` class to encapsulate request parameters like attachment inclusion, maximum attachment size, and HTML download options. (`common/src/main/java/stirling/software/common/model/api/converters/EmlToPdfRequest.java`) * **Dependency Update**: Added `jakarta.mail:jakarta.mail-api:2.1.3` to the project dependencies for handling EML files. (`common/build.gradle`) ![image](https://github.com/user-attachments/assets/34c5755a-d58d-4fc6-8a51-e83ac9f4afae) ### Frontend Changes: * **New Web Form**: Created a new HTML page `eml-to-pdf.html` for the EML-to-PDF conversion tool, allowing users to upload EML files and configure options. (`src/main/resources/templates/convert/eml-to-pdf.html`) * **Navigation Update**: Added a navigation entry for the EML-to-PDF tool in the sidebar. (`src/main/resources/templates/fragments/navElements.html`) ![image](https://github.com/user-attachments/assets/afbd929d-7745-4d52-8aeb-a88d21662ca6) ### Localization and UI Enhancements: * **Localization Strings**: Added support for the EML-to-PDF tool in the `messages_en_GB.properties` file, including titles, descriptions, and help texts. (`src/main/resources/messages_en_GB.properties`) * **Web Controller Update**: Added a new route `/eml-to-pdf` in `ConverterWebController` to serve the EML-to-PDF form. (`src/main/java/stirling/software/SPDF/controller/web/ConverterWebController.java`) ### Highlights: * Attachment support: and Attachment section is created with fully working PDFAnnotations, which enable users to click paperclip and redirects to the attachment. (Requires PDF.js) * If attachments are present creates a catalog of attachments * Encoding support inside the body and header for local charachters e.g: ö,ő,ü etc.. * Optional: Users can download HTMLs, aswell as PDFs * Advanced features for conversion that: keep links, keep as much formatting as possible, keep images incl relative sizes, popular fonts and many more. ### Known limitations * Generally EML-to-HTML is very reliable however emails with complicated layout cause problem for Weasyprint, so not all emails can reliably converted to PDF. * Users need PDF.js and PDFCatalog support for best attachment/embedding support (but is not strict requirement) ### Challanges * Embedding was a large headache, not the Embedding itself per se more so the additional niceties such as: links, the catalog, consistent symbols (replaced the paperclip that is generated by pdf viewer with emoji paperclip that is consistent for everybody) and it was generally prone all sorts of hard to diagnose issues. * Encoding issues * Formatting issues However I think addressed these so shouldn't cause any additional headache. :) ### Examples: ![image](https://github.com/user-attachments/assets/9b560216-984d-4b9f-9ae7-8975723c894d) ![image](https://github.com/user-attachments/assets/98c7a67d-82d4-4f5a-bf42-8ebc4be18b42) ![image](https://github.com/user-attachments/assets/30a53fc9-9636-4090-b5b0-0866cc054c6c) ![image](https://github.com/user-attachments/assets/80c2d109-5259-4d3f-b97a-00b513d547e9) Closes #503 --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [x] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [x] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [x] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-08 22:26:01 +02:00
api 'jakarta.mail:jakarta.mail-api:2.1.3'
chore: reformat Java codebase and centralize Spotless config (#3723) # Description of Changes Please provide a summary of the changes, including: - Extracted the `googleJavaFormatVersion` into a centralized Gradle property for easier management across modules. - Added consistent `spotless` formatting configuration to `common`, `proprietary`, and `stirling-pdf` modules. - Applied automatic import ordering and removed unused imports in numerous Java files. - Reordered and grouped imports consistently, improving overall code readability. - Removed excessive blank lines and standardized spacing. - Ensured a uniform coding style throughout the codebase using Spotless and Google Java Format with AOSP style. --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [x] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details.
2025-06-16 21:44:11 +02:00
}