Quarkus PDFBox
This extension provides support for Apache PDFBox. It allows you to create and manipulate PDF documents and forms programmatically and compile to native code with GraalVM.
Installation
If you want to use this extension, you need to add the io.quarkiverse.pdfbox:quarkus-pdfbox extension first to your build file.
For instance, with Maven, add the following dependency to your POM file:
<dependency>
<groupId>io.quarkiverse.pdfbox</groupId>
<artifactId>quarkus-pdfbox</artifactId>
<version>1.2.0</version>
</dependency>
Docker
When building native images in Docker using the standard Quarkus Docker configuration files some additional features need to be
installed to support Apache POI. Specifically font information is not included in Red Hat’s ubi-minimal images. To install it
simply add these lines to your DockerFile.native file:
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.5
######################### Set up environment for POI #############################
RUN microdnf update -y && microdnf install -y freetype fontconfig && microdnf clean all
######################### Set up environment for POI #############################
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
# Shared objects to be dynamically loaded at runtime as needed,
COPY --chown=1001:root --chmod=0755 target/*.properties target/*.so /work/
COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
# Permissions fix for Windows
RUN chmod "ugo+x" /work/application
EXPOSE 8080
USER 1001
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
Make sure .dockerignore does not exclude .so files!
|