Skip to content

How to set font size for AcroFroms? #1088

@r4tz52

Description

@r4tz52

Question

Description

In the documentation there is sample for setting up font for forms:

doc.font('Courier');
doc.formText('myfield', 10, 10, 200, 20);

But how should I set the font size? Now text height depends on field area size, and changes with value length. I tried to type

doc.fontSize(12);

but no luck.

Your environment

  • pdfkit version: 0.11.0
  • Node version: 12.14.0
  • Browser version (if applicable): FF 72.0.2
  • Operating System: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions