Using subscript and superscript text in PDFMake

Viewed 16

I am trying to find a way to use superscript and subscript text when creating a PDF in JavaScript with PDFMake. I am currently trying to use .sub() and .sup() for this, but they are marked as deprecated and the output just looks like the HTML tags. I've been searching through PDFMakes documentation but I have not found anything related to this. I am wondering if it is possible to output superscript or subscript text using JavaScript and PDFMake. Here is the relevant code for what I am trying to do:

{columns:
            [
                {width: '*', text: 'Effective Projected Area (EPA)' + 'T'.sub(), fontSize: 12, alignment: 'right'},
                {width: '*', text: epa + " ft" + '2'.sup(), fontSize: 12, alignment: 'left'}
            ],
            columnGap: 75
        }

Output:

Effective Projected Area (EPA)<sub>T</sub> 38.05 ft<sup>2</sup>
0 Answers
Related