Barcode Generator
Generate high quality barcode images. Supports QR Code, Datamatrix, Code 39, Code 128, PDF417 and many other barcode types.
Available Methods
- [POST] /barcode/generate
- [POST] /barcode/generate (qr code)
- [POST] /barcode/generate (qr code with logo inside)
- [POST] /barcode/generate (datauri as output)
[POST] /barcode/generate
Attributes |
---|
value required Set the string value to encode inside the barcode. Must be in a “string” format. |
type optional Set the barcode type, QRCode By default.supported barcode types: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14, GS1_QRCode, PharmaCode |
name optional File name for the generated output. Must be in a “string” format. |
expiration optional Output link expiration in minutes. The default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage.Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead. |
inline optional Must be one of: true to return data as inline or false to return the link to the output file (default). |
decorationImage optional, QR-Code only Set this to the image that you want to be inserted the logo inside the QR-Code barcode. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
async optional Runs processing asynchronously and returns JobId that you may use with /job/check to check the state of the processing (possible states: working , failed , aborted and success ). Must be one of: true , or false . |
profiles optional Use this parameter to set additional configurations for fine-tuning and extra options. Must be in a “string” format. Explore PDF.co knowledgebase for profile examples. |
- Method: POST
- URL: /v1/barcode/generate
Query parameters
No query parameters accepted.
Body payload
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"async": false
}
Example responses
/barcode/generate
{
"url": "https://pdf-temp-files.s3.amazonaws.com/9a87556a8b9e4f4eae60843e697250d4/barcode.png",
"error": false,
"status": 200,
"name": "barcode.png",
"remainingCredits": 60631
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"async": false
}'
[POST] /barcode/generate (qr code)
Attributes |
---|
value required Set the string value to encode inside the barcode. Must be in a “string” format. |
type optional Set the barcode type, Must be in a “string” format. QRCode By default.supported barcode types: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14, GS1_QRCode, PharmaCode |
name optional File name for the generated output. Must be in a “string” format. |
expiration optional Output link expiration in minutes. The default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage.Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead. |
inline optional Must be one of: true to return data as inline or false to return the link to the output file (default). |
decorationImage optional, QR-Code only Set this to the image that you want to be inserted the logo inside the QR-Code barcode. To use your file please upload it first to the temporary storage, see the Upload and Manage Files section below to learn how to do it. |
profiles optional Use this parameter to set additional configurations for fine-tuning and extra options. Must be in a “string” format. Explore PDF.co knowledgebase for profile examples. |
- Method: POST
- URL: /v1/barcode/generate
Query parameters
No query parameters accepted.
Body payload
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"async": false
}
Example responses
/barcode/generate (qr code)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/72bc579b37844d9f9e63ce06de5196d8/barcode.png",
"error": false,
"status": 200,
"name": "barcode.png",
"duration": 380,
"remainingCredits": 98725598,
"credits": 7
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"async": false
}'
[POST] /barcode/generate (qr code with logo inside)
Attributes |
---|
value required Set the string value to encode inside the barcode. Must be in a “string” format. |
type optional Set the barcode type, Must be in a “string” format. QRCode By default.supported barcode types: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14, GS1_QRCode, PharmaCode |
name optional File name for the generated output. Must be in a “string” format. |
expiration optional Output link expiration in minutes. The default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage.Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead. |
inline optional Must be one of: true to return data as inline or false to return a link to the output file (default). |
decorationImage optional, QR-Code only Set this to the image that you want to be inserted the logo inside the QR-Code barcode. To use your file please upload it first to the temporary storage, see the Upload and Manage Files section below to learn how to do it. |
profiles optional Use this parameter to set additional configurations for fine-tuning and extra options. Must be in a “string” format. Explore PDF.co knowledgebase for profile examples. |
- Method: POST
- URL: /v1/barcode/generate
Query parameters
No query parameters accepted.
Body payload
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"async": false,
"decorationImage": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/barcode-generator/logo.png"
}
Example responses
/barcode/generate
{
"url": "https://pdf-temp-files.s3.amazonaws.com/9a87556a8b9e4f4eae60843e697250d4/barcode.png",
"error": false,
"status": 200,
"name": "barcode.png",
"remainingCredits": 60631
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"async": false,
"decorationImage": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/barcode-generator/logo.png"
}'
[POST] /barcode/generate (datauri as output)
Attributes |
---|
value required Set the string value to encode inside the barcode. Must be in a “string” format. |
type optional Set the barcode type, Must be in a “string” format. QRCode By default.supported barcode types: Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417Truncated, DataMatrix, QRCode, Aztec, Planet, EAN128, GS1_128, USPSSackLabel, USPSTrayLabel, DeutschePostIdentcode, DeutschePostLeitcode, Numly, PZN, OpticalProduct, SwissPostParcel, RoyalMail, DutchKix, SingaporePostalCode, EAN2, EAN5, EAN14, MacroPDF417, MicroPDF417, GS1_DataMatrix, Telepen, IntelligentMail, GS1_DataBar_Omnidirectional, GS1_DataBar_Truncated, GS1_DataBar_Stacked, GS1_DataBar_Stacked_Omnidirectional, GS1_DataBar_Limited, GS1_DataBar_Expanded, GS1_DataBar_Expanded_Stacked, MaxiCode, Plessey, MSI, ITF14, GTIN12, GTIN8, GTIN13, GTIN14, GS1_QRCode, PharmaCode |
name optional File name for the generated output. Must be in a “string” format. |
expiration optional Output link expiration in minutes. The default is 60 (i.e. 60 minutes or 1 hour). After this delay generated output file(s) (if any) will be auto-removed from PDF.co temporary files storage.Max allowed expiration period depends on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf, documents), please use PDF.co built-in Files Storage instead. |
inline optional Must be one of: true to return data as inline or false to return link to the output file (default). |
decorationImage optional, QR-Code only Set this to the image that you want to be inserted the logo inside the QR-Code barcode. To use your file please upload it first to the temporary storage, see the Upload and Manage Files section below to learn how to do it. |
profiles optional Use this parameter to set additional configurations for fine-tuning and extra options. Must be in a “string” format. Explore PDF.co knowledgebase for profile examples. |
- Method: POST
- URL: /v1/barcode/generate
Query parameters
No query parameters accepted.
Body payload
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": true,
"async": false
}
Example responses
/barcode/generate (datauri as output)
{
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAOlSURBVHhe7ZBBimMxEMVy/0v34CELkSmBjH96NhaIwKtXlY9fP5fMfawN7mNtcB9rg/tYG9zH2kAf6/V6Pa5hHeaUTPNTjftYg8Z9rEEjPdYJdoc5JZaT0imUOzopywW7w5wSy0npFModnZTlgt1hTonlpHQK5Y5ObJm5SUpODe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UVORK5CYII=",
"error": false,
"status": 200,
"name": "barcode.png",
"duration": 298,
"remainingCredits": 98725605,
"credits": 7
}
Code Snippet
CURL
curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ' \
--data-raw '{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": true,
"async": false
}'
Samples
- AWS Lambda - Generate Barcode (Node.js)
- C# - Generate Barcode
- C# - QR Code With Redundancy Setting
- Delphi - Generate Barcode
- Java - Generate Barcode
- Java - QR Code With Redundancy Setting
- JavaScript - Generate Barcode
- JavaScript - Generate Barcode (JQuery)
- JavaScript - Generate Barcode (JQuery) - Async API
- JavaScript - Generate Barcode (Node.js)
- JavaScript - Generate Barcode (Node.js) - Async API
- JavaScript - Generate Barcode - Async API
- JavaScript - QR Code With Redundancy Setting
- PHP - Generate Barcode
- PHP - QR Code With Redundancy Setting
- PowerShell - Generate Barcode
- PowerShell - QR Code With Redundancy Setting
- Python - Generate Barcode
- Python - QR Code With Redundancy Setting
- VB.NET - Generate Barcode
- VB.NET - QR Code With Redundancy Setting
- Zapier - Generate Barcode and Save to Dropbox
- cURL - Generate Barcode
Copyright © 2016 - 2023 PDF.co