bytescout
v1.0.1541753048
Published
ERROR_UNKNOWN
Downloads
3
Readme
bytescout
ByteScout NPM package - JavaScript client for powerful ByteScout Cloud API
ByteScout Cloud API is the set of secure and scalable cloud functions designed for structured data extraction, documents and data manipulation.
You may read and extract data from:
- invoices, statements, receipts in pdf or scanned images
- spreadsheets and documents in xlsx, xlsx, doc formats
- scanned images with text and objects
- photos or scans of barcodes (from Code 39, Code 128 to QR Code and Datamatrix)
You may also:
- generate full featured pdf documents from html, doc, docx
- create and convert spreadsheets and csv files
- generate standalone high-quality Code 39, code 128, QR Code, PDF417, Datamatrix barcodes and optionally add stamp them into pdf or images
- split pdf, merge pdf, re-arrange pdf pages, add text and images into existing pdf files
You may create new pdf, addi image, signature and text to PDF, use OCR (optical character recognition) to extract text from images and scans. You may also generate and read barcodes from images and PDF. Supports Code 39, Code 128, UPC, UPCA, QR Code, Datamatrix, PDF417 and other barcode types.
API key is required: Sign Up for Free Trial
On-premise self-hosted versions are also available at or www.bytescout.com:
- API version: 2017-05-31T18:43:35Z
- Package version: 2017-05-31T18:43:35Z
Installation
For Node.js
Install it via:
npm install bytescout --save
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing
into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
Finally, switch to the directory you want to use your bytescout from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
You should now be able to require('bytescout')
in javascript files from the directory you ran the last
command above from.
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually
use this library):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var bytescout = require('bytescout');
var defaultClient = bytescout.ApiClient.instance;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['x-api-key'] = "Token"
var api = new bytescout.DefaultApi()
var opts = {
'async': "async_example", // {String} Run processing asynchronously. Returns JobId that you may use with /job/check to check state of the processing (possible states: InProgress, Failed, Aborted and Finished)
'encrypt': "encrypt_example", // {String}
'value': "value_example", // {String} Barcode value.
'name': "name_example", // {String} Filename for the generated image.
'type': "type_example" // {String} Barcode type. Valid values: 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.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.barcodeGenerateGet(opts, callback);
Documentation for API Endpoints
All URIs are relative to https://bytescout.io/v1
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- bytescout.DefaultApi | barcodeGenerateGet | GET /barcode/generate | bytescout.DefaultApi | barcodeGenerateOptions | OPTIONS /barcode/generate | bytescout.DefaultApi | barcodeGeneratePost | POST /barcode/generate | bytescout.DefaultApi | barcodeReadFromUrlGet | GET /barcode/read/from/url | bytescout.DefaultApi | barcodeReadFromUrlOptions | OPTIONS /barcode/read/from/url | bytescout.DefaultApi | barcodeReadFromUrlPost | POST /barcode/read/from/url | bytescout.DefaultApi | fileHashGet | GET /file/hash | bytescout.DefaultApi | fileHashOptions | OPTIONS /file/hash | bytescout.DefaultApi | fileHashPost | POST /file/hash | bytescout.DefaultApi | fileUploadBase64Options | OPTIONS /file/upload/base64 | bytescout.DefaultApi | fileUploadBase64Post | POST /file/upload/base64 | bytescout.DefaultApi | fileUploadGetPresignedUrlGet | GET /file/upload/get-presigned-url | bytescout.DefaultApi | fileUploadGetPresignedUrlOptions | OPTIONS /file/upload/get-presigned-url | bytescout.DefaultApi | fileUploadUrlGet | GET /file/upload/url | bytescout.DefaultApi | fileUploadUrlOptions | OPTIONS /file/upload/url | bytescout.DefaultApi | fileUploadUrlPost | POST /file/upload/url | bytescout.DefaultApi | jobCheckGet | GET /job/check | bytescout.DefaultApi | jobCheckOptions | OPTIONS /job/check | bytescout.DefaultApi | jobCheckPost | POST /job/check | bytescout.DefaultApi | pdfConvertFromCsvGet | GET /pdf/convert/from/csv | bytescout.DefaultApi | pdfConvertFromCsvOptions | OPTIONS /pdf/convert/from/csv | bytescout.DefaultApi | pdfConvertFromCsvPost | POST /pdf/convert/from/csv | bytescout.DefaultApi | pdfConvertFromDocGet | GET /pdf/convert/from/doc | bytescout.DefaultApi | pdfConvertFromDocOptions | OPTIONS /pdf/convert/from/doc | bytescout.DefaultApi | pdfConvertFromDocPost | POST /pdf/convert/from/doc | bytescout.DefaultApi | pdfConvertFromHtmlOptions | OPTIONS /pdf/convert/from/html | bytescout.DefaultApi | pdfConvertFromHtmlPost | POST /pdf/convert/from/html | bytescout.DefaultApi | pdfConvertFromImageGet | GET /pdf/convert/from/image | bytescout.DefaultApi | pdfConvertFromImageOptions | OPTIONS /pdf/convert/from/image | bytescout.DefaultApi | pdfConvertFromImagePost | POST /pdf/convert/from/image | bytescout.DefaultApi | pdfConvertFromUrlGet | GET /pdf/convert/from/url | bytescout.DefaultApi | pdfConvertFromUrlOptions | OPTIONS /pdf/convert/from/url | bytescout.DefaultApi | pdfConvertFromUrlPost | POST /pdf/convert/from/url | bytescout.DefaultApi | pdfConvertToCsvGet | GET /pdf/convert/to/csv | bytescout.DefaultApi | pdfConvertToCsvOptions | OPTIONS /pdf/convert/to/csv | bytescout.DefaultApi | pdfConvertToCsvPost | POST /pdf/convert/to/csv | bytescout.DefaultApi | pdfConvertToHtmlGet | GET /pdf/convert/to/html | bytescout.DefaultApi | pdfConvertToHtmlOptions | OPTIONS /pdf/convert/to/html | bytescout.DefaultApi | pdfConvertToHtmlPost | POST /pdf/convert/to/html | bytescout.DefaultApi | pdfConvertToJpgGet | GET /pdf/convert/to/jpg | bytescout.DefaultApi | pdfConvertToJpgOptions | OPTIONS /pdf/convert/to/jpg | bytescout.DefaultApi | pdfConvertToJpgPost | POST /pdf/convert/to/jpg | bytescout.DefaultApi | pdfConvertToJsonGet | GET /pdf/convert/to/json | bytescout.DefaultApi | pdfConvertToJsonOptions | OPTIONS /pdf/convert/to/json | bytescout.DefaultApi | pdfConvertToJsonPost | POST /pdf/convert/to/json | bytescout.DefaultApi | pdfConvertToPngGet | GET /pdf/convert/to/png | bytescout.DefaultApi | pdfConvertToPngOptions | OPTIONS /pdf/convert/to/png | bytescout.DefaultApi | pdfConvertToPngPost | POST /pdf/convert/to/png | bytescout.DefaultApi | pdfConvertToTextGet | GET /pdf/convert/to/text | bytescout.DefaultApi | pdfConvertToTextOptions | OPTIONS /pdf/convert/to/text | bytescout.DefaultApi | pdfConvertToTextPost | POST /pdf/convert/to/text | bytescout.DefaultApi | pdfConvertToTiffGet | GET /pdf/convert/to/tiff | bytescout.DefaultApi | pdfConvertToTiffOptions | OPTIONS /pdf/convert/to/tiff | bytescout.DefaultApi | pdfConvertToTiffPost | POST /pdf/convert/to/tiff | bytescout.DefaultApi | pdfConvertToXlsGet | GET /pdf/convert/to/xls | bytescout.DefaultApi | pdfConvertToXlsOptions | OPTIONS /pdf/convert/to/xls | bytescout.DefaultApi | pdfConvertToXlsPost | POST /pdf/convert/to/xls | bytescout.DefaultApi | pdfConvertToXlsxGet | GET /pdf/convert/to/xlsx | bytescout.DefaultApi | pdfConvertToXlsxOptions | OPTIONS /pdf/convert/to/xlsx | bytescout.DefaultApi | pdfConvertToXlsxPost | POST /pdf/convert/to/xlsx | bytescout.DefaultApi | pdfConvertToXmlGet | GET /pdf/convert/to/xml | bytescout.DefaultApi | pdfConvertToXmlOptions | OPTIONS /pdf/convert/to/xml | bytescout.DefaultApi | pdfConvertToXmlPost | POST /pdf/convert/to/xml | bytescout.DefaultApi | pdfDocumentparserGet | GET /pdf/documentparser | bytescout.DefaultApi | pdfDocumentparserOptions | OPTIONS /pdf/documentparser | bytescout.DefaultApi | pdfDocumentparserPost | POST /pdf/documentparser | bytescout.DefaultApi | pdfEditAddGet | GET /pdf/edit/add | bytescout.DefaultApi | pdfEditAddOptions | OPTIONS /pdf/edit/add | bytescout.DefaultApi | pdfEditAddPost | POST /pdf/edit/add | bytescout.DefaultApi | pdfEditOptions | OPTIONS /pdf/edit | bytescout.DefaultApi | pdfInfoGet | GET /pdf/info | bytescout.DefaultApi | pdfInfoOptions | OPTIONS /pdf/info | bytescout.DefaultApi | pdfInfoPost | POST /pdf/info | bytescout.DefaultApi | pdfInvoiceparserGet | GET /pdf/invoiceparser | bytescout.DefaultApi | pdfInvoiceparserOptions | OPTIONS /pdf/invoiceparser | bytescout.DefaultApi | pdfInvoiceparserPost | POST /pdf/invoiceparser | bytescout.DefaultApi | pdfMakesearchableGet | GET /pdf/makesearchable | bytescout.DefaultApi | pdfMakesearchableOptions | OPTIONS /pdf/makesearchable | bytescout.DefaultApi | pdfMakesearchablePost | POST /pdf/makesearchable | bytescout.DefaultApi | pdfMergeGet | GET /pdf/merge | bytescout.DefaultApi | pdfMergeOptions | OPTIONS /pdf/merge | bytescout.DefaultApi | pdfMergePost | POST /pdf/merge | bytescout.DefaultApi | pdfOptimizeGet | GET /pdf/optimize | bytescout.DefaultApi | pdfOptimizeOptions | OPTIONS /pdf/optimize | bytescout.DefaultApi | pdfOptimizePost | POST /pdf/optimize | bytescout.DefaultApi | pdfSignGet | GET /pdf/sign | bytescout.DefaultApi | pdfSignOptions | OPTIONS /pdf/sign | bytescout.DefaultApi | pdfSignPost | POST /pdf/sign | bytescout.DefaultApi | pdfSplitGet | GET /pdf/split | bytescout.DefaultApi | pdfSplitOptions | OPTIONS /pdf/split | bytescout.DefaultApi | pdfSplitPost | POST /pdf/split | bytescout.DefaultApi | urlConvertOptions | OPTIONS /url/convert | bytescout.DefaultApi | urlConvertToJpgGet | GET /url/convert/to/jpg | bytescout.DefaultApi | urlConvertToJpgOptions | OPTIONS /url/convert/to/jpg | bytescout.DefaultApi | urlConvertToJpgPost | POST /url/convert/to/jpg | bytescout.DefaultApi | urlConvertToOptions | OPTIONS /url/convert/to | bytescout.DefaultApi | urlConvertToPngGet | GET /url/convert/to/png | bytescout.DefaultApi | urlConvertToPngOptions | OPTIONS /url/convert/to/png | bytescout.DefaultApi | urlConvertToPngPost | POST /url/convert/to/png | bytescout.DefaultApi | urlOptions | OPTIONS /url | bytescout.DefaultApi | xlsConvertOptions | OPTIONS /xls/convert | bytescout.DefaultApi | xlsConvertToCsvGet | GET /xls/convert/to/csv | bytescout.DefaultApi | xlsConvertToCsvOptions | OPTIONS /xls/convert/to/csv | bytescout.DefaultApi | xlsConvertToCsvPost | POST /xls/convert/to/csv | bytescout.DefaultApi | xlsConvertToHtmlGet | GET /xls/convert/to/html | bytescout.DefaultApi | xlsConvertToHtmlOptions | OPTIONS /xls/convert/to/html | bytescout.DefaultApi | xlsConvertToHtmlPost | POST /xls/convert/to/html | bytescout.DefaultApi | xlsConvertToJsonGet | GET /xls/convert/to/json | bytescout.DefaultApi | xlsConvertToJsonOptions | OPTIONS /xls/convert/to/json | bytescout.DefaultApi | xlsConvertToJsonPost | POST /xls/convert/to/json | bytescout.DefaultApi | xlsConvertToOptions | OPTIONS /xls/convert/to | bytescout.DefaultApi | xlsConvertToPdfGet | GET /xls/convert/to/pdf | bytescout.DefaultApi | xlsConvertToPdfOptions | OPTIONS /xls/convert/to/pdf | bytescout.DefaultApi | xlsConvertToPdfPost | POST /xls/convert/to/pdf | bytescout.DefaultApi | xlsOptions | OPTIONS /xls |
Documentation for Models
- bytescout.BarcodeReaderResponseModel
- bytescout.BarcodeReaderResponseModelBarcodes
- bytescout.Empty
- bytescout.FileHashResponseModel
- bytescout.FileUploadBase64RequestModel
- bytescout.HtmlToPdfRequestModel
- bytescout.JobHashSingleResponseModel
- bytescout.JobMultiResponseModel
- bytescout.JobSingleResponseModel
- bytescout.JobStatusResponseModel
- bytescout.MultiResponseModel
- bytescout.PdfInfoResponseModel
- bytescout.PdfInfoResponseModelInfo
- bytescout.PdfSignRequestModel
- bytescout.PdfSignRequestModelAnnotations
- bytescout.PdfSignRequestModelCertificate
- bytescout.PdfSignRequestModelCertificateAudit
- bytescout.PdfSignRequestModelCertificateParties
- bytescout.PdfSignRequestModelImages
- bytescout.PresignedUrlResponseModel
- bytescout.SingleResponseModel
- bytescout.UrlToPdfRequestModel
Documentation for Authorization
api_key
- Type: API key
- API key parameter name: x-api-key
- Location: HTTP header