pdf-lib icon indicating copy to clipboard operation
pdf-lib copied to clipboard

Is it possible to set line height using text field?

Open dimaskc opened this issue 2 years ago • 1 comments

What were you trying to do?

How to set line height in text field?

image

How did you attempt to do it?

form.getTextField('property_appointment')
		.setText(`lorem ipsum dolor sit amet lorem ipsum dolor sit amet lorem ipsum dolor sit amet ${jsonData?.property?.appointment} lorem ipsum dolor sit amet lorem ipsum dolor sit amet ${jsonData?.property?.appointment} lorem ipsum dolor sit amet lorem ipsum dolor sit amet ${jsonData?.property?.appointment} lorem ipsum dolor sit amet`);

What actually happened?

setLineHeight() doesn't work

What did you expect to happen?

I want to set custom line height

How can we reproduce the issue?

Version

1.17.1

What environment are you running pdf-lib in?

Node

Checklist

  • [X] My report includes a Short, Self Contained, Correct (Compilable) Example.
  • [X] I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

No response

dimaskc avatar Nov 02 '23 15:11 dimaskc

Someone found a solution for this? I can't seem to figure out how to set it in either Adobe Acrobat nor setting it programmatically using PDF-Lib, so that pdfDoc.getForm().getTextField('my-field').setText('Value') has a bigger line-height.

BrunnerLivio avatar Feb 01 '24 22:02 BrunnerLivio