Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pdf2json

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pdf2json - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

5

lib/pdffill.js

@@ -42,2 +42,7 @@ var nodeUtil = require("util"),

//MQZ.07/29/2013: when color is not in color dictionary, set the original color (oc)
if (clrId < 0) {
oneFill = _.extend({oc: this.color}, oneFill);
}
targetData.Fills.push(oneFill);

@@ -44,0 +49,0 @@ };

10

lib/pdffont.js

@@ -260,6 +260,8 @@ var nodeUtil = require("util"),

var clrId = PDFUnit.findColorIndex(color);
var oneText = {x: PDFUnit.toFormX(p.x) - 0.25,
y: PDFUnit.toFormY(p.y) - 0.75,
w: maxWidth,
clr: PDFUnit.findColorIndex(color),
clr: clrId,
A: "left",

@@ -272,2 +274,8 @@ R: [{

};
//MQZ.07/29/2013: when color is not in color dictionary, set the original color (oc)
if (clrId < 0) {
oneText = _.extend({oc: color}, oneText);
}
var rAngle = _textRotationAngle.call(this, matrix2D);

@@ -274,0 +282,0 @@ if (rAngle != 0) {

8

lib/pdfunit.js

@@ -109,8 +109,4 @@ var nodeUtil = require("util"),

color += "000";
var idx = kColors.indexOf(color);
if (idx < 0) {
idx = 7;
// nodeUtil.log("Reaplcing new color (" + color + ") with color (" + idx + ") = " + kColors[idx]);
}
return idx;
//MQZ. 07/29/2013: if color is not in dictionary, just return -1. The caller (pdffont, pdffill) will set the actual color
return kColors.indexOf(color);
};

@@ -117,0 +113,0 @@

{
"name": "pdf2json",
"_id": "pdf2json@0.3.6",
"version": "0.3.6",
"_id": "pdf2json@0.3.7",
"version": "0.3.7",
"description": "A PDF file parser that converts PDF binaries to text based JSON, powered by porting a fork of PDF.JS to Node.js",

@@ -6,0 +6,0 @@ "keywords": [

@@ -101,3 +101,2 @@ Introduction

var kColors = [

@@ -482,2 +481,4 @@ '#000000', // 0

Note: (v0.3.7) When a color is not in style dictionary, "clr" value will be set to -1. Item's (fills and text) original color in hex string format will be added to "oc" field. In other word, "oc" only exists if and only if "clr" is -1;
Rotated Text Support

@@ -484,0 +485,0 @@ =====

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