pdf.js-extract
Advanced tools
Comparing version 0.1.0 to 0.1.1
const fs = require('fs'); | ||
const path = require('path'); | ||
const utils = require('./utils.js'); | ||
const LocalCMapReaderFactory = require('./cmap-reader.js'); | ||
// HACK few hacks to let PDF.js be loaded not as a module in global space. | ||
@@ -34,2 +36,11 @@ require('./pdfjs/domstubs.js').setStubs(global); | ||
} | ||
if (options.cMapUrl === undefined) { | ||
options.cMapUrl = path.join(__dirname, './cmaps/'); // trailing path delimiter is important | ||
} | ||
if (options.cMapPacked === undefined) { | ||
options.cMapPacked = true; | ||
} | ||
if (options.CMapReaderFactory === undefined) { | ||
options.CMapReaderFactory = LocalCMapReaderFactory; | ||
} | ||
options.data = new Uint8Array(buffer); | ||
@@ -36,0 +47,0 @@ const pdf = { |
{ | ||
"version": "2.0.919", | ||
"build": 919, | ||
"commit": "f45e46d7" | ||
"version": "2.1.54", | ||
"build": 54, | ||
"commit": "960213cb" | ||
} |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"author": { | ||
@@ -43,7 +43,7 @@ "name": "ffalt" | ||
"devDependencies": { | ||
"@types/node": "^10.11.5", | ||
"@types/node": "^10.12.6", | ||
"chai": "^4.2.0", | ||
"chai-exclude": "^1.0.9", | ||
"chai-exclude": "^1.0.10", | ||
"mocha": "^5.2.0" | ||
} | ||
} |
@@ -18,3 +18,5 @@ # pdf.js-extract | ||
[](https://travis-ci.org/ffalt/pdf.js-extract) | ||
[](http://opensource.org/licenses/MIT) [](https://github.com/ffalt/pdf.js-extract) [](https://greenkeeper.io/) | ||
[](http://opensource.org/licenses/MIT) | ||
[](https://github.com/ffalt/pdf.js-extract) | ||
[](https://greenkeeper.io/) | ||
@@ -25,2 +27,3 @@ ## Convenience API | ||
const PDFExtract = require('pdf.js-extract').PDFExtract; | ||
// import {PDFExtract} from 'pdf.js-extract'; // or with typescript | ||
const pdfExtract = new PDFExtract(); | ||
@@ -27,0 +30,0 @@ const options = {}; /* see below */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
3460390
183
64924
96
2
80
5