How to wrap text so it doesn't overflow
You'll need 5 parameters to wrap text so it doesn't overflow. The x
and y
coordinates, the textbox width
and height
, and the text alignment
. To help you get the coordinates, you can use our Simplified PDF Viewer here.
POST /v1/pdf/edit/add HTTP/1.1
Host: api.pdf.co
Content-Type: application/json
x-api-key: Your_API_Key
Content-Length: 815
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations": [
{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"x": "10",
"y": "10",
"width": "500",
"height": "200",
"size": "7",
"pages": "0",
"alignment": "left"
}
]
}
ZAPIER
In the Text Objects
field, you can set the text object's height, width, and text alignment so it doesn't cut off your text.
Here's an example:
- Width = 133
- Height = 100
- Text alignment = left
In the Text Objects field, you can add it in this format:
459;12;0;your text here;12;Arial;;;;133;100;left
INTEGROMAT
Add an Item under Text Annotations
. Fill the Width and the Height of the Text Box. Then, choose the Text Alignment.