How to read checkboxes and radioboxes from PDF scan or PDF form
You can read checkboxes and their values from JPG, PNG scans and scanned PDF using /barcode/read/from/url
endpoint by setting the special barcode type: checkbox
.
Example:
POST [https://api.pdf.co/v1/barcode/read/from/url](https://api.pdf.co/v1/barcode/read/from/url)
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"types": "Checkbox,UnderlinedField"
}
200
{
"barcodes": [
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=34,Y=264,Width=526,Height=9}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=299,Width=534,Height=9}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=327,Width=132,Height=9}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=327,Width=132,Height=9}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=352,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=352,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=373,Width=132,Height=5}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=373,Width=132,Height=5}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=394,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=394,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=416,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=416,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=30,Y=433,Width=132,Height=9}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
},
{
"Value": "box",
"RawData": "",
"Type": 53,
"Rect": "{X=298,Y=437,Width=132,Height=6}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "UnderlinedField"
}
],
"pageCount": 1,
"error": false,
"status": 200,
"remainingCredits": 99264055,
"credits": 35
}
Other marks such as ardio-buttons are supported, see /41-1-optical-marks-reader-checkboxes-radiobutton-fillable-fields-segments-etc for more details.
Checkbox grouping:
We don't support checkbox grouping at the moment. However, if the order is visually the same, then the order in the output will be the same for documents with a similar layout.