Permalink
Commits on Sep 26, 2017
  1. Merge pull request #8955 from brendandahl/issue7507

    Snuffleupagus committed on GitHub Sep 26, 2017
    Overwrite maxSizeOfInstructions in maxp with computed value.
  2. Overwrite maxSizeOfInstructions in maxp with computed value.

    brendandahl committed Sep 26, 2017
    In issue #7507 the value is less than the actuall max size
    of the glyph instructions causing OTS to fail the font.
Commits on Sep 25, 2017
  1. Update l10n files

    Snuffleupagus committed Sep 25, 2017
Commits on Sep 24, 2017
  1. Merge pull request #8724 from Snuffleupagus/PDFSinglePageViewer

    timvandermeij committed on GitHub Sep 24, 2017
    Implement a `PDFSinglePageViewer` class (issue 8188)
  2. Merge pull request #8950 from timvandermeij/polygon-polyline-annotations

    Snuffleupagus committed on GitHub Sep 24, 2017
    Implement support for polyline and polygon annotations
Commits on Sep 23, 2017
  1. Merge pull request #8932 from janpe2/jbig2-sym-offset

    timvandermeij committed on GitHub Sep 23, 2017
    JBIG2 symbol offsets
  2. Implement a `PDFSinglePageViewer` class (issue 8188)

    Snuffleupagus committed Aug 1, 2017
    The new `PDFSinglePageViewer` class extends the previously created abstract `BaseViewer` class.
    
    There's *a lot* of existing functionality in `PDFViewer` that depends on all the pages being loaded and synchronously available, once the `setDocument` method has been called.
    Given that initializing `PDFPageView` instances requires passing a DOM element to which the page is attached, the simplest solution I could come up with is to append all pages to a (hidden) document fragment and just swap them (one at a time) into the viewer when page switching occurs.
  3. Refactor `PDFViewer` to extend an abstract `BaseViewer` class

    Snuffleupagus committed Aug 1, 2017
    This patch introduces an abstract `BaseViewer` class, that the existing `PDFViewer` then extends. *Please note:* This lays the necessary foundation for the next patch.
  4. Rename `web/pdf_viewer.js` to `web/base_viewer.js`

    Snuffleupagus committed Aug 1, 2017
    Please note that the only reason for this change is to try and improve reviewability of later patches, by keeping the diffs more manageable.
  5. Merge pull request #8949 from Snuffleupagus/ColorSpace-rm-instanceof-…

    timvandermeij committed on GitHub Sep 23, 2017
    …AlternateCS
    
    Remove the `instanceof AlternateCS` check in `ColorSpace.parse` since it's dead code
  6. Merge pull request #8928 from mukulmishra18/decode-file-path

    timvandermeij committed on GitHub Sep 23, 2017
    Fix #8907: Decode URL to get correct path in node_stream.
  7. Remove the `instanceof AlternateCS` check in `ColorSpace.parse` since…

    Snuffleupagus committed Sep 23, 2017
    … it's dead code
    
    Looking at `ColorSpace.parseToIR`, it will do one of the following things when called:
     1. Return a String.
     2. Return an Array.
     3. Throw a `FormatError`.
     4. In one case, return the result of *another* `ColorSpace.parseToIR` call.
    
    However, under no circumstances will it ever return an `AlternateCS` instance.
    
    Since it's often useful to understand why code, which has become unused, existed in the first place, let's grab a hard hat and a shovel and start digging through the history of this code :-)
    
    The current condition was introduced in commit c198ec4, in PR 794, but it was actually already obsolete by that time.
    The preceeding `instanceof SeparationCS` condition predates commit a7278b7, in PR 700.
    That condition was originally introduced all the way back in commit 4e3f87b, in PR 692. However, it was made obsolete by commit 9dcefe1, which is included in the very same PR!
    
    Hence we're left with the conclusion that not only has this code be unused for *almost* six years, it was basically never used at all save for a few refactoring commits that're part of PR 692.
