How to resize text in a PDF Form's fillable field
The pdf/edit/add
endpoint supports changing the text size in a fillable field. To do this, you'll need to include both the fontName
and size
parameters. Our API supports a variety of fonts, which you can view in our font list at https://apidocs.pdf.co/kb/General/pdfco-font-list.
Below is an example code snippet that demonstrates how to set the font size to 8:
POST /v1/pdf/edit/add HTTP/1.1
Host: api.pdf.co
Content-Type: application/json
x-api-key: your_api_key
Content-Length: 302
{
"url": "https://file_url",
"fields": [
{
"fieldName": "field_name",
"pages": "0",
"text": "This is a sample text",
"size": 8,
"fontName": "Arial"
}
]
}