Coldfusion 9 - cfdocument fails to render the barcode (code 128) font as expected.
Hi,
Trying to render the html code to PDF. I am having a hard time to figure out a way to render bar-code font using cfdocument.
- Tried installing the bar-code in local machine, didn't work
- Tried copying the font files to docker Image, didn't work
- Used @11220649-face in style, still didn't work
None of those are working . Appreciate it, If anyone can jump in for a help.
Thanks
Vishnu
format="PDF"
pageType = "custom"
pageHeight = "3"
pageWidth = "4"
margintop="0"
marginright="0"
marginleft="0"
marginbottom="0"
overwrite="yes"
name="pdffile"
fontembed="yes"
localUrl = yes >
<cfoutput>
<style type="text/css">
@11220649-face {
font-family: "Code128AB";
src: url("#expandPath('./fonts/')#Bc128ab.eot"); /* IE9 Compat Modes */
src: url("#expandPath('./fonts/')#Bc128ab.eot?##iefix") format("embedded-opentype"), /* IE6-IE8 */
url("./fonts/Bc128ab.otf") format("opentype"), /* Open Type Font */
url("#expandPath('./fonts/')#Bc128ab.svg") format("svg"), /* Legacy iOS */
url("#expandPath('./fonts/')#Bc128ab.ttf") format("truetype"), /* Safari, Android, iOS */
url("#expandPath('./fonts/')#Bc128ab.woff") format("woff"), /* Modern Browsers */
url("#expandPath('./fonts/')#Bc128ab.woff2") format("woff2"); /* Modern Browsers */
font-weight: normal;
font-style: normal;
}
.barcode {
font-family: "Code 128AB";
font-size: 35px;
margin-top: 10px;
line-height:10px;
padding: 2px;
margin: 2px;
text-align: left;
}
</style>
<html>
<body>
<div class="barcode">|ax10KE-xL~</div>
</body>
</html>
</cfoutput>
</cfdocument>
<cfcontent type="application/pdf" variable="#pdffile#">
