Search code examples
angularnpmjspdfangular-libraryjspdf-autotable

How to set font size and position in specific text


I want to set font size and position in a specific text.how can i do that?

doc.text( 40, 30, "jspdf" );

enter image description here


Solution

  •     doc.setFontSize(20);
        doc.text(
          "SHARJAS",
          40,
          30
        );
    
        doc.setFontSize(18);
        doc.text(
          `SHARJAS`,
          40,
          50
        );
     doc.setFontSize(16);
        doc.text(
          `SHARJAS`,
          40,
          70
        );
     doc.setFontSize(14);
        doc.text(
          `SHARJAS`,
          40,
          70
        );