pdf.js/src/display
Rob Wu f07ce2bbc2 SVG: Don't render missing glyphs
This bug is similar to the canvas bug of #6721.
I found this bug when I tried to run pdf2svg on a SVG file, and the generated
SVG could not be viewed in Chrome due to a SVG/XML parsing error:
"PCDATA invalid Char value 3"

Reduced test case:
- https://github.com/mozilla/pdf.js/files/1229507/pcdatainvalidchar.pdf
- expected: "hardware performance"
- Actual SVG source: "hardware\x03performance"
  (where "\x03" is a non-printable character, and invalid XML).

In terms of rendering, this bug is similar to #6721, where an unexpected glyph
appeared in the canvas renderer. This was fixed by #7023, which skips over
missing glyphs. This commit follows a similar logic.

The test case from #6721 can be used here too:
- https://github.com/mozilla/pdf.js/files/52205/issue6721_reduced.pdf
  expected: "Issue   6721"
  actual (before this patch): "Issue ààà6721"
2017-08-16 23:49:55 +02:00
..
annotation_layer.js Fix inconsistent spacing and trailing commas in objects in remaining src/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 12:32:18 +02:00
api.js remove PDFWorker from cache after detsroy 2017-08-02 23:48:42 +03:00
canvas.js Remove most assert() calls (issue 8506) 2017-07-21 18:51:02 +02:00
dom_utils.js Remove most assert() calls (issue 8506) 2017-07-21 18:51:02 +02:00
font_loader.js Fix inconsistent spacing and trailing commas in objects in remaining src/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 12:32:18 +02:00
global.js Fix inconsistent spacing and trailing commas in objects in remaining src/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 12:32:18 +02:00
metadata.js Removes error() 2017-07-07 09:40:24 -05:00
network.js Adds Streams API support for networking task of PDF.js project. 2017-07-28 02:32:30 +05:30
pattern_helper.js Removes error() 2017-07-07 09:40:24 -05:00
svg.js SVG: Don't render missing glyphs 2017-08-16 23:49:55 +02:00
text_layer.js Properly cancel streams and guard at getTextContent. 2017-08-03 16:36:46 -05:00
transport_stream.js Adds Streams API support for networking task of PDF.js project. 2017-07-28 02:32:30 +05:30
webgl.js Fix inconsistent spacing and trailing commas in objects in remaining src/ files, so we can enable the comma-dangle and object-curly-spacing ESLint rules later on 2017-06-02 12:32:18 +02:00