Custom fonts > PDFs

I’m generating a PDF using cfdocument (a Swiss postal pay slip) that needs
a custom OCRB font for the scannable code line at the bottom. Any fairly
current advice on how to get custom fonts to work in cfdocument?

Thanks in advance,

Nando

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Hi Nando,

I’ve written a blog article a while ago how to do this. See here:
http://blog.hnat.de/post.cfm/schriftarten-zu-railo-hinzufugen
Yes, I’v written it in German :slight_smile:

Hope this helps.

Best,
Michi----------------------------------------
Von: “Nando Breiter” <@Nando_Breiter>
Gesendet: Mittwoch, 1. Juli 2015 23:44
An: “lucee@googlegroups.comlucee@googlegroups.com
Betreff: [Lucee] Custom fonts > PDFs
I’m generating a PDF using cfdocument (a Swiss postal pay slip) that needs
a custom OCRB font for the scannable code line at the bottom. Any fairly
current advice on how to get custom fonts to work in cfdocument?
Thanks in advance,

Nando
Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia


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 lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D_ZQN%2BJ%2ButcLuBmcnwa1G%3D
9ewr%2BPOH5%2Bgt37-ySDFXVsg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hoo ha!! Thanks Michael. I’ll give that a try - should work. :slight_smile:

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamediaOn Thu, Jul 2, 2015 at 8:31 AM, ‘Michael Hnat’ via Lucee < lucee@googlegroups.com> wrote:

Hi Nando,

I’ve written a blog article a while ago how to do this. See here:
http://blog.hnat.de/post.cfm/schriftarten-zu-railo-hinzufugen
Yes, I’v written it in German :slight_smile:

Hope this helps.

Best,
Michi


Von: “Nando Breiter” <@Nando_Breiter>
Gesendet: Mittwoch, 1. Juli 2015 23:44
An: “lucee@googlegroups.comlucee@googlegroups.com
Betreff: [Lucee] Custom fonts > PDFs

I’m generating a PDF using cfdocument (a Swiss postal pay slip) that needs
a custom OCRB font for the scannable code line at the bottom. Any fairly
current advice on how to get custom fonts to work in cfdocument?

Thanks in advance,

Nando

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia


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 lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D_ZQN%2BJ%2ButcLuBmcnwa1G%3D9ewr%2BPOH5%2Bgt37-ySDFXVsg%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAGHrs%3D_ZQN%2BJ%2ButcLuBmcnwa1G%3D9ewr%2BPOH5%2Bgt37-ySDFXVsg%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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 lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/84cd708f577548fa94c8fd99448ce9b8%40bluegras.de
https://groups.google.com/d/msgid/lucee/84cd708f577548fa94c8fd99448ce9b8%40bluegras.de?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

It’s not a direct answer to your question. We took a different approach to
create scan codes, using zxing to create an image…

To make it work, we stick the core-3.1.0.jar and javase-3.1.0.jar files in
the tomcat/lib directory and the following will create a code-128 barcode:

<cfset format=createObject(‘java’,‘com.google.zxing.BarcodeFormat’)>
<cfset
writer=createObject(‘java’,‘com.google.zxing.oned.Code128Writer’).init()>
<cfset
matrix=createObject(‘java’,‘com.google.zxing.client.j2se.MatrixToImageWriter’)>
<cfset barcode=writer.encode(‘123456’,format.CODE_128,75,75)>

Simon

but in general:

1) add your font to the fonts folder in fonts.jar archive
2) edit pdf4fonts.properties to include your font with a name

(escape spaces with a )
3) restart Tomcat

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 7/2/2015 2:51 AM, Nando Breiter wrote:

Hoo ha!! Thanks Michael. I’ll give that a try - should work. :slight_smile:

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601 tel:%2B41%20(0)91%20600%209601
+41 (0)76 303 4477 tel:%2B41%20(0)76%20303%204477 cell
skype: ariamedia

On Thu, Jul 2, 2015 at 8:31 AM, ‘Michael Hnat’ via Lucee <lucee@googlegroups.com mailto:lucee@googlegroups.com> wrote:

Hi Nando,
 
I've written a blog article a while ago how to do this. See here:
http://blog.hnat.de/post.cfm/schriftarten-zu-railo-hinzufugen
Yes, I'v written it in German :-)
 
Hope this helps.
 
Best,
Michi
 
 
 
------------------------------------------------------------------------
*Von*: "Nando Breiter" <@Nando_Breiter
<mailto:@Nando_Breiter>>
*Gesendet*: Mittwoch, 1. Juli 2015 23:44
*An*: "lucee@googlegroups.com <mailto:lucee@googlegroups.com>"
<lucee@googlegroups.com <mailto:lucee@googlegroups.com>>
*Betreff*: [Lucee] Custom fonts > PDFs
 
I'm generating a PDF using cfdocument (a Swiss postal pay slip)
that needs a custom OCRB font for the scannable code line at the
bottom. Any fairly current advice on how to get custom fonts to
work in cfdocument?
 
Thanks in advance,
 
Nando


Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601 <tel:%2B41%20%280%2991%20600%209601>
+41 (0)76 303 4477 <tel:%2B41%20%280%2976%20303%204477> cell
skype: ariamedia

 

--
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
<mailto:lucee+unsubscribe@googlegroups.com>.
To post to this group, send email to lucee@googlegroups.com
<mailto:lucee@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D_ZQN%2BJ%2ButcLuBmcnwa1G%3D9ewr%2BPOH5%2Bgt37-ySDFXVsg%40mail.gmail.com
<https://groups.google.com/d/msgid/lucee/CAGHrs%3D_ZQN%2BJ%2ButcLuBmcnwa1G%3D9ewr%2BPOH5%2Bgt37-ySDFXVsg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
 
-- 
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
<mailto:lucee+unsubscribe@googlegroups.com>.
To post to this group, send email to lucee@googlegroups.com
<mailto:lucee@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/84cd708f577548fa94c8fd99448ce9b8%40bluegras.de
<https://groups.google.com/d/msgid/lucee/84cd708f577548fa94c8fd99448ce9b8%40bluegras.de?utm_medium=email&utm_source=footer>.


For more options, visit https://groups.google.com/d/optout.


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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAGHrs%3D9op4GfLM0noYADEZOci-wRtDP1o6VNy0YtKY5kWdciqA%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAGHrs%3D9op4GfLM0noYADEZOci-wRtDP1o6VNy0YtKY5kWdciqA%40mail.gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.