I am working to migrate a CF9 site to Lucee and decided to go with v5 as
that was on the top of the download page when i started this the other day.
All working pretty well, but have become stuck trying to get custom fonts
to work in
The steps here for adding custom fonts is for 4.5, and doesn’t seem to
apply for v5
A bit of digging around in the v5 install led me to expand the
pdfbox-1.8.9.jar in the pdf-extension-18.104.22.168.lex and package the ttf font
files and reference them in PDFBox_External_Fonts.properties. I then rezip
the lucee.jar and fire up the server, but doesn’t seem to have any effect.
Any one have any luck in getting custom fonts working in v5 yet?
The intent here is to move the site to a Win 2012 server, so i’m not
looking to spend time replacing our cfdocument calls if i can avoid it
Please let us know if / when you find a solution. As I implied in my post,
the process wasn’t at all straightforward, so you may need to fiddle a bit
with names, paths, try a different font package, etc …
Aria Media Sagl
Has anyone found a solution for this?
I’ve installed Lucee V22.214.171.124.
I also tried to implement customer fonts on Lucee 5. The only place I found
custom fonts are implemented is the jar-file PDFBox (in L5 it is V0.7.3).
I saw that this jar file is not even loaded (in Lucee-Admin “Bundles”).
Where is it called from?
Best regards - Heinz
No. I had tried for several days to get this working, pulling apart the
lucee install trying to get the fonts in the right location to be picked
up. Unfortunately no luck.
As I was only using them for Barcodes, i gave up and switched to generating
I would recommend using wkhtmltopdf over cfdocument or PDFBox in terms of
custom font rendering in PDF.
wkhtmltopdf can handle remotely linked fonts(i.e. Google), CSS-embedded
fonts and local fonts. See the result here:
To me, the biggest advantage of wkhtmltopdf is the capability of rendering
SVG and better support for CSS specs.
Here are some examples produced by wkhtmltopdf (0.12.3):
Using wkhtmltopdf with Lucee is pretty easy. Just install the wkhtmltopdf
binary on the server and use cfexecute to call it.
Here’s a demo to show how custom fonts are rendered by wkhtmltopdf:
You only need:
Hope this helps.
addedly, you can copy your own “fonts.jar” to lucee installation path just
like “opt/lucee/lib” and then restart your lucee server.