IMPORTANT: You need to setup Postman first, use this link to setup PDF.co for Postman.

Step 1

Go to Collections Tab and click on PDF.co API v.1 folder

Collections Tab

Step 2

Click on PDF Info Reader folder

PDF Info Reader Folder

Step 3

Click on Get /pdf/info

Get form f1040 fields

Step 4

On URL key’s value, enter the form’s link

F1040 Form URL

Step 5

Click on the Send button

Send button

Step 6

Scroll down and make sure that the Status is 200 OK.

HTML to PDF Status

Step 7

You should see all the list fields in the body

f1040 list of all fields

Now that we have a list of all of the IRS Form 1040’s fields, we are ready to fill out the form.

Step 8

Go back to PDF.co API v.1 folder and click on the PDF Text Tools folder

PDF Text Tool Folder

Step 9

Click on Add Text, Images and Fields to PDF folder and click Post /pdf/edit/add endpoint

Post /pdf/edit/add endpoint

Step 10

Click on Body and select Raw

Body Tab

Step 11

Copy and paste this code in the field box

{
"async": false,
"encrypt": false,
"name": "f1040-filled",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"fields": [
{
"fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
"pages": "1",
"text": "True"
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
"pages": "1",
"text": "John A."
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
"pages": "1",
"text": "123456789"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
"pages": "1",
"text": "987654321"
}

],
“annotations”:[
{
“text”:”Sample Filled with PDF.co API using /pdf/edit/add. Get fields from forms using /pdf/info/fields”,
“x”: 10,
“y”: 10,
“size”: 12,
“pages”: “0-“,
“color”: “FFCCCC”,
“link”: “https://pdf.co”
}
],
“images”: [
]
}

Note: topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1] is the field name for Married Filling Jointly. Setting Text to true will tick off the box. And topmostSubform[0].Page1[0].f1_02[0] is the field name for Your first name and middle initial text box, adding a name in Text will fill the text box out.

Step 12

Click on the Send button

Send button

Step 13

Scroll down and make sure that the Status is 200 OK.

HTML to PDF Status

Step 14

Copy the resulting URL and paste it in your browser’s address bar

f1040 resulting url

Step 15

The filled-out form should look like this

IRS Form 1040 Filled Out

Note: The URL is only valid for an hour. Once the 1 hour has elapsed, you may need to regenerate a new URL.