Comparing version 0.3.6 to 0.3.7
@@ -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 @@ }; |
@@ -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) { |
@@ -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 @@ ===== |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3254380
35676
605