CFDocument (CF9) Anyone successfully using "FREE3OF9.TTF " (Barcode font)?

1.9k Views Asked by At

I'm trying to create a pdf with a barcode using CFDocument. (Barcode font is loaded. Can see it in the CF admin.) Found a boat load of folks complaining about the font not being recognized, but no solutions anywhere.

2

There are 2 best solutions below

0
On

OK, for anyone else having this issue, here is what I did:

I first added the font in the control panel "fonts" app of the server. I then added the font in the CF administrator. I noticed that the font face and font family were both isted as "new". I rebooted and when it came up they were both still listed as "new". I opened up the TTF file to see what the name was actually listed as. I then used that name in my css like so "font-family:Free 3 of 9 Extended;". It worked.

I can now print barcode labels using flashpaper. PDF still wants to make everything portrait for some reason, even though I specify landscape.

( from http://www.mail-archive.com/[email protected]/msg290047.html )

CF has the font listed as "free 3 of 9" (with spaces). Make sure to embed the font in cfdocument!

1
On

Add the font in your server control panel (windows). Add the font in CF admin Font management (Under server settings). Restart server (Note: don't skip the restarting of server or it will not work). Below is a working sample code of 'Free 3 of 9 extended'

<cfdocument format="pdf" filename="#expandpath('.')#\barcode.pdf" pagetype="letter" overwrite="yes" backgroundvisible="yes" margintop=".33" marginright=".33" marginbottom=".33" marginleft=".33" fontembed="yes"> <p style="font-family:Free 3 of 9 extended;font-size:75px;"> content here </p></cfdocument>