mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Don't double apply a group xobject's bbox.
In `beginGroup` we create a new canvas that is the size of the bounding box and we translate it to the offset. This means we don't need to also apply the bounding box during `paintFormXObjectBegin`. This improves #6961 quite a bit, but it still is missing the indention in the ruler.
This commit is contained in:
parent
30bd5f0a39
commit
8161d3f29d
2 changed files with 6 additions and 2 deletions
|
@ -527,7 +527,11 @@ class PartialEvaluator {
|
||||||
operatorList.addOp(OPS.beginGroup, [groupOptions]);
|
operatorList.addOp(OPS.beginGroup, [groupOptions]);
|
||||||
}
|
}
|
||||||
|
|
||||||
operatorList.addOp(OPS.paintFormXObjectBegin, [matrix, bbox]);
|
// If it's a group, a new canvas will be created that is the size of the
|
||||||
|
// bounding box and translated to the correct position so we don't need to
|
||||||
|
// apply the bounding box to it.
|
||||||
|
const args = group ? [matrix, null] : [matrix, bbox];
|
||||||
|
operatorList.addOp(OPS.paintFormXObjectBegin, args);
|
||||||
|
|
||||||
return this.getOperatorList({
|
return this.getOperatorList({
|
||||||
stream: xobj,
|
stream: xobj,
|
||||||
|
|
|
@ -5922,7 +5922,7 @@
|
||||||
"link": false,
|
"link": false,
|
||||||
"rounds": 1,
|
"rounds": 1,
|
||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "load"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
{ "id": "zero_descent",
|
{ "id": "zero_descent",
|
||||||
"file": "pdfs/zero_descent.pdf",
|
"file": "pdfs/zero_descent.pdf",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue