Brendan Dahl
2a5616c2aa
Merge pull request #6546 from yurydelendik/destroy
...
[api-minor] Adds controlled destruction of the worker.
2015-10-23 10:54:01 -07:00
Jonas Jenwald
ec04c4acb7
Add a reduced test-case for issue 6151
...
Re: issue 6151 and PR 6193.
*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-23 18:50:14 +02:00
Yury Delendik
58c3ea0820
Adds thread abort capabilities.
2015-10-23 09:06:32 -05:00
Yury Delendik
59c13b32aa
Adds destroy method to the document loading task.
...
Also renames PDFPageProxy.destroy method to cleanup.
2015-10-23 08:57:14 -05:00
Jonas Jenwald
d3782ff8d4
Add a reduced test-case for issue 4575
...
Re: issue 4575 and PR 4581.
2015-10-23 15:15:06 +02:00
Jonas Jenwald
2e751199fb
Prevent getOperatorList from failing to correctly parse OPS.paintXObject for TilingPatterns that are missing some /Resources entries (issue 6541)
...
Fixes 6541.
2015-10-21 21:30:56 +02:00
Jonas Jenwald
e04113a35b
Add unit-tests for the onPassword/onProgress
callbacks of the API
...
The standard viewer implicitly depends on the `onPassword` and `onProgress` callbacks, in order to open password protected PDF files, respectively to report file loading progress. We currently have no unit-tests for this functionality, which seems unfortunate; hence this patch.
*Please note:* Rather than adding more unit-tests to `api_spec.js`, I slightly extended/reworked two existing tests. Specifically for the password test, this *does not* really change what we actually test, just how the test is done.
2015-10-21 00:01:52 +02:00
Jonas Jenwald
5987197bd5
Ensure that all getDocument
unit-tests returns the expected data
2015-10-16 18:54:20 +02:00
Jonas Jenwald
34cbee9bd3
Add unit-tests for PR 6531
2015-10-16 18:54:18 +02:00
Jonas Jenwald
39b962e3b0
Add unit-tests for isExternalLinkTargetSet
2015-10-13 21:56:46 +02:00
Tim van der Meij
d89fde05b0
Merge pull request #6481 from Snuffleupagus/issue-4914-test
...
Add a (linked) test-case for issue 4914
2015-10-13 20:02:48 +02:00
Tim van der Meij
c4403e6fd2
Merge pull request #6434 from Snuffleupagus/issue-4436-reduced-test
...
Replace the unavailable linked test-case for issue 4436 with a reduced test-case
2015-10-13 00:32:05 +02:00
Brendan Dahl
3eaeacfe19
Merge pull request #6476 from Snuffleupagus/PartialEvaluator_readToUnicode-cmap-length
...
Right-size the `map` array in PartialEvaluator_readToUnicode
2015-10-09 10:31:28 -07:00
Jonas Jenwald
03f2c704a3
Add a reduced load test-case for bug 1020858
...
Re: PR 4907 and https://bugzilla.mozilla.org/show_bug.cgi?id=1020858 .
*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-04 23:49:49 +02:00
Tim van der Meij
cd8bd73529
Merge pull request #6499 from Snuffleupagus/issue-4387-test
...
Add a (linked) load test for issue 4387
2015-10-04 16:50:18 +02:00
Tim van der Meij
1e29ddc4de
Merge pull request #6500 from Snuffleupagus/pr-4897-test
...
Add a (linked) test-case for PR 4897
2015-10-04 16:26:57 +02:00
Tim van der Meij
5e4910f7b6
Merge pull request #6491 from Snuffleupagus/check-trailer-if-xref-missing
...
Make `XRef_indexObjects` even more robust against bad PDF files, by checking for the existence of 'trailer' if 'xref' is not found
2015-10-04 16:00:00 +02:00
Jonas Jenwald
e8ad6c9d13
Add a unit-test for bug 1020226
...
For reference, see PR 4902 and https://bugzilla.mozilla.org/show_bug.cgi?id=1020226 .
2015-10-04 15:45:24 +02:00
Jonas Jenwald
ae255f8921
Slightly improved getPage
unit-tests
2015-10-04 14:28:24 +02:00
Jonas Jenwald
bdfda37c04
Add a (linked) test-case for PR 4897
...
Re: PR 4897.
2015-10-04 13:54:05 +02:00
Jonas Jenwald
96b3dc127d
Add a (linked) load test for issue 4387
...
Re: PR 4404 and issue 4387.
2015-10-04 13:15:10 +02:00
Jonas Jenwald
192907e0d2
Make XRef_indexObjects
even more robust against bad PDF files, by checking for the existence of 'trailer' if 'xref' is not found
...
Fixes http://www.cyjack.com/cognition/Terence%20McKenna%20-%20Lectures%20on%20Alchemy.pdf .
2015-10-01 15:01:25 +02:00
Jonas Jenwald
1b8cb52555
Prevent PartialEvaluator_buildFormXObject
from failing if the Matrix
or BBox
contains indirect objects
...
This patch fixes yet another instance of bad PDF data, specifically a case where the `BBox` array contains indirect objects (i.e. `Ref`s).
Fixes the missing image in http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf#page=24 . *Note:* There are missing images on a number of the pages in that file.
2015-09-29 10:11:49 +02:00
Tim van der Meij
973b15c5de
Merge pull request #6482 from Snuffleupagus/TilingPattern-baseTransform
...
Ensure that the `baseTransform` is always defined for TilingPatterns
2015-09-29 00:27:39 +02:00
Tim van der Meij
a6270bb449
Merge pull request #6452 from Snuffleupagus/pr-2875-reduced-test
...
Replace the unavailable linked test-case for PR 2875 with a reduced test-case
2015-09-29 00:04:16 +02:00
Tim van der Meij
67ed161a6a
Merge pull request #6450 from Snuffleupagus/issue-3115-test-new-link
...
Update the link location for the `issue3115` test file
2015-09-28 23:35:29 +02:00
Jonas Jenwald
9eab463b6d
Ensure that the baseTransform
is always defined for TilingPatterns
...
Fixes http://www2.emersonprocess.com/siteadmincenter/PM%20Micro%20Motion%20Documents/High-Pressure-Measurement-WP-001287.pdf#page=3 .
2015-09-27 22:49:34 +02:00
Jonas Jenwald
427d0f982d
Add a (linked) test-case for issue 4914
2015-09-26 16:09:10 +02:00
Jonas Jenwald
8d831449ab
Right-size the map
array in PartialEvaluator_readToUnicode
...
We can avoid a lot of intermediate resizings, by directly allocating the required number of elements for the `map` array.
2015-09-24 13:08:53 +02:00
Jonas Jenwald
b218b222b5
Replace the unavailable linked test-case for PR 2875 with a reduced test-case
...
This reduced PDF file only contains the relevant text/font; for reference please see PR 2875.
2015-09-16 13:59:58 +02:00
Jonas Jenwald
958fb71ef4
Update the link location for the issue3115
test file
...
The file (`lshort.pdf`) has changed a couple of times since the test was added, hence there's no guarantee that the current version accurately reflects the issues the test was added to check.
In this patch, I'm updating the link location to point to the *intended* file version (hosted on the "Internet Archive").
2015-09-15 15:17:07 +02:00
Fabian Lange
2564827503
Fix text spacing with vertical fonts ( #6387 )
...
According to the PDF spec 5.3.2, a positive value means in horizontal,
that the next glyph is further to the left (so narrower), and in
vertical that it is further down (so wider).
This change fixes the way PDF.js has interpreted the value.
2015-09-15 09:28:45 +02:00
Tim van der Meij
e68a5c0222
Merge pull request #6435 from Snuffleupagus/issue-3205-reduced-test
...
Replace the unavailable linked test-case for issue 3205 with a reduced test-case
2015-09-14 23:59:14 +02:00
Jonas Jenwald
297984e2e9
Add unit-tests for removeNullCharacters
(PR 6431 follow-up)
...
I overlooked that we already had existing unit-tests for `web/ui_utils.js`, so this PR adds a few tests for `removeNullCharacters` (see PR 6431).
2015-09-14 12:19:29 +02:00
Tim van der Meij
b360fd104b
Merge pull request #6420 from Snuffleupagus/pr-4922-test
...
Add a reduced test-case for PR 4922
2015-09-10 21:54:45 +02:00
Jonas Jenwald
c043a6e3a3
Replace the unavailable linked test-case for issue 3205 with a reduced test-case
2015-09-10 16:59:30 +02:00
Jonas Jenwald
7f7025247a
Replace the unavailable linked test-case for issue 4436 with a reduced test-case
...
Issue 4436 actually contains enough information to create a reduced test-case, which this patch uses to replace a currently unavailable linked test.
2015-09-10 13:01:20 +02:00
Jonas Jenwald
c5c8b239e9
Add unit-tests for stringToPDFString
...
The other day I was looking as the utilily function `stringToPDFString`, and I noticed that it didn't have any unit-tests. This patch fixes that.
2015-09-10 12:25:40 +02:00
Jonas Jenwald
29a1cdb6a6
Only choose a (3, 1) cmap table for TrueType fonts that have an encoding specified (issue 6410)
...
For (1, 0) cmaps, we have two different codepaths depending on whether the font has/hasn't got an encoding. But with (3, 1) cmaps we don't have a good fallback when the encoding is missing, hence this patch changes `readCmapTable` to only choose a (3, 1) cmap table if the font is non-symbolic *and* an encoding exists. Without this, we'll not be able to successfully create a working glyph map for some TrueType fonts with (3, 1) cmap tables.
Fixes 6410.
2015-09-07 16:56:05 +02:00
Jonas Jenwald
de6a74f58d
Add a reduced test-case for PR 4922
2015-09-05 12:51:05 +02:00
Brendan Dahl
238e16feeb
Merge pull request #6407 from Snuffleupagus/bug-1200096
...
Fallback in `readCmapTable`, instead of using `error`, for TrueType fonts with unsupported cmap formats (bug 1200096)
2015-09-04 18:10:34 -07:00
Tim van der Meij
2a0e0787c3
Merge pull request #6414 from Snuffleupagus/issue-6413
...
Ensure that the clipping path is reset when the state is restored (issue 6413)
2015-09-04 17:53:16 +02:00
Jonas Jenwald
e16fc486a4
Add (linked) ´load` tests for PR 1976 and 4606
...
Adds a couple of `load` tests for the `XRef` parsing part of the code-base, see PR 1976 and 4606.
2015-09-04 13:19:32 +02:00
Jonas Jenwald
b4ade44ab9
Add a reduced test-case for issue 6413
2015-09-03 22:29:12 +02:00
Jonas Jenwald
0fb31a4a9e
Fallback in readCmapTable
, instead of using error
, for TrueType fonts with unsupported cmap formats (bug 1200096)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096 .
The problematic font has a `format 2` cmap, which we've never supported properly. Prior to PR 2606, we were able to fallback to a working state, despite not having proper support for that cmap format.
Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that:
- `format 2` cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed.
- Having a simple patch will make potential uplifts a lot easier.
[1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
2015-09-01 14:01:19 +02:00
Jonas Jenwald
09b825d1be
Add a (linked) load
test for PR 4731
...
Re: PR 4731.
Since the URL points to the Internet Archive, I think that adding a linked test-case should be OK. (Also, it's difficult to create reduced, or even `unit`, tests that accurately captures the brokenness of real-world PDF files.)
*Please note:* Since this is a `load` test, `makeref`ing won't be needed.
2015-08-31 17:15:41 +02:00
Tim van der Meij
678b662720
Merge pull request #6399 from Snuffleupagus/vertical-text-taro
...
Slightly improved test coverage for vertical text
2015-08-31 16:27:21 +02:00
Tim van der Meij
61459c7e30
Merge pull request #6403 from Snuffleupagus/issue-6113-test
...
Add a reduced test-case for issue 6113
2015-08-31 15:51:47 +02:00
Yury Delendik
943efea876
Merge pull request #6404 from Snuffleupagus/linearization-unit-tests
...
Add unit-tests for Linearization dictionary parsing (PR 5023 follow-up)
2015-08-31 07:38:55 -05:00
Tim van der Meij
f518bbcc7c
Merge pull request #6401 from Snuffleupagus/paintXObject-subtype-PS-unit-test
...
Add a unit-test for skipping `paintXObject` if `Subtype === PS` (PR 4861)
2015-08-30 23:03:32 +02:00
Jonas Jenwald
0edb520a10
Add unit-tests for Linearization dictionary parsing (PR 5023 follow-up)
...
This should *really* have been part of 5023, but better late than never I suppose.
2015-08-30 14:06:11 +02:00
Jonas Jenwald
ba9fcce8eb
Add a reduced test-case for issue 6113
...
As promised in PR 6125, here's a reduced test-case that should (hopefully) avoid the intermittent failure of the previous one.
2015-08-30 01:23:52 +02:00
Jonas Jenwald
0dde08554d
Add a unit-test for skipping paintXObject
if Subtype === PS
(PR 4861)
2015-08-29 20:43:22 +02:00
Jonas Jenwald
3ae49e15b3
Slightly improved test coverage for vertical text
...
Our current test coverage for vertical text is somewhat lacking, as evident from e.g. issue 6387. That regression could easily have been avoided if the `taro` test-case would have been an `eq` test, as well as an `text` test.
2015-08-29 15:54:32 +02:00
Jonas Jenwald
593ea00ecb
Fix typo in test_manifest.json
that prevents test-case issue1419.pdf
from running
...
Currently we only attempt to test the *first* page, since `lastPage == 1`, but given that it's subsequently skipped we end up not testing anything.
*Note:* I've verified that the *second* page actually contains the kind of Colour space that the test was intended to check for.
2015-08-28 16:35:10 +02:00
Brendan Dahl
88e0326787
Merge pull request #6337 from Snuffleupagus/issue-6336
...
Adjust which TrueType (3, 1) glyphs we attempt to skip mapping of (issue 6336)
2015-08-25 09:49:46 -07:00
Jonas Jenwald
56a43a3181
Make XRef_indexObjects
more robust against bad PDF files (issue 5752)
...
This patch improves the detection of `xref` in files where it is followed by an arbitrary whitespace character (not just a line-breaking char).
It also adds a check for missing whitespace, e.g. `1 0 obj<<`, to speed up `readToken` for the PDF file in the referenced issue.
Finally, the patch also replaces a bunch of magic numbers with suitably named constants.
Fixes 5752.
Also improves 6243, but there are still issues.
2015-08-21 20:33:02 +02:00
Jonas Jenwald
5128603f64
Also check maybeLength
when deciding if a stream is empty in Parser_makeFilter
(issue 6360)
...
The problem with the PDF files in the issue, besides the obviously broken XRef tables which we're able to recover from, is that many/most of the streams have Dictionaries where the `Length` entry is set to `0`. This causes us to return `NullStream`, instead of the appropriate one in `Parser_makeFilter`.
Fixes 6360.
2015-08-20 23:04:18 +02:00
Jonas Jenwald
2597e3ffca
Add a linked test-case for issue 4890
2015-08-18 22:33:09 +02:00
Jonas Jenwald
3fa5f6cc3b
Only take the fast-path in PDFImage_createImageData
for un-masked JPEG images with "standard" colour spaces (issue 6364)
...
Fixes 6364.
2015-08-18 22:25:37 +02:00
Jonas Jenwald
99d29487ab
Adjust which TrueType (3, 1) glyphs we attempt to skip mapping of (issue 6336)
...
Fixes 6336.
2015-08-09 12:51:43 +02:00
Tim van der Meij
14f1ea00fe
Test case for tensor shading PR 6310
2015-08-04 23:55:55 +02:00
Tilman Hausherr
c85fa00d62
fix handling of flags 1-3 in coons shading
...
Short story: somebody got lost in two different indices. pi is an index in the stream and is explained on page 198 of the 32000-spec (however 1-based there), and ps is an index to something in PDF.js. I used the code from flag 0 (which works) to understand which is which. It is also important to understand that for flags 1,2 and 3, the stream is always assigned to the same coordinates and colors. What changes is which "old" coordinates and colors are assigned to what is "missing" in the stream. This is why for these flags, the code is identical except for the assignments in the first "row".
2015-08-03 21:15:26 +02:00
Brendan Dahl
a32d521555
Merge pull request #6222 from Rob--W/botio-robustness
...
Improve robustness of builder (esp. on Windows)
2015-08-03 10:10:35 -07:00
Brendan Dahl
977397ebfd
Merge pull request #6270 from Snuffleupagus/opentype-cff-2
...
Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
2015-08-03 09:43:33 -07:00
Jonas Jenwald
1d65daf5e5
Correctly access colorSpace.numComps
in MeshStreamReader
(issue 6287)
...
This regressed in f750e35224
.
2015-07-31 18:00:58 +02:00
Jonas Jenwald
7fe2442a18
Ensure that we don't use the same typed array for both coords
and colors
in Mesh figures
(issue 6287)
...
This regressed in 1e8d70af98
.
2015-07-31 18:00:23 +02:00
Tim van der Meij
d08895d659
Merge pull request #6236 from Rob--W/print-javascript-action
...
Detect scripted auto-print requests
2015-07-25 19:42:31 +02:00
Jonas Jenwald
0a024b5051
Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
...
*This is a tentative patch.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1186827 .
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1182130 .
Fixes 6264.
2015-07-25 12:26:36 +02:00
Jonas Jenwald
385e2e5aaf
Check if the Decode
entry is non-default when deciding if JPEG images are natively supported/decodable (issue 6238)
...
Tentatively fixes 6238.
2015-07-21 12:23:07 +02:00
Tim van der Meij
980aa10e04
Refactor annotation rectangle code and add unit tests
...
This patch refactors the code responsible for setting the annotation's rectangle. Its goal is to:
- Actually check that the input array is actually an array, and if so, that it contains exactly four elements.
- Only call `normalizeRect` if the input array is valid, i.e., we do not call it for the default rectangle anymore.
Unit tests are provided just like with the other patches in this series.
2015-07-20 22:01:47 +02:00
Rob Wu
c676ecb5a0
Detect scripted auto-print requests
...
Fixes #6106
To avoid future regressions, two new unit tests were added:
1. A new PDF based on the report from #6106 , which contains an
OpenAction of type JavaScript and a string "this.print({...}".
2. An existing PDF from https://bugzil.la/1001080 (from #4698 ).
Although it does not matter, since we don't execute the JavaScript code,
I have also changed "print(true)" to "print({})" since the print method
takes an object (not a boolean). See "Printing PDF documents", page 62:
http://adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_developer_guide.pdf
2015-07-20 18:25:02 +02:00
Tim van der Meij
dbd2ef034f
Merge pull request #6196 from Rob--W/run-specific-test
...
Add --testfilter and -t flags
2015-07-19 13:55:07 +02:00
Rob Wu
b627a1a0d9
Add --testfilter (-t) flag to run a specific test
2015-07-18 17:31:56 +02:00
Rob Wu
cc0805a996
Reduce verbosity of output in test/webbrowser.js
2015-07-17 23:21:35 +02:00
Tim van der Meij
465611a2ff
More cleanup regarding annotation border styles
2015-07-17 21:51:24 +02:00
Tim van der Meij
4b6e2724ae
Merge pull request #6220 from Snuffleupagus/issue-6218
...
Ignore double negative in `Lexer_getNumber` (issue 6218)
2015-07-17 21:29:40 +02:00
Jonas Jenwald
d68eb153d3
Update fonttools location and version (issue 6223)
2015-07-17 12:51:09 +02:00
Rob Wu
c3c6d503ee
Improve robustness of builder (esp. on Windows)
...
- Use rimraf instead of a custom removeDirSync implementation - rimraf
deals with edge cases like EPERM on Windows.
- Detect when the process exits before it was requested via stop(),
instead of running the cleanup handler.
- Add fallback for process detection when the process exits before it
was requested. On *nix systems, this is done via pkill and pgrep, on
Windows this is done via wmic.
- Add some asserts to check the preconditions of the methods, and output
some status information to aid debugging in case of failure.
I have verified that these changes work on ArchLinux and Windows XP,
using Chrome and Firefox, as follows:
1. node make unittest
2. node make unittest
3. Restart the Firefox process via the task manager as soon as possible.
4. node make unittest
5. Temporary lock a file/directory within the temporary profile
directory until the tests have finished, and then unlock the file
within 10 seconds.
In all cases, the auxilary browser processes are killed, and the
temporary profile directory is wiped.
2015-07-16 21:40:57 +02:00
Jonas Jenwald
c718d1ab10
Ignore double negative in Lexer_getNumber
(issue 6218)
...
Basic mathematics would suggest that a double negative should always become positive, but it appears that Adobe Reader simply ignores that case. Hence I think that it makes sense for us to do the same.
Fixes 6218.
2015-07-16 12:11:49 +02:00
Tim van der Meij
a2e9845093
Refactor annotation color handling and add unit tests
2015-07-15 18:49:19 +02:00
Rob Wu
62cf6536a2
Tests: Resolve -b to full path in webbrowser.js
...
This allows us to simply use "node test.js -b=firefox" instead of having
to type out the full path.
2015-07-14 00:20:07 +02:00
Tim van der Meij
1416a1b521
Merge pull request #6187 from Snuffleupagus/more-efficient-getDestination
...
A couple of improvements of `getDestination` (unit-test included)
2015-07-13 23:03:13 +02:00
Brendan Dahl
e498bbce90
Merge pull request #6198 from Rob--W/windows-taskkill
...
Use taskkill to stop the browser on Windows in tests
2015-07-13 13:30:03 -07:00
Rob Wu
5cce7377af
Use taskkill to stop the browser on Windows
2015-07-11 20:22:53 +02:00
Rob Wu
e211c25f06
Improve robustness of stream parser (invalid length)
...
When the parser finds a stream, it retrieves the Length from the stream
dictionary and advances the lexer to the offset as specified in Length.
If this Length is incorrect, the lexer could end up anywhere.
When the lexer gets in an invalid state, it could throw errors. For
example, in issue 6108, the lexer ends up inside the stream data. This
stream has the ASCIIHexDecode filter, so all characters are made up from
ASCII characters, and the lexer interprets it as a command token. Tokens
cannot be longer than 127 bytes, so eventually 128 bytes are consumed
and the lexer throws "Command token too long" error.
Another possible error is "Illegal character: 41" when the lexer happens
to end up at a ')' due to the length mismatch.
These problems are solved by catching lexer errors and recovering the
parser via the existing stream length detection branch.
2015-07-11 20:12:49 +02:00
Rob Wu
fd29bb0c57
Subtract start offset for xrefs in recovery mode
...
Xref offsets are relative to the start of the PDF data, not to the start
of the PDF file. This is clear if you look at the other code:
- In the XRef's readXRefTable and processXRefTable methods of XRef, the
offset of a xref entry is set to the bytes as given by a PDF file.
These values are always relative to the start of the PDF file (%PDF-).
- The XRef's readXRef method adds the start offset of the stream to
Xref entry's offset: "stream.pos = startXRef + stream.start".
Clearly, this line assumes that the entry offset excludes the start
offset.
However, when the PDF is parsed in recovery mode, the xref table is
filled with entries whose offset is relative to the start of the stream
rather than the PDF file. This is incorrect, and the fix is to subtract
the start offset of the stream from the entry's byte offset.
The manually created PDF file serves as a regression test. It is a valid
PDF, except:
- The integer to point to the start of the xref table and the %%EOF
trailer are missing. This will activate recovery mode in PDF.js
- Some junk was added before the start of the PDF file. This exposes the
bad offset bug.
2015-07-10 23:33:10 +02:00
Jonas Jenwald
940bedf75f
Add a unit-test that attempts to fetch a non-existent named destination
...
Doing this helped uncover an issue with the `getDestination` implementation.
Currently if a named destination doesn't exist, the method (in `obj.js`) may return `undefined` which leads to the promise being stuck in a pending state.
*Note:* returning `null` for this case is consistent with other methods, e.g. `getOutline` and `getAttachments`.
2015-07-07 22:05:08 +02:00
Tim van der Meij
31976b9b44
Merge pull request #6181 from Rob--W/test-downloadOnly
...
Add --downloadOnly flag to test.js
2015-07-06 23:30:01 +02:00
Rob Wu
c7a5da332c
Add --downloadOnly flag to test.js
2015-07-06 17:17:11 +02:00
Jonas Jenwald
60fc462bd6
Add more reduced test-cases for PR 6171
2015-07-03 13:14:41 +02:00
Yury Delendik
0787182e6f
Adds more characters to the PUA range
2015-07-02 16:47:47 -05:00
Brendan Dahl
d8e201446d
Merge pull request #6135 from Snuffleupagus/issue-5677-v2
...
Skip mapping of CIDFontType2 glyphs when the font either has a |IdentityToUnicodeMap| or a |toUnicodeMap| with 65536 elements (issue 5677)
2015-07-01 11:15:55 -07:00
Brendan Dahl
98339f63a8
Merge pull request #5585 from timvandermeij/annotation-layer-borderstyle
...
Annotation border styles
2015-07-01 10:48:12 -07:00
Tim van der Meij
e9a6d4451d
Merge pull request #6146 from Snuffleupagus/issue-4909-test
...
Add a reduced test-case for issue 4909
2015-06-29 17:11:10 +02:00
Jonas Jenwald
38955d491f
Further improvements of the getStats and getDownloadInfo unit tests
...
The patch adds a test to ensure that `getStats` returns the expected result after the page has been parsed, and cleans up the existing test a bit.
Also, since I'm touching the file anyway, I'm making a small adjustment of the `getDownloadInfo` test. (I have no idea why I didn't just write it like this initially.)
2015-06-25 23:00:26 +02:00
Jonas Jenwald
7b77408dc1
Add a reduced test-case for issue 4909
...
I *should* have included this is PR 4910, but for some reason I didn't so better late than never.
2015-06-25 22:34:44 +02:00
Jonas Jenwald
46a8485db4
Ignore paint form XObject when the name is missing (issue 4558)
...
Fixes 4558 (since the font issues already appear to be fixed).
2015-06-22 22:10:26 +02:00
Jonas Jenwald
aa3a64e975
Skip mapping of CIDFontType2 glyphs when the font either has a |IdentityToUnicodeMap| or a |toUnicodeMap| with 65536 elements (issue 5677)
...
This patch slightly extends the heuristics used when trying to skip mapping of missing glyphs.
Fixes 5677.
2015-06-18 21:53:15 +02:00
Tim van der Meij
6007a57291
Add tests and documentation for the annotation border style class
...
This patch adds:
- Unit tests for the annotation border style class
- Regression test (self-made) for the annotation border style class
- Documentation generation using JSDoc
2015-06-17 22:28:08 +02:00
Jonas Jenwald
75624c8d82
Clear the |getSinglePixelWidth| cache when rendering Type3 fonts (issue 6117)
...
Fixes 6117.
2015-06-17 14:30:32 +02:00
Jonas Jenwald
65fee79c5d
Remove issue6113.pdf from the test-suite for failing intermittently in Firefox on the Linux bot
2015-06-16 19:40:24 +02:00
Jonas Jenwald
60fbb5ef69
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
...
Fixes 6113.
2015-06-14 23:29:38 +02:00
Jonas Jenwald
bc5e43b45c
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
...
Fixes 5836.
Fixes 5939.
Fixes 6055.
2015-06-14 12:10:22 +02:00
Jonas Jenwald
bf20334bea
Merge pull request #6090 from Snuffleupagus/issue-6068
...
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
2015-06-13 00:29:08 +02:00
Tim van der Meij
fda6c18644
Merge pull request #6093 from Snuffleupagus/slightly-improved-crypto-unittests
...
Slightly improved Crypto unit tests
2015-06-10 00:32:35 +02:00
Jonas Jenwald
f59e20226c
Slightly improved Crypto unit tests
...
Currently in the tests which check that incorrect passwords are rejected, we don't ensure that the exceptions thrown are the ones we expect. This patch improves the current situation, so that we actually can be sure that the code "fails" in the correct way.
*Note:* This patch also fixes some cases of weird indentation in the file.
2015-06-10 00:21:40 +02:00
Tim van der Meij
cbc7a0b178
Merge pull request #6101 from Snuffleupagus/issue-6099-test
...
Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
2015-06-10 00:14:00 +02:00
Jonas Jenwald
97385587a8
Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
...
The issue is already fixed by PR 5748, but we didn't have access to a suitable test-case. Thanks to issue 6099, we are now able to add one!
2015-06-09 17:52:36 +02:00
Jonas Jenwald
5eae3e29c5
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
...
Fixes 6068.
The most notable issue with the font in question is that the `differences` array contains lots of strange entries (of the type `uniXXXX`, instead of proper glyph names).
2015-06-06 18:28:16 +02:00
Jonas Jenwald
6f2f0700b7
Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
...
*This patch depends on PR 5990.*
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#38 , certain Thai/Lao characters are treated as special by the font shaping code in Firefox.
Further down in that file, https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#216 , the vertical position of glyphs is modified, which should thus explain why some glyphs end up in the wrong position in the PDF file.
Fixes 5994.
2015-06-05 23:53:22 +02:00
Brendan Dahl
749a60a0b7
Merge pull request #5990 from Snuffleupagus/missing-glyphs-identityUnicode
...
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
2015-06-05 14:50:02 -07:00
Jonas Jenwald
64e1fb99fe
Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
...
Fixes 6081.
2015-06-04 22:01:01 +02:00
Jonas Jenwald
a28ed7c834
Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
...
This enables us to find resources placed on multiple levels of the tree.
Fixes 5954.
2015-05-30 12:21:05 +02:00
Yury Delendik
d105734686
Merge pull request #6046 from AppShuttle/pdf-version-fix
...
Extract correct PDF format version from the catalog
2015-05-27 08:50:20 -05:00
Jonas Jenwald
39d2103063
Merge pull request #6021 from timvandermeij/test-driver
...
Refactor the test driver
2015-05-26 21:01:13 +02:00
Mike Corbin
4c9b65f0e1
Extract correct PDF format version from the catalog
...
The 'Version' field of the most recent document catalog, if present, is
intended to supersede the value in the file prologue.
This is significant for incrementally-built PDF documents and generators that
emit a low version in the prologue and later apply a format version based on
PDF features used, such as Apple's CoreGraphics/Quartz PDF backend.
Fixes the internal version variable, as well as the PDFFormatVersion reported
by the API and consumed by viewers.
2015-05-26 01:56:09 +01:00
Tim van der Meij
e02ab9fb79
Implement an option to disable automatic scrolling
...
This adds a checkbox with which one can disable scrolling, for example to look back at output during testing. Note that the styles are inline because the test runner removes all <style> elements for each test.
2015-05-21 20:19:36 +02:00
Tim van der Meij
07ec736eb9
Improve driver code structure
...
- Improve variable names and move variables to the top of the method
- Use constants where possible
- Only print the delay text if there is an atual delay set
- Simplify continuation logic in _nextTask
- Do not pass anything to clearCanvas: we can get the context from this.canvas there.
- Remove innerHTML and replace it with textContent. Add a comment why insertAdjancentHTML is so important for performance and runtime.
- Merge _quit and _sendQuitRequest.
2015-05-21 20:19:32 +02:00
Tim van der Meij
ae8748edfb
Refactor test driver to be more class-like
...
- Extract NullTextLayerBuilder and SimpleTextLayerBuilder from the driver code and create classes for them.
- Move options to the constructor and pass in HTML elements instead of getting them in the driver.
- Remove unused masterMode variable.
- Minor method name updates.
The rest is only moving/indenting existing code and adding 'this'.
2015-05-21 20:19:02 +02:00
Yury Delendik
07af86cf70
Merge pull request #6016 from Snuffleupagus/issue-6010
...
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
2015-05-18 08:22:47 -05:00
Tim van der Meij
d59660cfa6
Clean up the test driver
...
- Remove a hack for Chrome on Windows because we do not run Chrome on the Windows bot anymore, so it added unneeded complexity.
- Merge nextTask and continueNextTask functions. nextTask did nothing more than calling cleanup. This change also allows us to remove the callback for that function.
- Remove unnecessary one-line functions.
2015-05-15 23:21:20 +02:00
Tim van der Meij
58769fd3b9
Refactor test slave
...
- Improved names of elements
- Easier scrolling code
2015-05-15 23:20:14 +02:00
Tim van der Meij
7da9626d16
Merge pull request #5901 from Snuffleupagus/bug-1050040
...
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
2015-05-15 12:54:04 +02:00
Jonas Jenwald
6fbc5428bd
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1142033 .
Also fixes issue 5874.
2015-05-14 22:38:04 +02:00
Jonas Jenwald
44240798be
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
...
For passwords where the encoding already is correct, the conversion is a no-op.
Also, since `encodeURIComponent` might throw, we need to make sure that we handle that case too.
Fixes 6010.
2015-05-14 21:46:31 +02:00
Tim van der Meij
90982332bf
Merge pull request #5995 from CodingFabian/tweak-char-spacing-text-selection
...
Apply char spacing only when there are chars.
2015-05-14 20:06:22 +02:00
Jonas Jenwald
9788ba0270
Add a reduced test-case for issue 5896
...
This should have been part of PR 5898.
2015-05-14 14:08:43 +02:00
Jonas Jenwald
0365baf5ab
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1050040 .
With this patch the file is completely readable, but given that the font is broken enough to be rejected by OTS the rendering differs slightly from Adobe Reader.
*Note:* the PDF file is sufficiently broken that even Adobe Reader complains about the font, *and* also about another more general issue.
2015-05-14 13:16:14 +02:00
Fabian Lange
c2013094e7
Apply char spacing only when there are chars.
2015-05-13 23:45:20 +02:00
Tim van der Meij
d484ebd492
Merge pull request #5910 from jordan-thoms/fix-concatenated-files
...
Fix error reading concatenated pdfs
2015-05-13 22:40:55 +02:00
Jonas Jenwald
6d2d854f65
Merge pull request #5815 from Snuffleupagus/type1-diff-refs
...
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
2015-05-07 22:33:23 +02:00
Brendan Dahl
cd53cbe7d4
Merge pull request #5964 from Snuffleupagus/bug-1157493
...
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
2015-05-05 14:41:32 -07:00
Brendan Dahl
4824baf31c
Merge pull request #5905 from timvandermeij/specialpowers
...
Remove SpecialPowers addon
2015-04-27 10:36:54 -07:00
Jonas Jenwald
760222cf0b
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
...
*This is a regression from PR 4423.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1157493 .
2015-04-25 16:48:14 +02:00
Jonas Jenwald
4a022bc40a
Add a reduced test-case for issue 5801
2015-04-25 11:28:33 +02:00
Jonas Jenwald
7c7d05e7a3
Attempt to infer if a CMap file actually contains just a standard Identity-H
/Identity-V
map
2015-04-25 11:28:33 +02:00
Tim van der Meij
48b2f6d023
Merge pull request #5756 from Snuffleupagus/issue-5751
...
Guess CIDFontType0 subtype based on font file contents (issue 5751)
2015-04-24 23:50:07 +02:00
Brendan Dahl
846eb967cc
Merge pull request #5655 from Snuffleupagus/issue-5644
...
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
2015-04-20 11:46:27 -07:00
Jordan Thoms
d0ea772fc6
Fix error reading concatenated pdfs
2015-04-18 20:56:07 +12:00
Jonas Jenwald
4c2ad3bc7b
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
...
This patch is yet another installment in the (never ending) series of bugs in PDF files with non-embedded fonts.
Fixes http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf .
2015-04-17 20:32:27 +02:00
Marco Castelluccio
fbae39983c
Fail with a more informative error message if the browser executable path doesn't exist
2015-04-17 16:12:13 +02:00
Jonas Jenwald
fda858ae33
Don't map glyphs to certain problematic General Punctuation Unicode locations (bug 911034)
...
Fixes the remaining missing characters in https://bugzilla.mozilla.org/show_bug.cgi?id=911034 .
For reference, see http://www.unicode.org/charts/PDF/U2000.pdf (and also http://en.wikipedia.org/wiki/General_Punctuation_%28Unicode_block%29 ).
2015-04-09 17:27:03 +02:00
Tim van der Meij
ba8a4f2b3e
Merge pull request #5911 from Snuffleupagus/test-worker-comments
...
Remove commented out code about |disableWorker| in the test suite
2015-04-04 14:46:13 +02:00
Jonas Jenwald
36ac67583f
Remove commented out code about |disableWorker| in the test suite
...
Since the tests have run with workers enabled for a long time, these comments are no longer relevant.
2015-04-04 13:32:44 +02:00
Tim van der Meij
50573b82a3
Provide only one browser manifest example
2015-04-03 21:21:54 +02:00
Tim van der Meij
27170ff858
Remove prefs.js file
...
The first preference is also in user.js and the second one was only needed for SpecialPowers.
2015-04-03 20:18:42 +02:00
Tim van der Meij
75d8f70d06
Remove SpecialPowers addon
2015-04-03 20:17:20 +02:00
Jonas Jenwald
2b1a13ba28
Don't map glyphs to Unicode position 0x0E33, i.e. Thai character SARA AM (bug1046314)
...
*A similar approach as in PR 5705.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1046314 .
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-complex-thai.cc#270-365 , `0x0E33` is treated as a special case (by the font shaping code in Firefox). Hence it seems reasonable to skip it when adjusting the font mapping.
2015-03-26 13:22:45 +01:00
Brendan Dahl
519b6669f0
Merge pull request #5705 from Snuffleupagus/bug-1108301
...
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
2015-03-24 16:33:04 -07:00
Jonas Jenwald
e894a0a4c6
Guess CIDFontType0 subtype based on font file contents (issue 5751)
2015-03-15 13:35:48 +01:00
Jonas Jenwald
4a9ff471c4
Correctly detect the presence of the Adobe specific APP14 JPEG marker (bug 1140761)
...
According to the specification, http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf#G3.851943 , the content of the marker segment should begin with `Adobe`, and not `Adobe\x00` as the code currently look for.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1140761 .
Fixes the colour conversion part of issues 4090 and 5623.
2015-03-10 13:07:09 +01:00
Yury Delendik
f4dbd69e06
Merge pull request #5595 from fkaelberer/useBinarySearchToFindVisibleElements
...
Use binary search in getVisibleElements()
2015-03-09 23:11:50 -05:00
Tim van der Meij
c69ad5885c
Merge pull request #5770 from Snuffleupagus/opentype-cff
...
Correctly detect OpenType font files with CFF data
2015-03-06 22:58:43 +01:00
Jonas Jenwald
97eb215b5f
Add a reduced test-case for issue 5734
2015-03-05 16:20:03 +01:00
Jonas Jenwald
82f73bc9f4
Add a |text| test-case for issue 5421
...
Prior to PR 4259, we *incorrectly* ignored `toUnicode` for Type3 fonts. Since we now handle that correctly, this patch adds a `text` test-case to prevent regressions.
2015-03-03 13:13:34 +01:00
fkaelberer
a78bb6b946
Use binary search in getVisibleElements()
2015-03-01 17:41:20 +01:00
Jonas Jenwald
f81fc9091a
Correctly detect OpenType font files with CFF data
...
Fixes 5334.
Fixes 215.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1125614 .
According to the specification, http://www.microsoft.com/typography/otspec/otff.htm , OpenType font files with CFF data should have `OTTO` in the header.
2015-02-28 13:43:53 +01:00
Jonas Jenwald
00ee6bd6b6
Merge pull request #5693 from collinanderson/whitespace
...
cleaned whitespace
2015-02-28 10:09:21 +01:00
Yury Delendik
23916b2b14
Merge pull request #5748 from Snuffleupagus/issue-5747
...
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-26 17:44:46 -06:00
Jonas Jenwald
0a3341dadc
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
...
It seems that `0x25CC` is another bad spot for charCodes.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1108301 .
2015-02-27 00:20:38 +01:00
Jonas Jenwald
888cbe0bde
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
2015-02-22 17:42:15 +01:00
Jonas Jenwald
7c8996558a
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-20 12:53:02 +01:00
Jonas Jenwald
417800a1b5
Only skip the |!isSymbolicFont| check for TrueType (3, 1) cmap tables if no previous cmap table was found (PR 5703 followup)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=894572 .
2015-02-19 13:58:03 +01:00
Brendan Dahl
6bb0a483b1
Merge pull request #5703 from Snuffleupagus/issue-5701
...
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-18 14:50:19 -08:00
Collin Anderson
54e984c763
cleaned whitespace
2015-02-17 11:07:37 -05:00
Tim van der Meij
27e3558a41
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
2015-02-13 21:29:00 +01:00
Jonas Jenwald
592890a758
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-13 01:03:10 +01:00
Jonas Jenwald
8614c17c1d
Merge pull request #5717 from timvandermeij/testcase-5567
...
Test case for issue 5567
2015-02-13 00:39:52 +01:00
Brendan Dahl
394b38b22f
Merge pull request #5651 from Snuffleupagus/missing-glyphs
...
Try to skip mapping of missing TrueType and CIDFontType2 glyphs
2015-02-11 19:31:22 -08:00
Tim van der Meij
d124fc5e08
Test case for issue 5567
2015-02-10 00:16:54 +01:00
Jonas Jenwald
01e6565dd4
Try to skip mapping of missing TrueType glyphs
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:38 +01:00
Jonas Jenwald
8174da61fb
Don't skip mapping of glyphs for CIDFontType2 fonts with a CIDToGIDMap
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
2015-02-07 12:19:37 +01:00
Jonas Jenwald
ad41a2d574
Add support for TrueType (0, 0) cmap tables (issue 5501 and 5574)
2015-01-11 14:54:12 +01:00
Jonas Jenwald
5332c02a02
Fix lint error: "test/webserver.js: line 177, col 106, Line is too long."
2015-01-08 12:22:34 +01:00
Yury Delendik
4ec132a2ba
Adds encoding for test server index page.
2015-01-07 21:35:48 -06:00
Jonas Jenwald
1fea44ce14
Ensure that |get fingerprint| doesn't fail if the ID is not an array (issue 5599)
...
According to the [PDF specification](http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=51 ) the `ID` should be an array. To prevent errors if the PDF file violates that part of the spec, check that the `ID` is actually an array.
Fixes 5599.
2014-12-30 16:16:43 +01:00
Jonas Jenwald
6e66e30d92
Merge pull request #5597 from timvandermeij/ccitt-regression
...
CCITTFaxStream: fix regression when EncodedByteAlign is true and EndOfLine is false
2014-12-30 11:48:47 +01:00
Tim van der Meij
b835ef425e
CCITTFaxStream: fix regression when EncodedByteAlign is true and EndOfLine is false
2014-12-30 00:07:35 +01:00
Jonas Jenwald
75767abb09
Add a reduced test case for issue 4379
...
This should have been part of PR 5136.
Based on comments https://github.com/mozilla/pdf.js/issues/4379#issuecomment-51221787 and https://github.com/mozilla/pdf.js/issues/4379#issuecomment-51475463 , it should be OK to include the PDF file in the repo.
2014-12-29 16:28:23 +01:00
Jonas Jenwald
d8b905048b
Add fallback for non-embedded "Century Gothic" CIDFontType2 font (issue 4722 and bug 879561)
...
According to practical experiments, falling back to "Helvetica" when we encounter a non-embedded "[Century Gothic](http://en.wikipedia.org/wiki/Century_Gothic )" `CIDFontType2` font seems to work well.
(Also, the section on Wikipedia about "Printer ink usage" *might* provide some anecdotal evidence that Century Gothic is a fairly standard sans-serif font.)
Obviously this patch doesn't make "Century Gothic" fonts render perfectly, as is often the case with non-embedded fonts, but all the text is now legible in the referenced issues.
Fixes 4722.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=879561 .
2014-12-18 23:19:34 +01:00
Tim van der Meij
a340927687
Test case for issue 5481
2014-12-18 21:26:02 +01:00
Yury Delendik
31ae5f2a3d
Merge pull request #5379 from brendandahl/nbsp
...
Don't map glyphs to unicode non breaking space.
2014-12-18 13:38:03 -06:00
Yury Delendik
f4fa7aaf19
Merge pull request #5383 from Snuffleupagus/bug-1077808
...
Fix searching for end of inline (EI) images with ASCII85Decode filters (bug 1077808)
2014-12-18 10:03:27 -06:00
Tim van der Meij
36fce7db7e
Test case for issue 5475
2014-12-17 22:46:47 +01:00
Tim van der Meij
16833159a9
Test case for issue 5549
2014-12-17 22:42:06 +01:00
Jonas Jenwald
184880a751
Fix searching for end of inline (EI) images with ASCII85Decode filters (bug 1077808)
...
This patch changes searching for the end of inline image streams to rely on the EOD marker for the filters: ASCII85Decode and ASCIIHexDecode.
2014-12-15 18:48:29 +01:00
Jonas Jenwald
3ea81019fe
Add a (linked) test case for bug 1108753 (PR 5276)
...
When submitting PR 5276 there wasn't a good PDF file to include in the test suite. However, with https://bugzilla.mozilla.org/show_bug.cgi?id=1108753 , we now have a better source for a test file, hence this patch.
2014-12-09 01:07:38 +01:00
Jonas Jenwald
df1364a993
Add a (linked) test case for bug 1064894
...
This should have been part of PR 5284.
2014-12-06 14:15:08 +01:00
Jonas Jenwald
78d0d269dc
Fallback to the |Dummy| Pattern when we fail to parse a Shading Pattern (issue 5509)
2014-11-30 21:21:45 +01:00
Jonas Jenwald
5f32f80e34
Add a reduced test case for issue 5470
2014-11-04 16:16:48 +01:00
Yury Delendik
a737e5b706
Merge pull request #5437 from Snuffleupagus/bug-878194-eq-test
...
Change bug878194 to an |eq| test
2014-10-27 08:32:03 -07:00
Jonas Jenwald
58cc39f329
Add a reduced test case for issue 5291
2014-10-25 11:35:13 +02:00
Jonas Jenwald
bf0d03bccd
Change bug878194 to an |eq| test
2014-10-23 14:19:05 +02:00
Yury Delendik
04390d8252
Merge pull request #5426 from fkaelberer/fixJpxOutOfPackets
...
Fix JPX "Out of Packets" Error (issues 4358, 4659, 4814)
2014-10-22 09:40:29 -05:00
Yury Delendik
9e7966a446
Merge pull request #5390 from Snuffleupagus/inline-jpeg-image-loading-test-case
...
Add a reduced test case for PR 5286
2014-10-22 09:38:31 -05:00
Yury Delendik
6b2c900722
Merge pull request #5401 from Snuffleupagus/bug-847420-test
...
Add a reduced test case for bug 847420
2014-10-22 08:32:20 -05:00
Jonas Jenwald
88c88d08e1
Add a reduced test case for PR 5286
2014-10-22 14:11:15 +02:00
fkaelberer
6337a430b3
Add test case for JPX "Out of packets" error
2014-10-22 10:43:02 +02:00
Jonas Jenwald
4ac4d49158
Avoid rendering invisible Type3 fonts (issue 5421)
2014-10-18 22:29:21 +02:00
Yury Delendik
2d7a34d692
Fixes decoding for CMYK jpegs.
2014-10-15 15:56:29 -05:00
Jonas Jenwald
0ffb54b95f
Add a reduced test case for bug 847420
2014-10-12 22:36:50 +02:00
Brendan Dahl
ccd7ae33e4
Merge pull request #5352 from Snuffleupagus/issue-2840
...
Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file
2014-10-08 10:09:10 -07:00
Tim van der Meij
b215af30d3
Require destinations when they are needed and do not fetch all of them in advance
2014-10-06 22:26:18 +02:00
Brendan Dahl
2fc5e6a9ad
Don't map glyphs to unicode non breaking space.
2014-10-02 10:58:56 -07:00
Jonas Jenwald
df2a4afd36
Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file
2014-09-27 13:20:04 +02:00
Yury Delendik
744c8e8d7e
Merge pull request #5250 from Snuffleupagus/issue-5238
...
Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
2014-09-26 15:18:33 -05:00
Yury Delendik
4189c78488
Merge pull request #5308 from Snuffleupagus/fonts-mmtype1
...
Add support for MMType1 fonts with embedded font files
2014-09-25 08:08:25 -05:00
Jonas Jenwald
dc5b0d251f
Improve the getData unit test
...
As a follow-up to PR #4795 , this patch improves the `getData` unit test to ensure that the returned data is of the expected type and of the correct length.
2014-09-23 13:16:58 +02:00
Mitar
2f72ac1255
textLayer is not used anymore in render context.
...
It should be removed to prevent confusion when reading the code.
2014-09-19 15:13:01 -07:00
Jonas Jenwald
3c759e296a
Add support for MMType1 fonts with embedded font files
2014-09-18 16:10:46 +02:00
Jonas Jenwald
b16c973d9d
Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
2014-09-16 21:38:53 +02:00
Yury Delendik
15681adbb9
Merge pull request #5245 from Snuffleupagus/issue-5244
...
Further amend GlyphMapForStandardFonts (issue 5244)
2014-09-16 10:12:07 -05:00
Yury Delendik
ffb613bbac
Merge pull request #5275 from Snuffleupagus/exception-propagation
...
Fix the exception propagation when rejecting workerReadyCapability
2014-09-16 10:05:34 -05:00
Yury Delendik
8206894d24
Merge pull request #5247 from Rob--W/wiki-test-link-gen
...
Fix links to wiki subsections and remove TextDecoder feature tests
2014-09-09 10:12:46 -05:00
Yury Delendik
aa8d3d98f8
Fetches params in makeFilter
2014-09-09 08:29:31 -05:00
Jonas Jenwald
27a80f3b88
Add unit test for |MissingPDFException|
2014-09-08 22:34:26 +02:00
Jonas Jenwald
6077e93275
In test/unit/api_spec.js rename the function waitsForPromise
to waitsForPromiseResolved
and add a waitsForPromiseRejected
function
2014-09-08 22:34:26 +02:00
Yury Delendik
a19790d653
Merge pull request #5235 from Snuffleupagus/remove-duplicate-test-file
...
Remove a duplicate PDF file from the test suite
2014-09-08 11:03:37 -05:00
Tim van der Meij
1d9dc37337
Merge pull request #5248 from Snuffleupagus/getStats-unit-test
...
Add getStats unit test
2014-09-05 19:17:43 +02:00
Jonas Jenwald
3ca2c3f4a7
Add ZapfDingbats testcase
2014-09-03 21:57:57 +02:00
Jonas Jenwald
be595d0721
Further amend GlyphMapForStandardFonts (issue 5244)
2014-09-01 10:51:22 +02:00
Jonas Jenwald
fb7489ffd0
Add getStats unit test
...
Since some Telemetry data depends on `getStats`, having a unit test should make it more diffucult to accidentally break this without noticing.
2014-08-30 22:12:34 +02:00
Rob Wu
b57d35034c
Remove TextDecoder feature tests
...
TextDecoder is not required by PDF.js any more, and the wiki entry has been deleted as well:
13ddaa9845...09aac34e58
2014-08-30 10:55:00 +02:00
Rob Wu
fe598d1a55
Update link-to-wiki generator
2014-08-30 10:51:50 +02:00
Jonas Jenwald
3152085b0d
Remove a duplicate PDF file from the test suite
...
The files issue3115.pdf and issue2337.pdf are identical, the only difference being that the first one is an `eq` test and the second one a `load` test. Hence there is no reason to keep the `load` test, since it's just a subset of the `eq` test.
2014-08-24 16:23:25 +02:00
Yury Delendik
be998261cc
Fixes Type3 negative font direction
2014-08-18 17:57:52 -05:00
Kalervo Kujala
0c5525dc8a
CalRGB: optimize CalRGB calculations
...
Also fix one silly mistake.
2014-08-16 11:38:15 +03:00
Jonas Jenwald
9f1e140c4f
Add unit test for PDF file loaded as typed array
2014-08-15 17:21:46 +02:00
Yury Delendik
fa8d385818
Merge pull request #5165 from kkujala/calrgb
...
implement CalRGB color space
2014-08-15 10:19:49 -05:00
Kalervo Kujala
1e4a7f981e
implement CalRGB color space
...
Both whitespace and blackspace support are implemented.
2014-08-14 23:49:19 +03:00
Jonas Jenwald
b201cc4940
Remove the remaining references to cidmaps.js from the test suite
2014-08-14 12:42:57 +02:00
Jonas Jenwald
1fb404aff2
Fix CMap unit tests
...
When the binary CMaps were added, some of the relevant unit tests were not changed. This patch updates them, so that we actually test the current implementation.
What's somewhat troubling here is that we currently have CMap unit tests that passes, *despite* not working as intended (the CMap files doesn't load).
2014-08-14 12:36:49 +02:00
Jonas Jenwald
06b5d97bc6
Remove two instances of leftover console.log debug statements
...
The `console.log` statement in evaluator_spec.js is obviously not needed. In obj.js it could have been replaced by `info`, but that seemed unnecessary given the already existing `error`.
2014-08-13 14:29:46 +02:00
Jonas Jenwald
c3691500fa
Merge pull request #5172 from nnethercote/readCharCode-retval
...
Avoid an allocation in readCharCode().
2014-08-13 11:03:07 +02:00
Nicholas Nethercote
61e6b576d4
Avoid an allocation in readCharCode().
...
readCharCode() returns two values, and currently allocates a length-2
array on every call to do so. This change makes it instead us a
passed-in object which can be reused.
This tiny change reduces the total JS allocations done for the document
in Mozilla bug 992125 by 4.2%.
2014-08-12 16:12:58 -07:00
Jonas Jenwald
fc5ad8a8d6
Add even more unit tests for the API
...
This patch replaces most of the remaining TODOs in test/unit/api_spec.js with actual tests.
2014-08-12 12:09:31 +02:00
Yury Delendik
fa53fcbf57
Merge pull request #5095 from Snuffleupagus/issue-5070
...
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
2014-08-05 17:41:38 -05:00
Jonas Jenwald
cb4a847347
Merge pull request #5134 from yurydelendik/fun4
...
Improves speed of the functions
2014-08-05 23:51:03 +02:00
Yury Delendik
6865c284a7
Merge pull request #5111 from nnethercote/better-cidchars
...
Represent cid chars using integers, not strings.
2014-08-04 22:26:55 -05:00
Yury Delendik
f750e35224
Optimizes functions to not create arrays
2014-08-04 11:23:11 -05:00
Yury Delendik
cb81bd6be6
Compiles some of the FunctionType 4
2014-08-04 11:21:31 -05:00
Jonas Jenwald
8ecbb4da05
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
2014-08-03 21:18:23 +02:00
Jonas Jenwald
70b934c7a5
Add reduced test-cases for issues 4875 and 4881
2014-08-03 18:34:52 +02:00
Jonas Jenwald
c0cbf5f458
Merge pull request #5109 from timvandermeij/strict-equalities-test
...
Use strict equalities in test/*
2014-08-01 13:27:25 +02:00
Nicholas Nethercote
adf58ed687
Represent cid chars using integers, not strings.
...
cid chars are 16-bit unsigned integers. Currently we convert them to
single-char strings when inserting them into the CMap, and then convert
them back to integers when extracting them from the CMap. This patch
changes CMap so that cid chars stay in integer format throughout, saving
both time and space.
When loading the PDF from issue #4580 , this change reduces peak RSS from
~600 to ~370 MiB. It also improves overall speed on that PDF by ~26%,
going from 724 ms to 533 ms.
2014-08-01 02:35:17 -07:00
Tim van der Meij
b0349cd184
Use strict equalities in test/unit/{function_spec, stream_spec, testreporter}.js
2014-07-31 23:08:55 +02:00
Tim van der Meij
e525902241
Use strict equalities in test/driver.js
2014-07-31 23:08:54 +02:00
Jonas Jenwald
26f5b1b2d3
Add a couple of reduced test-cases for PR 4259
...
PR 4259 fixed a large number of font bugs, but none of those where added as test-cases. This was, in my opinion, unfortunate since it increases the risk of regressions in the future when other font bugs are fixed.
This PR simply adds a few more test-cases, to improve our test coverage somewhat.
2014-07-31 13:46:11 +02:00
Jonas Jenwald
50eeff2fab
Add a reduced test-case for issue 4800
2014-07-30 22:15:06 +02:00
Yury Delendik
7026543663
Merge pull request #5059 from timvandermeij/unused-code
...
Removing unused code and enforcing additional JSHint options
2014-07-29 15:04:43 -05:00
Jonas Jenwald
e5f249605c
Add a reduced test-case for bug 1027533
2014-07-29 16:48:01 +02:00
Jonas Jenwald
2485f11829
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
2014-07-24 15:03:22 +02:00
Jonas Jenwald
f13c217b25
Fix another seac regression (issue 4801)
2014-07-22 21:44:13 +02:00
Yury Delendik
53320ce734
Merge pull request #5012 from Snuffleupagus/issue-5010
...
Prevent CMapFactory.create from failing by passing the necessary parameters from PartialEvaluator_readToUnicode (issue 5010)
2014-07-22 10:54:35 -05:00
Tim van der Meij
7586d777eb
Enforcing JSHint's undef option
2014-07-19 16:41:07 +02:00
Tim van der Meij
34728ee49b
Removing unused code
2014-07-18 22:34:50 +02:00
Jonas Jenwald
cbe097c0cb
In the reftest analyzer, make it possible to toggle "Circle differences" with the D key
...
It's currently possible to step through the test results using the <kbd>N</kbd> and <kbd>P</kbd> keys, and you can also switch between test and reference images with the <kbd>T</kbd> key.
However if you want to highlight the differences, that can only be done by clicking. This has always annoyed me somewhat, so this patch adds support for toggling the differences view with the <kbd>D</kbd> key.
2014-07-16 12:21:32 +02:00
Jonas Jenwald
a7c786775d
[CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881)
2014-07-05 00:18:51 +02:00
Jonas Jenwald
04975acceb
Prevent CMapFactory.create from failing by passing the necessary parameters from PartialEvaluator_readToUnicode (issue 5010)
2014-06-27 00:46:16 +02:00
Yury Delendik
c28839b2f3
Merge pull request #4944 from Snuffleupagus/issue-4934
...
Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934)
2014-06-23 21:49:24 -05:00
Nicholas Nethercote
081866a184
Use null instead of [] for ops with no args.
...
This reduces peak RSS on one test file from ~600 to ~560 MiB.
2014-06-22 16:03:48 -07:00
Yury Delendik
bdeca30fbf
Splits shared/annotation.js into core/ and display/
2014-06-17 17:43:33 -05:00
pramodhkp
1d00e9d13c
Added getOperatorList to api.js
2014-06-18 01:30:42 +05:30
Jonas Jenwald
158790981c
Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934)
2014-06-14 22:59:08 +02:00
Yury Delendik
34298e4ba7
Adds test case for JPX COC marker
2014-06-13 18:22:42 -05:00
Daniel West
1fce2856c6
Added support for decrypting PDF 1.7/2.0 Algorithm 5 revision 5 and 6.
...
*Added AES128 Encryption
*Added AES258 Encryption/Decryption
*Added SHA256
*Added SHA512
*Added class to handle 8 byte integers and associated bit operations
*Added SHA384
*Added routines to handle new algorithm and perform PDF2.0 hashing.
2014-06-13 13:05:47 -05:00
Nicholas Nethercote
7923eb7edb
Fix mishandling of incomplete, inverted masks.
2014-06-13 06:14:52 -07:00
Tim van der Meij
e9e5ac5a11
Removes statcmp.py
2014-06-12 21:16:40 +02:00
Tim van der Meij
0ee6180dd3
Merge pull request #4864 from fkaelberer/statcmp.js
...
Translate statcmp.py to JavaScript
2014-06-12 21:11:29 +02:00
Yury Delendik
001238fc4d
Merge pull request #4870 from fkaelberer/enableTestServerCaching
...
Enable browser cache when running test server
2014-06-10 10:11:50 -05:00
Yury Delendik
d379e31d7b
Adds CMYK JPEG test
2014-06-03 08:56:16 -05:00
fkaelberer
7492699543
Add cache expire time to test server
2014-05-31 00:16:56 +02:00
fkaelberer
d7aba7b98b
translate statcmp.py to javascript
2014-05-29 17:31:54 +02:00
Ole Michaelis
b4fb161255
adjust the aurora path in the tests browser.json
...
to match a default OSX installation path
2014-05-27 10:40:15 +02:00
Yury Delendik
fcc4dfd9b5
Moves shared/function.js to core/
2014-05-23 14:11:47 -05:00
Yury Delendik
7a19085159
Moves shared/colorspace.js into core/
2014-05-23 14:11:47 -05:00
Jonas Jenwald
7079992d89
Merge pull request #4770 from yurydelendik/promise-operationlist
...
Adds Promises to getOperatorList
2014-05-19 23:22:40 +02:00
Yury Delendik
d8eb8b1de1
Adds Promise to the getOperatorList
2014-05-19 16:19:54 -05:00
Yury Delendik
5cd6483ebb
Merge pull request #4809 from Snuffleupagus/bug-866395-redux
...
Fix loading of fonts with empty font files (bug 866395 and issue 3522)
2014-05-19 11:23:54 -05:00
Jonas Jenwald
a984fe5b55
Add more unit tests for the API
2014-05-18 23:35:29 +02:00
Jonas Jenwald
3e1db41ddd
Fix loading of fonts with empty font files (bug 866395 and issue 3522)
2014-05-18 21:41:06 +02:00
Christian Krebs
3e7bcaa892
Handle nested post script arguments in the preprocessor
...
Fix for issue #4785
2014-05-15 19:49:43 +02:00
Yury Delendik
048c6d99f1
Merge pull request #4736 from Snuffleupagus/glyph-accent-buildPath
...
Build paths for glyph accents when drawing text as curves
2014-05-14 07:40:50 -05:00
Yury Delendik
179f4231e6
Merge pull request #4795 from Snuffleupagus/getData-unittest
...
Add unit test for getData
2014-05-14 06:55:40 -05:00
Jonas Jenwald
3adab8b183
Fix unit test for getDestinations
2014-05-14 12:54:18 +02:00
Jonas Jenwald
e00b986bd3
Add unit test for getData
2014-05-14 11:57:48 +02:00
Jonas Jenwald
b907e15a90
Build paths for glyph accents when drawing text as curves
2014-05-14 00:04:44 +02:00
Michał Gołębiowski
e625af3fef
Remove type="text/javascript" from script tags.
...
"text/javascript" is not a correct MIME type (the correct one is
"application/javascript") but it's not even needed; all browsers default
to the correct type and treat it as executable JS when type is ommited.
Since not all browsers recognize the "application/javascript" MIME type
the only way to both stay compliant and to support all popular browsers
is to omit the type. It's also shorter this way.
2014-05-13 02:41:01 +02:00
Yury Delendik
a26d28a393
Merge pull request #4683 from yurydelendik/grouppath
...
Groups path commands into single operation
2014-05-08 22:16:58 -05:00
Yury Delendik
9f9454d2ae
Refactors new extension find bar code to support old FF versions
2014-05-08 09:05:28 -05:00
Adam Dane [:hobophobe]
bc66c8119e
Add getFindBar for Fx extension
2014-05-07 18:45:24 -05:00
Yury Delendik
68e57f2232
Merge pull request #4732 from yurydelendik/newtest
...
Fixes tests for #926 and #2537
2014-05-05 11:54:41 -05:00
Tim van der Meij
4caf5b694e
Completes unit tests for PostScript evaluator and fixes two bugs in the evaluator itself
2014-05-03 12:18:18 +02:00
Yury Delendik
ab2d376757
Removs missing test file for #926
2014-05-02 14:27:13 -05:00
Yury Delendik
b7bb016b98
Missing test for #2537 ( e4c3b4501d
)
2014-05-02 14:04:16 -05:00
Yury Delendik
63d5aae3f6
Groups path commands into single command
2014-04-30 09:09:04 -05:00
Jonas Jenwald
747dec16b2
Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
2014-04-28 23:33:54 +02:00
Yury Delendik
0d30bb040e
Merge pull request #4699 from yurydelendik/testmem
...
Reduces memory used during testing
2014-04-28 11:42:31 -05:00
Yury Delendik
31f2a24e78
Reduces memory used during testing
2014-04-28 11:15:46 -05:00
Yury Delendik
58f697f977
Merge pull request #4528 from bthorben/lessColorConversion
...
Less color conversion
2014-04-28 08:28:33 -05:00
Yury Delendik
98e023e464
Guesses Type1C font type based on file content
2014-04-24 11:48:18 -05:00
Thorben Bochenek
e8f0700bfa
Move the colour conversion to jpg.js
...
Benchmarking shows that this improves performance for the invitation document
from https://github.com/mozilla/pdf.js/issues/3809 by 35%
2014-04-24 15:07:12 +02:00
Yury Delendik
a22258a6b3
Merge pull request #4638 from yurydelendik/issue4630
...
Recognizes ASCII type1 encoding
2014-04-17 08:39:31 -05:00
Yury Delendik
2c6692050b
Merge pull request #4640 from yurydelendik/special-powers
...
Fix special powers add-on for firefox.
2014-04-17 08:06:54 -05:00
Yury Delendik
bf3a2488df
Recognizes ascii type1 encoding
2014-04-17 07:52:33 -05:00
Yury Delendik
98ab547140
Fixes webbrowser.js to avoid undefined callback call
2014-04-17 07:35:31 -05:00
Brendan Dahl
339f8f0ac9
Call correct quit function and wait request sending.
2014-04-17 07:34:38 -05:00
Brendan Dahl
70ce3a88a1
Use special powers quit in unit tests.
2014-04-17 07:34:34 -05:00
Yury Delendik
1b636532d6
Adjusts mozcentral test files
2014-04-14 07:03:05 -05:00
Brendan Dahl
da522d42d4
Fix special powers add-on for firefox.
2014-04-11 10:40:15 -07:00
Brendan Dahl
b242826d29
Fix seac regression.
2014-04-11 09:55:39 -07:00
Yury Delendik
003e94885b
Tests for text layer
2014-04-10 19:22:13 -05:00
Tim van der Meij
1d066b768f
Removes custom test/reporter.js from the lint process
2014-04-11 00:41:18 +02:00
Tim van der Meij
7a2cb7cddd
Fixes lint warning W004 in /test
2014-04-11 00:02:33 +02:00
Tim van der Meij
10f80bda23
Fixes lint warning W004 in src/shared
2014-04-11 00:02:32 +02:00
Tim van der Meij
a71a87a821
Fixes lint warning W018: confusing use of exclamation mark
2014-04-11 00:02:31 +02:00
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
2014-04-09 16:44:07 -07:00
Yury Delendik
9ccdbbcb55
Merge pull request #4574 from Snuffleupagus/bug-850854
...
Handle 'space' character correctly in WinAnsiEncoding (bug 850854)
2014-04-09 14:36:49 -05:00
Yury Delendik
7a321dbf7e
Merge pull request #4569 from Snuffleupagus/bug-878026
...
Handle 'space' character correctly in MacRomanEncoding (bug 878026)
2014-04-09 10:44:10 -05:00
Jonas Jenwald
9e6c66be12
Handle 'space' character correctly in WinAnsiEncoding (bug 850854)
2014-04-08 13:07:29 +02:00
Brendan Dahl
ed1f8c33bd
Merge pull request #4286 from yurydelendik/webgl
...
WebGL and misc memory optimizations
2014-04-07 14:33:34 -07:00
Jonas Jenwald
8fc4ebd5cb
Handle 'space' character correctly in MacRomanEncoding (bug 878026)
2014-04-07 20:59:26 +02:00
Yury Delendik
89a676a49c
Protects from killing a closed process
2014-04-07 09:31:04 -05:00
Yury Delendik
b72094d740
Using shell/cmd commands to kill browser tasks
2014-04-07 07:59:27 -05:00
Thorben Bochenek
c834ba7c3e
Make Opera a possible browser to test with
2014-04-04 15:16:07 +02:00
Thorben Bochenek
5c6985bc82
Remove unused variable
2014-04-04 14:34:30 +02:00
Yury Delendik
f57c6935d7
Implements WebGL support
2014-04-03 08:36:22 -05:00
Yury Delendik
d7174582c0
Better test process killing for Windows
2014-04-02 08:02:40 -05:00
Yury Delendik
63f438006b
Fixes lint for windows; adds test/font/fontutils.js
2014-03-31 08:50:53 -05:00
Yury Delendik
4d3b15a486
Cools down Chrome/Windows during testing
2014-03-31 07:46:11 -05:00
Jonas Jenwald
7d5bf83ce8
Fix typo in test/ttx/README.md
2014-03-28 00:05:22 +01:00
Yury Delendik
cc0c0747b5
Disables range requests for chrome windows during testing
2014-03-25 14:53:40 -05:00
Yury Delendik
1e1667c592
Handles HTTP redirects
2014-03-25 14:07:08 -05:00
Yury Delendik
0fe0bb12d4
Removes test.py
2014-03-25 14:07:08 -05:00
Yury Delendik
c2376e5cea
Migrating test.py to test.js
2014-03-25 14:07:08 -05:00
Yury Delendik
567f1f4af0
Makes sure the results are send /handled in right order
2014-03-25 14:07:08 -05:00
Yury Delendik
4df24f457a
Replaces pythons web server
2014-03-25 14:07:08 -05:00
Yury Delendik
20a91bcdbf
Fixes ignoring of the escaped CR LF
2014-03-20 11:50:12 -05:00
Yury Delendik
1801fb2c37
Merge pull request #4474 from chriskr/draw-image-subpixel-support
...
Introduce paintSolidColorImageMask command to handle 1x1 solid image
2014-03-19 14:31:15 -05:00
Yury Delendik
305274cd45
Merge pull request #4481 from bthorben/refactor/pdf_manager.js
...
refactor src/core/pdf_manager.js: rename pdfModel to pdfDocument
2014-03-19 10:33:42 -05:00
Christian Krebs
543117dd0e
Added TC for issue 4436
2014-03-19 13:37:53 +01:00
Thorben Bochenek
c547f17ee5
Add Test for PDFDocumentProxy_getPageIndex
2014-03-19 10:17:58 +01:00
Yury Delendik
329d0ec30b
Merge pull request #4464 from bthorben/issue#4461
...
Fixes pages without Resources in their dictionary
2014-03-18 13:00:21 -05:00
Thorben Bochenek
1d663876b1
Add load test for Issue #4461
2014-03-18 14:10:44 +01:00
Brendan Dahl
68be273c69
Merge pull request #4470 from yurydelendik/packcmap
...
CMaps binary packing
2014-03-17 12:27:35 -07:00
Yury Delendik
1d8f6cf0e7
Updates make.js for cmaps and make binary cmaps by default
2014-03-17 13:30:43 -05:00
Yury Delendik
69efd9cb96
CMaps binary packing
2014-03-14 16:46:35 -05:00
Jonas Jenwald
2bd81786c2
Fix coding style in test/unit/testreporter.js
2014-03-14 15:46:23 +01:00
Jonas Jenwald
9e3f7e4d6d
Fix coding style in test/unit/crypto_spec.js
2014-03-14 15:41:12 +01:00
Jonas Jenwald
6489a80dd0
Fix coding style in test/unit/font_spec.js
2014-03-14 15:38:34 +01:00
Jonas Jenwald
3cd64a85ba
Fix coding style in test/unit/function_spec.js
2014-03-14 15:35:04 +01:00
Jonas Jenwald
7d4acc13fb
Fix coding style in test/unit/parser_spec.js
2014-03-14 15:32:32 +01:00
Jonas Jenwald
9dfc26e1e3
Fix coding style in test/unit/stream_spec.js
2014-03-14 15:31:00 +01:00
Jonas Jenwald
e808bf5736
Fix coding style in test/driver.js
2014-03-14 15:25:38 +01:00
Yury Delendik
1c0e1cc591
Merge pull request #4444 from nnethercote/min-length
...
Estimate the size of decoded streams in advance.
2014-03-13 10:58:31 -05:00
Yury Delendik
7963f22545
Merge pull request #4259 from brendandahl/built-in-cmaps-squash
...
Adds built in CMaps and unifies the glyph mapping.
2014-03-13 10:27:48 -05:00
Nicholas Nethercote
b3024db677
Estimate the size of decoded streams in advance.
...
When decoding a stream, the decode buffer is often grown multiple times, its
byte size increasing like so: 512, 1024, 2048, etc. This patch estimates the
minimum size in advance (using the length of the encoded stream), often
allowing the smaller sizes to be skipped. It also renames numerous |length|
variables as |maybeLength| to make it clear that they can be |null|.
I measured this change on eight documents. This change reduces the cumulative
size of decode buffer allocations by 0--32%, with 10--20% being typical. This
reduces peak RSS by 10 or 20 MiB for several of them.
2014-03-13 02:06:58 -07:00
Brendan Dahl
72a9c7810b
Merge pull request #4246 from pnml/hiresmask
...
Support for the image mask in higher resolution than the image itself
2014-03-10 10:34:49 -07:00
Basil A. Zabairatsky
555d33ffc7
Support for the image mask in higher resolution than the image itself
2014-03-07 02:16:39 +06:00
Yury Delendik
ad4eb9a21d
Merge pull request #4354 from nnethercote/Name-cache
...
Use a cache to minimize the number of Name objects.
2014-03-02 18:44:29 -06:00
Mitar
2c82e720b8
Updated to current latest stable version of jshint.
2014-03-01 13:31:25 -08:00
Nicholas Nethercote
fdb7c218da
Use a cache to minimize the number of Name objects.
2014-02-27 20:41:03 -08:00
Tim van der Meij
5ef87394e5
Rewritten reftest analyzer from XHTML to HTML5
2014-02-24 23:00:46 +01:00
Brendan Dahl
b5b94a4af3
Use built in CMaps and unify the glyph mapping.
2014-02-11 10:27:09 -08:00
Brendan Dahl
fc0106822c
Change test font to one that works with ttx v2.4.
2014-02-10 14:53:50 -08:00
Ophir LOJKINE
4a66eccedc
Rewrite Lexer_getNumber.
...
Now, it computes the numbers with only basic arithmetic operations, without first creating a string and then calling parseFloat.
The new function doesn't behave exactly the same as the old one.
In particular, the old behaviour was that when there was a number immediatly followed by an 'E', the 'E' was consumed. Now it's not. It allows for "glued" numbers and operators.
Also, the new function is faster and consumes less memory.
2014-02-01 21:46:09 +01:00
Brendan Dahl
54f6291cc9
Merge pull request #4207 from yurydelendik/function-split
...
Basic function.js split
2014-01-31 09:37:59 -08:00
Yury Delendik
a583c319a1
Implements shading types 4-7
2014-01-27 20:35:51 -06:00
Yury Delendik
e9327050c3
Basic function.js split
2014-01-27 20:29:47 -06:00
Yury Delendik
bf432a37bb
Refactors shared/pattern.js into core/ and display/
2014-01-25 12:18:22 -06:00
Brendan Dahl
f18e3e9e0f
Merge pull request #4144 from yurydelendik/api-doc
...
Misc fixes for the API docs
2014-01-21 11:31:16 -08:00
Jonas Jenwald
575bdd8863
Fix loading of fonts with invalid encoding name entry (bug 859204 and 878112)
2014-01-21 02:03:28 +01:00
Yury Delendik
96fff4cc74
Refactors getTextContent return value
2014-01-17 13:26:00 -06:00
Yury Delendik
09f8f951c8
Extracts evaluator preprocessor and refactor text extraction
2014-01-17 07:16:52 -06:00
Brendan Dahl
ff66c23e6e
Merge pull request #4089 from yurydelendik/issue3725
...
Takes ascent/descent in account in the text layer
2014-01-16 13:12:04 -08:00
Brendan Dahl
edce4550db
Fix reftest analyzer naming(again).
2014-01-08 14:02:07 -08:00
Brendan Dahl
508b00a34f
Merge pull request #4071 from yurydelendik/bug921760
...
Adds glyph mapping for standard fonts
2014-01-08 12:36:54 -08:00
Yury Delendik
0131101275
Takes ascent/descent in account in the text layer
2014-01-08 13:50:52 -06:00
Brendan Dahl
bac4133f21
Merge pull request #4068 from yurydelendik/bug864847
...
Adjusts heuristic for disabling Symbol encoding
2014-01-08 10:48:18 -08:00
Yury Delendik
ec01f6734f
Merge pull request #4087 from brendandahl/analyzer
...
Label ref test analyzer images.
2014-01-08 07:24:03 -08:00
Brendan Dahl
fd139324ef
Label ref test analyzer images.
2014-01-07 16:11:29 -08:00
Yury Delendik
4d01ff4079
Merge pull request #4062 from kkujala/calgray
...
calgray: fix getRgbBuffer problem
2014-01-07 10:54:09 -08:00
Brendan Dahl
2e7c71c75e
Merge pull request #4011 from Rob--W/issue-3885
...
Set eof to true at the end of a FlateStream
2014-01-07 10:52:37 -08:00
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
2014-01-03 18:17:05 -06:00
Yury Delendik
51b958dc2b
Adds glyph mapping for standard fonts
2014-01-03 14:17:50 -06:00
Brendan Dahl
1bada35388
Merge pull request #4001 from jryans/clean-test-pdfs
...
Clean up test PDF references
2014-01-03 09:21:18 -08:00
Yury Delendik
5973d40afe
Adjusts heuristic for disabling Symbol encoding
2014-01-02 18:44:11 -06:00
Kalervo Kujala
4c040dd955
calgray: fix getRgbBuffer problem
...
This fixes issue 3903.
2014-01-01 23:49:03 +02:00
Jonas Jenwald
e6c805490b
[JBIG2] Fix getting decodeParms when it's an array
2013-12-19 20:23:58 +01:00
Rob Wu
4ff1d45f16
Add pdf from issue 3885 to tests
...
Source: https://www.dropbox.com/s/ooqk82fq0gr5p6f/test-min-notext-opt.pdf
2013-12-19 18:38:44 +01:00
J. Ryan Stinnett
ea0ca0f810
Clean up test PDF references
2013-12-16 18:39:17 -06:00
Jonas Jenwald
b1c5ef9ccc
Fix loading of fonts that are not referenced by an object identifier
2013-12-17 00:19:31 +01:00
Brendan Dahl
29ee96cc67
Merge pull request #3927 from Snuffleupagus/issue-3925
...
Prevent updating the current transformation matrix when the stateStack is empty
2013-11-18 14:04:56 -08:00
Brendan Dahl
ff64b50582
Merge pull request #3931 from yurydelendik/bug900822
...
Allocates bigger hashData buffer
2013-11-18 13:09:40 -08:00
Yury Delendik
2b63cd7e62
Allocates bigger hashData buffer
2013-11-18 07:48:06 -06:00
Jonas Jenwald
564ae6e4f7
Prevent updating the current transformation matrix when the stateStack is empty
2013-11-17 01:54:14 +01:00
Yury Delendik
4ce6cb8b0f
Uses postMessage transfers
2013-11-14 15:21:42 -08:00
Brendan Dahl
7bdee4069c
Merge pull request #3848 from brendandahl/page-refs
...
Don't traverse all pages to get a single page.
2013-11-13 17:02:11 -08:00
Brendan Dahl
c2d65fc4ab
Don't traverse all pages to get a single page.
2013-11-13 15:27:46 -08:00
Tim van der Meij
c320a0c2a5
Merge pull request #3887 from yurydelendik/bug903856
...
Fixing glyphs with invalid flags
2013-11-13 14:11:24 -08:00
Yury Delendik
82a9a13e5f
Fixes glyphs with invalid flags
2013-11-13 13:45:59 -06:00
Brendan Dahl
f4942b11f8
Reduce the memory usage of the operator list.
2013-11-13 11:43:38 -08:00
Brendan Dahl
bd6871a1cd
Merge pull request #3884 from yurydelendik/bug868745
...
Resizes loca table when needed
2013-11-11 14:59:18 -08:00
Tim van der Meij
6be8a2bd83
Merge pull request #3882 from yurydelendik/issue3438
...
Ignoring glyphs without points
2013-11-08 14:21:17 -08:00
Yury Delendik
57e2a667ee
Fixes cvt table length; removes cvt when hints invalid
2013-11-08 11:38:36 -06:00
Yury Delendik
d4167b62c8
Merge pull request #3890 from sriram-dev/3205-word-spacing
...
correct word spacing
2013-11-08 09:18:00 -08:00
Brendan Dahl
e076eeb5bd
Merge pull request #3877 from yurydelendik/issue1171
...
Skipping empty font tables
2013-11-08 09:12:04 -08:00
Sriram
8dad6d6e8a
Fix word spacing in Type 0 fonts
...
Fix word spacing in Type 0 font
correct word spacing
correct word spacing in type 0 font
fix word spacing
2013-11-08 20:48:30 +05:30
Brendan Dahl
18d8557abd
Merge pull request #3875 from yurydelendik/issue3025
...
Removes duplicate entries after reading cmap table
2013-11-07 12:29:25 -08:00
Brendan Dahl
c8e021dfa6
Merge pull request #3867 from yurydelendik/pfb
...
Workaround for some bad Type1 data
2013-11-06 11:14:42 -08:00
Jonas Jenwald
4ae3802484
Fix undefined group bounding box
2013-11-04 18:16:33 +01:00
Yury Delendik
175341cb0d
Resizes loca table when needed
2013-11-03 07:29:29 -06:00
Yury Delendik
93076ced03
Ignoring glyphs without points
2013-11-02 17:07:13 -05:00
Yury Delendik
bbda42110b
Skipping empty font tables
2013-11-01 19:05:17 -05:00
Yury Delendik
bb2570c9c1
Removes duplicate entries after reading cmap table
2013-11-01 16:30:28 -05:00
Yury Delendik
cd44093891
Workaround for some bad Type1 data
2013-11-01 13:58:33 -05:00
Yury Delendik
95d9107d8b
Fixes reading Type1 FontBBox data for usWin values
2013-11-01 11:33:30 -05:00
Yury Delendik
83e17c2953
Avoiding 'pc is undefined' failures
2013-10-30 11:14:13 -05:00
Yury Delendik
19485c34c8
Merge pull request #3798 from brendandahl/intersect-bbox
...
Intersect group bounding box with the current canvas dimensions.
2013-10-25 13:42:56 -07:00
Kalervo Kujala
a5bf02573d
Implement initial CalGray support
...
Gamma and Whitepoint are supported in this patch for CalGray.
Blackpoint is not supported.
2013-10-13 19:55:42 +03:00
Brendan Dahl
29b89f1f1e
Intersect group bounding box with the current canvas dimensions.
2013-10-10 12:41:11 -07:00
Yury Delendik
e97e0032df
Merge pull request #3750 from brendandahl/cidfonttype0c
...
Proper glyph selection for CIDFontType0C fonts.
2013-10-02 15:49:52 -07:00
Brendan Dahl
f79c182314
Proper glyph selection for CIDFontType0C fonts.
2013-09-30 21:40:28 -07:00
Sriram
f6eee819e2
Transposed feature for text decoding in jbig2
2013-09-26 20:49:02 +02:00
Yury Delendik
1c7f1cee00
Merge pull request #3674 from brendandahl/cmap-squash
...
Read multi-byte character codes based on codespace ranges.
2013-09-25 18:04:49 -07:00
Brendan Dahl
f32e65b19f
Read multi-byte character codes based on codespace ranges.
2013-09-25 10:32:04 -07:00
Brendan Dahl
730a2cc550
Increase api unit tests timeout for chrome.
2013-09-24 09:30:54 -07:00
Yury Delendik
0fc8bac7c0
Merge pull request #3570 from brendandahl/encoding-wip
...
Fix handling of multiply-encoded glyphs.
2013-08-28 13:51:39 -07:00
Brendan Dahl
547a7aa862
Merge pull request #3615 from yurydelendik/stopindexing
...
Stops objects indexing at the end
2013-08-26 10:33:54 -07:00
Yury Delendik
1f232ded90
Stops objects indexing at the end
2013-08-23 13:03:30 -05:00
Brendan Dahl
db591769a4
Fix handling of multiply-encoded glyphs.
2013-08-22 10:12:16 -07:00
Brendan Dahl
bb2529de03
Move the creation of canvas path fonts to the worker.
2013-08-19 16:33:20 -07:00
Jonas
628f4aaf81
Enable loading of PDFs with undefined or missing stream lengths
2013-08-16 16:32:40 +02:00
Brendan Dahl
5ecce4996b
Split files into worker and main thread pieces.
2013-08-12 10:48:06 -07:00
Tim van der Meij
b2b922b866
Support for CMap GBKp-EUC-H
2013-08-11 10:35:56 +02:00
Jonas
d90ad429f6
Enable loading of PDFs with invalid document information dictionaries
2013-08-08 19:40:54 +02:00
Brendan Dahl
bf72bc94e2
Incrementally render by sending the operator list by chunks as they're ready.
2013-07-31 11:17:36 -07:00
Yury Delendik
f7d2a09bf8
Merge pull request #3506 from brendandahl/base-transform
...
Paint patterns relative to content base transformation.
2013-07-30 14:54:36 -07:00
Yury Delendik
34177b01a4
Fixes glyph 0 in CIDTypeFont2
2013-07-29 15:24:32 -05:00
Brendan Dahl
2aecbe874e
Paint patterns relative to content base transformation.
2013-07-22 14:52:44 -07:00
Yury Delendik
0dd0e2ee64
Merge pull request #3477 from brendandahl/font-loading
...
Use dummy font for testing when pdf fonts are loaded.
2013-07-18 07:01:55 -07:00
Brendan Dahl
e9f5336cc9
Add atob polyfill. Remove uneeded data uri polyfill.
2013-07-17 10:26:12 -07:00
Brendan Dahl
a5cc8d1ec3
Merge pull request #3464 from yurydelendik/bug889327
...
Fixes ASCIIHex decoding
2013-07-16 10:32:35 -07:00
Brendan Dahl
6c6719efeb
Merge pull request #3436 from yurydelendik/jpeg-cmyk
...
Removes browser decoding optimization for JPEG CMYK
2013-07-12 17:54:12 -07:00
Brendan Dahl
e697c598c2
Enable range requests in master mode.
2013-07-12 16:40:19 -07:00
Yury Delendik
8ee9db45ef
Fixes ASCIIHex decoding
2013-07-11 13:33:29 -05:00
Brendan Dahl
5dcc4cd1b4
Merge pull request #3424 from yurydelendik/lookChar
...
lookChar refactoring
2013-07-11 09:08:59 -07:00
Brendan Dahl
d71948038f
Merge pull request #3439 from yurydelendik/smask-preblend
...
Takes SMask's preblending in account
2013-07-09 13:26:44 -07:00
Brendan Dahl
b0f78609b3
Merge pull request #3386 from yurydelendik/ttf-refactor
...
Refactoring of TrueType code and implementation of OpenType font repairing
2013-07-08 22:11:31 -07:00