Merge branch 'master' of git://github.com/mozilla/pdf.js.git into textsearch-1
This commit is contained in:
commit
739f111ce1
@ -255,6 +255,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||||||
}
|
}
|
||||||
// Scale so that canvas units are the same as PDF user space units
|
// Scale so that canvas units are the same as PDF user space units
|
||||||
this.ctx.scale(cw / mediaBox.width, ch / mediaBox.height);
|
this.ctx.scale(cw / mediaBox.width, ch / mediaBox.height);
|
||||||
|
// Move the media left-top corner to the (0,0) canvas position
|
||||||
|
this.ctx.translate(-mediaBox.x, -mediaBox.y);
|
||||||
this.textDivs = [];
|
this.textDivs = [];
|
||||||
this.textLayerQueue = [];
|
this.textLayerQueue = [];
|
||||||
},
|
},
|
||||||
|
@ -110,9 +110,11 @@ var Page = (function PageClosure() {
|
|||||||
width: this.width,
|
width: this.width,
|
||||||
height: this.height
|
height: this.height
|
||||||
};
|
};
|
||||||
|
var mediaBox = this.mediaBox;
|
||||||
|
var offsetX = mediaBox[0], offsetY = mediaBox[1];
|
||||||
if (isArray(obj) && obj.length == 4) {
|
if (isArray(obj) && obj.length == 4) {
|
||||||
var tl = this.rotatePoint(obj[0], obj[1]);
|
var tl = this.rotatePoint(obj[0] - offsetX, obj[1] - offsetY);
|
||||||
var br = this.rotatePoint(obj[2], obj[3]);
|
var br = this.rotatePoint(obj[2] - offsetX, obj[3] - offsetY);
|
||||||
view.x = Math.min(tl.x, br.x);
|
view.x = Math.min(tl.x, br.x);
|
||||||
view.y = Math.min(tl.y, br.y);
|
view.y = Math.min(tl.y, br.y);
|
||||||
view.width = Math.abs(tl.x - br.x);
|
view.width = Math.abs(tl.x - br.x);
|
||||||
|
@ -270,7 +270,6 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||||||
|
|
||||||
constructStiched: function pdfFunctionConstructStiched(fn, dict, xref) {
|
constructStiched: function pdfFunctionConstructStiched(fn, dict, xref) {
|
||||||
var domain = dict.get('Domain');
|
var domain = dict.get('Domain');
|
||||||
var range = dict.get('Range');
|
|
||||||
|
|
||||||
if (!domain)
|
if (!domain)
|
||||||
error('No domain');
|
error('No domain');
|
||||||
@ -279,13 +278,13 @@ var PDFFunction = (function PDFFunctionClosure() {
|
|||||||
if (inputSize != 1)
|
if (inputSize != 1)
|
||||||
error('Bad domain for stiched function');
|
error('Bad domain for stiched function');
|
||||||
|
|
||||||
var fnRefs = dict.get('Functions');
|
var fnRefs = xref.fetchIfRef(dict.get('Functions'));
|
||||||
var fns = [];
|
var fns = [];
|
||||||
for (var i = 0, ii = fnRefs.length; i < ii; ++i)
|
for (var i = 0, ii = fnRefs.length; i < ii; ++i)
|
||||||
fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
|
fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
|
||||||
|
|
||||||
var bounds = dict.get('Bounds');
|
var bounds = xref.fetchIfRef(dict.get('Bounds'));
|
||||||
var encode = dict.get('Encode');
|
var encode = xref.fetchIfRef(dict.get('Encode'));
|
||||||
|
|
||||||
return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
|
return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
|
||||||
},
|
},
|
||||||
|
1
test/pdfs/issue1001.pdf.link
Normal file
1
test/pdfs/issue1001.pdf.link
Normal file
@ -0,0 +1 @@
|
|||||||
|
http://www.myhillsapartment.com/island_club/floorplans/images/links/Island_IC_brochure.pdf
|
@ -356,6 +356,13 @@
|
|||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue1001",
|
||||||
|
"file": "pdfs/issue1001.pdf",
|
||||||
|
"md5": "0f1496e80a82a923e91d9e74c55ad94e",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": true,
|
||||||
|
"type": "eq"
|
||||||
|
},
|
||||||
{ "id": "aboutstacks",
|
{ "id": "aboutstacks",
|
||||||
"file": "pdfs/aboutstacks.pdf",
|
"file": "pdfs/aboutstacks.pdf",
|
||||||
"md5": "6e7c8416a293ba2d83bc8dd20c6ccf51",
|
"md5": "6e7c8416a293ba2d83bc8dd20c6ccf51",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user