diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..2e9be9a1 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: ['https://paypal.me/froodleplex?country.x=GB&locale.x=en_GB'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c8a31d91 --- /dev/null +++ b/.gitignore @@ -0,0 +1,109 @@ + + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + + +# Gradle +.gradle +.lock + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +### Eclipse Patch ### +# Spring Boot Tooling +.sts4-cache/ + +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar diff --git a/README.md b/README.md index f3b2c46f..dac4bcae 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# Stirling-PDF (Made in 1 day with 100% ChatGPT, Even this readme!) +# Stirling-PDF This is a locally hosted web application that allows you to perform various operations on PDF files, such as splitting and adding images. +Started off as a 100% ChatGPT made application, slowly moving away from that as more features are added + I will support and fix/add things to this if there is a demand [Discord](https://discord.gg/Cn8pWhQRxZ) @@ -15,11 +17,14 @@ I will support and fix/add things to this if there is a demand [Discord](https:/ - Convert PDFs to and from images - Reorganize PDF pages into different orders. - Add images to PDFs at specified locations. +- Rotating PDFs in 90 degree increments. +- Compressing PDFs to decrease their filesize. - Dark mode support. ## Technologies used - Spring Boot + Thymeleaf - PDFBox +- e-iceblue spire.pdf.free (for PDF compression untill i find a nicer way) - HTML, CSS, JavaScript - Docker @@ -29,20 +34,29 @@ I will support and fix/add things to this if there is a demand [Discord](https:/ Prerequisites - Java 17 or later -- Gradle 6.0 or later +- Gradle 7.0 or later 1. Clone or download the repository. 2. Build the project using Gradle by running `./gradlew build` -3. Start the application by running `./gradlew bootRun` +3. Start the application by running `./gradlew bootRun` or by calling the build jar in build/libs with java -jar jarName.jar ### Docker https://hub.docker.com/r/frooodle/s-pdf -docker pull frooodle/s-pdf - +Docker Run +``` docker run -p 8080:8080 frooodle/s-pdf - +``` +Docker Compose +``` +version: '3.3' +services: + s-pdf: + ports: + - '8080:8080' + image: frooodle/s-pdf +``` ## How to View 1. Open a web browser and navigate to `http://localhost:8080/` diff --git a/build.gradle b/build.gradle index f658f516..c4b21d34 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'stirling.software' -version = '0.2.1' +version = '0.2.2' sourceCompatibility = '17' repositories { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f679f0dc..d49c5abd 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -6,4 +6,6 @@ multipart.max-file-size=1000MB multipart.max-request-size=1000MB spring.servlet.multipart.max-file-size=1000MB -spring.servlet.multipart.max-request-size=1000MB \ No newline at end of file +spring.servlet.multipart.max-request-size=1000MB + +server.forward-headers-strategy=NATIVE diff --git a/src/main/resources/templates/add-image.html b/src/main/resources/templates/add-image.html index 80a2f64d..f0c81be0 100644 --- a/src/main/resources/templates/add-image.html +++ b/src/main/resources/templates/add-image.html @@ -17,7 +17,7 @@ -