
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
@pdftron/cad
Advanced tools
This package is meant to be used in conjunction with @pdftron/pdfnet-node to support CAD conversion from Apryse. Follow this guide for more info on usage. https://docs.apryse.com/documentation/core/guides/features/conversion/convert-cad-to-pdf/
For further reading checkout our blog post on the project. https://apryse.com/blog/conversion/converting-cad-to-pdf
This package depends on unmanaged add-on binaries, and the add-on binaries are not cross-platform. At the moment we have support for
Installation will fail if your OS, Node.js or Electron version is not supported.
Add the @pdftron/cad
package as a dependency in your package.json
Inside of your @pdftron/pdfnet-node code after initialization you should include the following line:
await PDFNet.addResourceSearchPath("./node_modules/@pdftron/cad/lib")
Here is an example of data extraction being used with this line.
const { PDFNet } = require('@pdftron/pdfnet-node');
const licenseKey = "Insert license key here"
const inputFile = "Insert input file location here"
async function main() {
// This is where we import data-extraction
await PDFNet.addResourceSearchPath("./node_modules/@pdftron/cad/lib")
const doc = await PDFNet.PDFDoc.create();
await PDFNet.Convert.fromCAD(doc, inputFile);
const outputFile = 'out/converted_cad.pdf';
await doc.save(outputFile, PDFNet.SDFDoc.SaveOptions.e_linearized);
}
PDFNet.runWithCleanup(main, licenseKey).catch(function (error) {
console.log('Error: ' + JSON.stringify(error));
}).then(function () { return PDFNet.shutdown(); });;
A larger code sample can be found here
To get started please see the documentation at https://www.pdftron.com/documentation/nodejs/get-started/integration.
Please go to https://docs.apryse.com/documentation/core/info/license/ to obtain a demo or production license.
FAQs
The Apryse SDK CAD Module.
The npm package @pdftron/cad receives a total of 48 weekly downloads. As such, @pdftron/cad popularity was classified as not popular.
We found that @pdftron/cad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.