From 56b9a3543dfd365fb065a85ac056d29064c72797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionu=C8=9B=20G=2E=20Stan?= Date: Thu, 27 Oct 2011 03:08:11 +0300 Subject: [PATCH] Close path in `closeFillStroke` and `closeEOFillStroke` See Chapter 4, page 230, Table 4.10 of the PDF specification. --- pdf.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdf.js b/pdf.js index 05a21538d..43df4a168 100644 --- a/pdf.js +++ b/pdf.js @@ -5643,10 +5643,12 @@ var CanvasGraphics = (function canvasGraphics() { this.restoreFillRule(savedFillRule); }, closeFillStroke: function canvasGraphicsCloseFillStroke() { - return this.fillStroke(); + this.closePath(); + this.fillStroke(); }, closeEOFillStroke: function canvasGraphicsCloseEOFillStroke() { var savedFillRule = this.setEOFillRule(); + this.closePath(); this.fillStroke(); this.restoreFillRule(savedFillRule); },