Custom Fonts in Lucee 5

689 views
Skip to first unread message

Phil Haeusler

unread,
May 31, 2016, 4:29:16 AM5/31/16
to Lucee
Hi 

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 <cfdocument>

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-1.0.0.52.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 right now.

Thanks
Phil

Nando Breiter

unread,
May 31, 2016, 5:19:02 AM5/31/16
to lu...@googlegroups.com
Phil,

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
+41 (0)76 303 4477 cell
skype: ariamedia

--
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/066786c5-308d-4533-84ea-a9f56f3662ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Clinton Howell

unread,
Aug 19, 2016, 11:06:05 AM8/19/16
to Lucee
Has anyone found a solution for this?

Heinz Baltes

unread,
Aug 23, 2016, 11:39:40 AM8/23/16
to Lucee

Hi,

I've installed Lucee V5.0.1.48.
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

Phil Haeusler

unread,
Aug 25, 2016, 10:12:13 PM8/25/16
to lu...@googlegroups.com
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 images instead. 

On 20 August 2016 at 00:31, Clinton Howell <cho...@rounding6.com> wrote:
Has anyone found a solution for this?

--
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit https://ti.to/cfcamp/cfcamp-2016/discount/Lucee@cfcamp

---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.

Da Li

unread,
Aug 29, 2016, 1:01:18 AM8/29/16
to Lucee
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: https://github.com/myleslee/lucee/blob/master/pdf/content.pdf

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:
  • pdf.cfm
  • content.html 
 Hope this helps.

Da Li

  

장창학

unread,
Mar 4, 2017, 9:56:18 AM3/4/17
to Lucee
Hi,


i hope this help.





2016년 5월 31일 화요일 오후 5시 29분 16초 UTC+9, Phil Haeusler 님의 말:

장창학

unread,
Mar 4, 2017, 10:00:16 AM3/4/17
to Lucee
addedly, you can copy your own "fonts.jar" to lucee installation path just like "opt/lucee/lib".
and then restart your lucee server.



2016년 5월 31일 화요일 오후 5시 29분 16초 UTC+9, Phil Haeusler 님의 말:
Hi 

İlker Doğan

unread,
Mar 14, 2017, 10:39:17 AM3/14/17
to Lucee
I use Lucee 5.1.1.65 on windows 10.

I create fonts.jar and add my fonts. then copy at C:\lucee\lib restart lucee
but I cannot see my customs fonts at pdf file that I create use with cfdocument.


What I miss




4 Mart 2017 Cumartesi 18:00:16 UTC+3 tarihinde 장창학 yazdı:
Reply all
Reply to author
Forward
0 new messages