]> git.parisson.com Git - pdf.js.git/commitdiff
More fix to handle some others invert leading cases in PDF32000.pdf
authorVivien Nicolas <21@vingtetun.org>
Mon, 25 Jul 2011 16:17:56 +0000 (18:17 +0200)
committerVivien Nicolas <21@vingtetun.org>
Mon, 25 Jul 2011 16:17:56 +0000 (18:17 +0200)
pdf.js

diff --git a/pdf.js b/pdf.js
index e388fc49981f93ec04762a2af2df2d007abbd59b..4bed1a8515b28b097fe78911ae105d13b26ca797 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4142,7 +4142,7 @@ var CanvasGraphics = (function() {
       this.current.textHScale = scale / 100;
     },
     setLeading: function(leading) {
-      this.current.leading = leading;
+      this.current.leading = -leading;
     },
     setFont: function(fontRef, size) {
       var font = this.xref.fetchIfRef(this.res.get('Font'));
@@ -4194,7 +4194,7 @@ var CanvasGraphics = (function() {
       }
     },
     setLeadingMoveText: function(x, y) {
-      this.setLeading(y);
+      this.setLeading(-y);
       this.moveText(x, y);
     },
     setTextMatrix: function(a, b, c, d, e, f) {
@@ -4207,7 +4207,7 @@ var CanvasGraphics = (function() {
       this.current.y = this.current.lineY = 0;
     },
     nextLine: function() {
-      this.moveText(0, -this.current.leading);
+      this.moveText(0, this.current.leading);
     },
     showText: function(text) {
       // TODO: apply charSpacing, wordSpacing, textHScale