New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

docrectifier4nodejs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docrectifier4nodejs

Node.js bindings to Dynamsoft Document Normalizer C/C++ SDK.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Document Rectification

The Node.js Document Rectification SDK is a Node binding to Dynamsoft Label Recognizer C++ SDK. It helps developers build Node.js applications for document rectification on Windows and Linux.

License Key

Get a 30-day FREE trial license to activate the SDK.

Pre-requisites

  • Node.js

  • Platform-specific C/C++ compiler

  • node-gyp

    npm i node-gyp -g
    

Supported Platforms

  • Windows
  • Linux

Quick Start

Set the LICENSE-KEY and specify the image-file in the code below:

const DocRectifier = require('docrectifier4nodejs');
DocRectifier.initLicense('LICENSE-KEY');

var obj = new DocRectifier();
(async function () {
try {
    obj.setParameters(DocRectifier.Template.color);
    let results = await obj.detectFileAsync('image-file');
    let result = results[0];
    result = await obj.normalizeFileAsync('image-file', result['x1'], result['y1'], result['x2'], result['y2'], result['x3'], result['y3'], result['x4'], result['y4']);
    obj.save('test.png');
} catch (error) {
    console.log(error);
}
})();

API

  • initLicense(licenseKey)
  • setParameters(template)
  • getParameters()
  • detectFileAsync(imageFile, callback)
  • detectBufferAsync(imageBuffer, width, height, stride, callback)
  • normalizeFileAsync(imageFile, x1, y1, x2, y2, x3, y3, x4, y4, callback)
  • normalizeBufferAsync(imageBuffer, width, height, stride, x1, y1, x2, y2, x3, y3, x4, y4, callback)
  • save(imageFile)

Examples

Keywords

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc