i have a project to print out the working report. i got trouble when putting check mark inside pdfmake generated report i follow some instructions from below link :
i already follow all the instructions there but my fontelo nor fontawesome icon show up in my report. while using fontawesome. the icon show square block no the real icon. hope someone can help me figure this out thanks
Maybe you could include some code (a minimal docDefinition, and the printer part).
My code, using fontawesome to display checkboxes/radio icons :
The printer part :
var fonts = {
Roboto: {
normal: 'assets/fonts/Roboto-Regular.ttf',
bold: 'assets/fonts/Roboto-Medium.ttf',
italics: 'assets/fonts/Roboto-Italic.ttf',
bolditalics: 'assets/fonts/Roboto-MediumItalic.ttf'
},
FontAwesome: {
normal: 'assets/fonts/fontawesome-webfont.ttf'
}
};
// ...
var printer = new PdfPrinter(fonts);
And the docDefinition. You can try using the unicode code :
var dd = {
content: { text: "\uf046 ", style: 'fontawesome' },
styles: {
fontawesome: {
'font': 'FontAwesome',
'color': "#656565"
}
}
}
Maybe this ASCII value could work for you? √√√√√√√√
You will get this symbol √ which is similar to the tick checkmark.
Extended ASCII Codes
section: http://www.asciitable.com/
{
text: '√',
absolutePosition: { x: 21, y: 293 }
}
Happy Coding! :)
you can use canvas
to draw the square for checkmark as below
canvas: [
{
type: 'polyline',
lineWidth: 1,
closePath: true,
points: [{ x: 0, y: 0}, { x: 8, y: 0 }, { x: 8, y: 8 }, { x: 0, y:8 }]
}
]
and then use it with column
to make it look like checkbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With