Browse Source

Ensure that the clipping path is reset when the state is restored (issue 6413)

According to the specification, see `NOTE 2` in http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.3882161, it appears that we should ensure that the clipping path is reset when the restore (`Q`) operator is encountered.

Fixes 6413.
Jonas Jenwald 10 years ago
parent
commit
cfd5a64df5
  1. 3
      src/display/canvas.js

3
src/display/canvas.js

@ -970,6 +970,9 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { @@ -970,6 +970,9 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
this.current = this.stateStack.pop();
this.ctx.restore();
// Ensure that the clipping path is reset (fixes issue6413.pdf).
this.pendingClip = null;
this.cachedGetSinglePixelWidth = null;
}
},

Loading…
Cancel
Save