Free plan
Read codes in a PDF
Read the QR codes and barcodes found on a PDF's pages
About this tool
This tool looks at the pages of a PDF, which can be a scan or a normal document, and reads every QR code and barcode it finds. It tells you what each code says and on which page it is. You can choose the pages and the types of code, and it can also look harder for small, turned or damaged codes, which takes more time.
For example, you read the tracking number from the barcode on a scanned shipping label.
How to use it
- Choose this tool.
- Add your PDF with Upload or drag and drop.
- Optionally choose the pages and the types of code to look for.
- Press Generate.
- Read or copy the codes from the result.
What you get back
You get a list of the codes found, with what each one says and the page it is on. You can copy it.
GOOD TO KNOW
A scanned page is read as a picture. Counts as one PDF operation.
TEST IT LIVE
Try Read codes in a PDF in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/decode-codes
Tool ID
pdfs.decode-codes
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/decode-codes" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'pages=1-3' \
-F 'dpi=200' \
-F 'formats=["example"]'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.decodeCodes({
"file": 'document.pdf',
"pages": "1-3",
"dpi": 200,
"formats": [
"example"
]
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->decodeCodes([
'file' => 'document.pdf',
'pages' => '1-3',
'dpi' => 200,
'formats' => ['example'],
]);
echo $result->requestId;More in PDFs
