Pdf Write String

 

POST https://api.pdfbroker.io/api/pdf/pdfwritestring

This api request is for adding text to existing pdf document.

Options

These are the options available when writing text on your existing pdf documents

Option Description
text The text to write in the pdf
textColor Set the color of the text, defaults to black, rgb(0,0,0) formatted as object with properties r,g anb b, see example below
font Set the font to style the text, formatted as an object with name, size and style: 0 = Normal, 1 = Bold, 2 = Italic, 3 = Bold and Italic, see example below
pageNumber Set which page of pdf document to write text on. Default is 1
xPosition Set the X axis position on where to write text, in reference to xOrigin.
yPosition Set the Y axis position on where to write text, in reference to YOrigin.
xOrigin Set the point from where the X axis position should be calculated from. Default value is from left side of page. 0 = Left, 1 = Center, 2 = Right
yOrigin Set the point from where the Y axis position should be calculated from. Default value is from top of page, 0 = Top, 1 = Center, 2 = Bottom

Example

Checkout Swagger documentation

Demo

You can watch a demo of a request to our Pdf Write String api on /demo/pdf-write-text-demo