This is a very simple webservice, that uses the amazing OpenHTML2PDF to convert HTML to PDF.
Currently there is only one client implementation available: Extension:BlueSpiceUEModulePDF.
To build the JAR file, run:
mvn clean package
Build the docker image with:
docker build -t webservice-htmlpdf .
Run the container with:
docker run -p 8080:8080 webservice-htmlpdf
To test the service manually, run:
cd manual-testing
composer update
php test.php data/doc1/
The old "bshtml2pdf" service ran servlets on a Tomcat server and hat /BShtml2PDF
as the base URL. This service runs standalone and therefore lacks the /BShtml2PDF
base URL. The client implementation must be adjusted accordingly.
If that can not be done easily, one can start the service with the server.servlet.context-path
parameter:
java -jar \
-Dserver.servlet.context-path=/BShtml2PDF \
htmlpdf-1.0.0-SNAPSHOT.jar
or using the Docker image:
docker run -p 8080:8080 -e APP_PATH=/BShtml2PDF webservice-htmlpdf