Commits on Sep 20, 2017
  1. Merge pull request #8912 from timvandermeij/xml-parser

    timvandermeij committed on GitHub Sep 20, 2017
    [api-minor] Replace `DOMParser` with `SimpleXMLParser`
  2. Merge pull request #8938 from brendandahl/bug1392647

    Snuffleupagus committed on GitHub Sep 20, 2017
    Use font's default width even when 0. (bug 1392647)
  3. Use font's default width even when 0.

    brendandahl committed Sep 20, 2017
    Bug 1392647 has a PDF where the default width of the font
    is 0. It draws some charcodes that don't have glyphs, but
    we were wrongly using the 1000 default width for these
    charcodes causing some text to be overlapping.
Commits on Sep 19, 2017
  1. Replace `DOMParser` with `SimpleXMLParser`

    timvandermeij committed Sep 13, 2017
    The `DOMParser` is most likely overkill and may be less secure.
    Moreover, it is not supported in Node.js environments.
    
    This patch replaces the `DOMParser` with a simple XML parser. This
    should be faster and gives us Node.js support for free. The simple XML
    parser is a port of the one that existed in the examples folder with a
    small regex fix to make the parsing work correctly.
    
    The unit tests are extended for increased test coverage of the metadata
    code. The new method `getAll` is provided so the example does not have
    to access internal properties of the object anymore.
  2. Merge pull request #8901 from janpe2/ccitt-eofb-false

    Snuffleupagus committed on GitHub Sep 19, 2017
    CCITTFaxStream problem when EndOfBlock is false
Commits on Sep 18, 2017
  1. Merge pull request #8921 from THausherr/patch-2

    timvandermeij committed on GitHub Sep 18, 2017
    support tiff predictor for 16bit
  2. support tiff predictor for 16bit

    THausherr committed with THausherr Sep 17, 2017
    (for issue #6289)
    This does the same for 16 bit as the existing 8 bit tiff predictor code, an addition of the last word to this word.
    
    The last two "& 0xFF" may or may not be needed, I see this isn't done in the 8 bit code, but I'm not a JS developer.
  3. Update l10n files

    Snuffleupagus committed Sep 18, 2017
Commits on Sep 17, 2017
  1. Merge pull request #8919 from Snuffleupagus/issue-8915

    timvandermeij committed on GitHub Sep 17, 2017
    Ignore 'change' events that didn't originate in the viewer (issue 8915)
  2. Ignore 'change' events that didn't originate in the viewer (issue 8915)

    Snuffleupagus committed Sep 16, 2017
    Rather that registering a 'change' event listener on the `window`, which will thus (unnecessarily) fire in *a number* of other situations such as e.g. when the user changes the pageNumber or the current search term, we could/should just register it directly on the dynamically created `fileInput` DOM element instead.
    I can see no really compelling reason why we actually need to listen for `file` changes on the `window` itself, and this way we're also able to keep the `fileInput` related code confined to one part of the code which should aid readability.
    Furthermore, in custom deployments, there's less risk that we're going to interfere with "outside" code this way.
    
    Finally, preprocessor guards were added to the `webViewerOpenFile` function, since that code doesn't make sense in e.g. the extension builds.
  3. Merge pull request #8917 from timvandermeij/stamp-annotations

    Snuffleupagus committed on GitHub Sep 17, 2017
    Implement support for stamp annotations
Commits on Sep 16, 2017
  1. Merge pull request #8909 from Snuffleupagus/PDFFunction-isEvalSupported

    timvandermeij committed on GitHub Sep 16, 2017
    Check `isEvalSupported`, and test that `eval` is actually supported, before attempting to use the `PostScriptCompiler` (issue 5573)
  2. Merge pull request #8913 from Snuffleupagus/issue-8895

    timvandermeij committed on GitHub Sep 16, 2017
    For /Filter entries containing `Name`s, ignore the /DecodeParms entry if it contains an Array (issue 8895)
Commits on Sep 15, 2017
  1. For /Filter entries containing `Name`s, ignore the /DecodeParms entry…

    Snuffleupagus committed Sep 15, 2017
    … if it contains an Array (issue 8895)