I am reaching out to report an issue I am experiencing with PDF generation in my Rails application using PDFKit. While everything works perfectly on my local macOS machine, I have encountered problems with Arabic text handling on my remote server running Docker.
Here are the details:
Environment:
Local Machine: macOS
Remote Server: Docker Container
wkhtmltopdf Version: 0.12.6 (the same on both environments)
Despite the consistent version of wkhtmltopdf, the PDF output on the Docker container does not render as expected. I have thoroughly checked the HTML content being passed to PDFKit and verified that it matches my local output. Additionally, I made several adjustments to the CSS and PDFKit options, including changing the encoding to UTF-8, but unfortunately, the issues persist.
To further investigate, I logged the HTML content prior to passing it to PDFKit, and it appears identical to the local version. However, discrepancies arise after the PDF generation.
I would greatly appreciate any guidance or insights you could provide regarding this issue. For your reference, I will attach both PDFs demonstrating the differences.
The left screenshot is from local while right is from remote.
Thank you for your assistance!
local_machine (1).pdf

I am reaching out to report an issue I am experiencing with PDF generation in my Rails application using PDFKit. While everything works perfectly on my local macOS machine, I have encountered problems with Arabic text handling on my remote server running Docker.
Here are the details:
Environment:
Local Machine: macOS
Remote Server: Docker Container
wkhtmltopdf Version: 0.12.6 (the same on both environments)
Despite the consistent version of wkhtmltopdf, the PDF output on the Docker container does not render as expected. I have thoroughly checked the HTML content being passed to PDFKit and verified that it matches my local output. Additionally, I made several adjustments to the CSS and PDFKit options, including changing the encoding to UTF-8, but unfortunately, the issues persist.
To further investigate, I logged the HTML content prior to passing it to PDFKit, and it appears identical to the local version. However, discrepancies arise after the PDF generation.
I would greatly appreciate any guidance or insights you could provide regarding this issue. For your reference, I will attach both PDFs demonstrating the differences.
The left screenshot is from local while right is from remote.
Thank you for your assistance!

local_machine (1).pdf