Link to PDF file (or attach file here):
https://issues.apache.org/jira/secure/attachment/12650283/000004_ShadingPatternTextPDF.pdf

Configuration:
- Web browser and its version: FF 51.0.1 32bit
- Operating system and its version: W7
- PDF.js version: latest

Steps to reproduce the problem:
display file

What is the expected behavior? (add screenshot)
![ok](https://cloud.githubusercontent.com/assets/6665575/23339534/5ff2de9c-fc25-11e6-837e-0fdaf81b4ca9.png)

What went wrong? (add screenshot)
![nok](https://cloud.githubusercontent.com/assets/6665575/23339536/63f7a37e-fc25-11e6-813c-cc218cc4def3.png)

possibly similar problem:
https://www.pdflib.com/fileadmin/pdflib/Cookbook/pdf/color_gradient.pdf (shaded text completely missing)
https://issues.apache.org/jira/secure/attachment/12630566/pslib-shading.pdf (page 4, part of text missing)
https://issues.apache.org/jira/secure/attachment/12652009/pattern-shading-2-4-idMatrix.pdf (some text missing)
https://issues.apache.org/jira/secure/attachment/12652010/pattern-shading-2-4-noMatrix.pdf (some text missing)

const ctx = this.ctx;
    const current = this.current;
    let x = current.x,
      y = current.y;
    let startX, startY;
    for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {
      switch (ops[i] | 0) {
        case OPS.rectangle:
          x = args[j++];
          y = args[j++];
          const width = args[j++];
          const height = args[j++];
          const xw = x + width;
          const yh = y + height;
          ctx.moveTo(x, y);
          if (width === 0 || height === 0) {
            ctx.lineTo(xw, yh);
          } else {
            ctx.lineTo(xw, y);
            ctx.lineTo(xw, yh);
            ctx.lineTo(x, yh);
          }
          current.updatePathMinMax(ctx.mozCurrentTransform, x, y);
          current.updatePathMinMax(ctx.mozCurrentTransform, xw, yh);
          ctx.closePath();
          break;
        case OPS.moveTo: