When testing out Spire PDF Java in Windows locally for HTML to PDF conversion, it's working as expected. However, when trying to run it in Linux EKS, we're getting a 200 OK with empty response.
After going through the forum, we tried running a few debug commands.
echo "<p>test text</p>" | xvfb-run ./Html2Pdf "" "output.pdf" 800 600 0 0 0 0
/usr/bin/xvfb-run: line 181: 5004 Segmentation fault (core dumped) DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
/usr/bin/xvfb-run: line 186: kill: (5001) - No such process
Has a similar issue been observed.
Can you also share a dockerfile with the list of dependencies please.
Following is a snippet of our dockerfile.
ENV XDG_RUNTIME_DIR="/opt/workdir/temp"
RUN microdnf install -y dnf yum-utils && \
dnf config-manager --add-repo mirror.stream.centos.org/9-stream/AppStream/x86_64/os/ && \
dnf install mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/xorg-x11-server-Xvfb-1.20.11-31.el9.x86_64.rpm -y --nogpgcheck && \
dnf install libglvnd-egl -y --nogpgcheck && \
dnf remove yum-utils -y && \
curl --request GET --insecure -o ./file.zip 'e-iceblue.com/downloads/plugins/java/plugins-linux-x64.zip' && \
unzip -q ./file.zip && rm ./file.zip && chmod -R 777 ./plugins_linux && mkdir -p /home/default && chmod -R 777 /home/default && \
mkdir -p /home/default/.pki/nssdb && chmod -R 777 /home/default/.pki/nssdb && chmod -R 777 /opt/workdir
USER 1001
RUN mkdir -p /opt/workdir/temp
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT xvfb-run java -XX:${JVM_GC} -Xms${MIN_JVM_MEMORY} -Xmx${MAX_JVM_MEMORY} -jar app.jar