Forráskód Böngészése

PDF.js version 1.0.684

Yury Delendik 10 éve
szülő
commit
367494943f
5 módosított fájl, 42 hozzáadás és 20 törlés
  1. 1 1
      bower.json
  2. 19 8
      build/pdf.combined.js
  3. 19 8
      build/pdf.js
  4. 2 2
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.0.682",
+  "version": "1.0.684",
   "keywords": [
     "Mozilla",
     "pdf",

+ 19 - 8
build/pdf.combined.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.682';
-PDFJS.build = '9b3c96d';
+PDFJS.version = '1.0.684';
+PDFJS.build = '5eb6a35';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -6451,6 +6451,12 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
 PDFJS.AnnotationUtils = AnnotationUtils;
 
 
+var SVG_DEFAULTS = {
+  fontStyle: 'normal',
+  fontWeight: 'normal',
+  fillColor: '#000000'
+};
+
 var convertImgDataToPng = (function convertImgDataToPngClosure() {
   var PNG_HEADER =
     new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
@@ -6646,7 +6652,7 @@ var convertImgDataToPng = (function convertImgDataToPngClosure() {
 var SVGExtraState = (function SVGExtraStateClosure() {
   function SVGExtraState() {
     this.fontSizeScale = 1;
-    this.fontWeight = 'normal';
+    this.fontWeight = SVG_DEFAULTS.fontWeight;
     this.fontSize = 0;
 
     this.textMatrix = IDENTITY_MATRIX;
@@ -6668,7 +6674,7 @@ var SVGExtraState = (function SVGExtraStateClosure() {
     this.textRise = 0;
 
     // Default foreground and background colors
-    this.fillColor = '#000000';
+    this.fillColor = SVG_DEFAULTS.fillColor;
     this.strokeColor = '#000000';
 
     this.fillAlpha = 1;
@@ -7142,10 +7148,15 @@ var SVGGraphics = (function SVGGraphicsClosure() {
       current.tspan.setAttributeNS(null, 'font-family', current.fontFamily);
       current.tspan.setAttributeNS(null, 'font-size',
                                    pf(current.fontSize) + 'px');
-      current.tspan.setAttributeNS(null, 'font-style', current.fontStyle);
-      current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight);
-      current.tspan.setAttributeNS(null, 'stroke', 'none');
-      current.tspan.setAttributeNS(null, 'fill', current.fillColor);
+      if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {
+        current.tspan.setAttributeNS(null, 'font-style', current.fontStyle);
+      }
+      if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {
+        current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight);
+      }
+      if (current.fillColor !== SVG_DEFAULTS.fillColor) {
+        current.tspan.setAttributeNS(null, 'fill', current.fillColor);
+      }
 
       current.txtElement.setAttributeNS(null, 'transform',
                                         pm(current.textMatrix) +

+ 19 - 8
build/pdf.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.682';
-PDFJS.build = '9b3c96d';
+PDFJS.version = '1.0.684';
+PDFJS.build = '5eb6a35';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it
@@ -6495,6 +6495,12 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
 PDFJS.AnnotationUtils = AnnotationUtils;
 
 
+var SVG_DEFAULTS = {
+  fontStyle: 'normal',
+  fontWeight: 'normal',
+  fillColor: '#000000'
+};
+
 var convertImgDataToPng = (function convertImgDataToPngClosure() {
   var PNG_HEADER =
     new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
@@ -6690,7 +6696,7 @@ var convertImgDataToPng = (function convertImgDataToPngClosure() {
 var SVGExtraState = (function SVGExtraStateClosure() {
   function SVGExtraState() {
     this.fontSizeScale = 1;
-    this.fontWeight = 'normal';
+    this.fontWeight = SVG_DEFAULTS.fontWeight;
     this.fontSize = 0;
 
     this.textMatrix = IDENTITY_MATRIX;
@@ -6712,7 +6718,7 @@ var SVGExtraState = (function SVGExtraStateClosure() {
     this.textRise = 0;
 
     // Default foreground and background colors
-    this.fillColor = '#000000';
+    this.fillColor = SVG_DEFAULTS.fillColor;
     this.strokeColor = '#000000';
 
     this.fillAlpha = 1;
@@ -7186,10 +7192,15 @@ var SVGGraphics = (function SVGGraphicsClosure() {
       current.tspan.setAttributeNS(null, 'font-family', current.fontFamily);
       current.tspan.setAttributeNS(null, 'font-size',
                                    pf(current.fontSize) + 'px');
-      current.tspan.setAttributeNS(null, 'font-style', current.fontStyle);
-      current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight);
-      current.tspan.setAttributeNS(null, 'stroke', 'none');
-      current.tspan.setAttributeNS(null, 'fill', current.fillColor);
+      if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {
+        current.tspan.setAttributeNS(null, 'font-style', current.fontStyle);
+      }
+      if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {
+        current.tspan.setAttributeNS(null, 'font-weight', current.fontWeight);
+      }
+      if (current.fillColor !== SVG_DEFAULTS.fillColor) {
+        current.tspan.setAttributeNS(null, 'fill', current.fillColor);
+      }
 
       current.txtElement.setAttributeNS(null, 'transform',
                                         pm(current.textMatrix) +

+ 2 - 2
build/pdf.worker.js

@@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
   (typeof window !== 'undefined' ? window : this).PDFJS = {};
 }
 
-PDFJS.version = '1.0.682';
-PDFJS.build = '9b3c96d';
+PDFJS.version = '1.0.684';
+PDFJS.build = '5eb6a35';
 
 (function pdfjsWrapper() {
   // Use strict in our context only - users might not want it

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.0.682",
+  "version": "1.0.684",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [
     "Mozilla",