Commit Graph

1251 Commits

Author SHA1 Message Date
Brendan Dahl
06a49b295a Merge pull request #2786 from yurydelendik/jbig2-len
JBIG2: finds end of a segment when length is not specified
2013-02-27 10:05:52 -08:00
vyv03354
4413262976 Implement "83pv" CMap and fix CIDFontType0 handling 2013-02-28 00:44:38 +09:00
David Cook
355efc46d2 Fix text selection for oddly-spaced TJ commands
This change will discard trailing space adjustments in TJ/showSpacedText()
for the purposes of calculating the text width for text selection. In
pathological cases, a PDF may write one character and then move the text
matrix back to the beginning of the character within one TJ invocation.
This would add up to a canvasWidth of 0, so the text selection <div> would
be scaled to zero pixels wide, even though the character was drawn
normally.

With this change, canvasWidth will not include any adjustments made after
the last character was written. Normal use of TJ will result in the same
text selection behavior, whereas pathological use of TJ will result in the
text selection layer matching the actual width of the characters
displayed.

For an example of such pathological behavior, see http://www.tycovalves-usa.com/ld/CROMC-0297-US.pdf#page=48
2013-02-25 21:00:17 -06:00
Mack Duan
f94221a37f Merge pull request #2789 from yurydelendik/getString
Fixes getString
2013-02-25 14:33:07 -08:00
Brendan Dahl
a13f7964b1 Merge pull request #2686 from vyv03354/bug770409
Implement vertical writing
2013-02-25 12:47:47 -08:00
Brendan Dahl
b89d98eede Merge pull request #2782 from yurydelendik/jbig2-text-align
Fixes symbols positioning in JBIG2
2013-02-25 09:54:05 -08:00
Yury Delendik
4d50965434 Fixes template 1 for decoding 2013-02-24 17:34:00 -06:00
Yury Delendik
95e5429707 Fixes getString 2013-02-23 11:35:18 -06:00
Yury Delendik
1d4372775d JBIG2: finds end of segment when length is not specified 2013-02-23 10:35:41 -06:00
vyv03354
059fd616cd Add a dummy byte at end of the CFF table to satisfy sanitizer
Fixes #2674.
2013-02-23 20:58:54 +09:00
Yury Delendik
cbe829228e Fixes symbols positioning in JBIG2 2013-02-22 22:08:46 -06:00
vyv03354
b591d39130 Remove the test of experimental properties in workers 2013-02-17 14:53:27 +09:00
vyv03354
c5b8ee6a91 Implements vertical writing 2013-02-15 03:53:34 +09:00
j
c33b92036f fix image width/height for zoomed viewport
image width/height is off while pdf is zoomed,
use raw transform values to compute width/height
to fix this.
2013-02-12 16:03:30 +05:30
j
cd42ccd439 add imageLayer
add optional imageLayer object to access images and there
position and size as they are rendered on the canvas.
2013-02-11 00:20:27 +05:30
Yury Delendik
6ce1cfe734 Reverts 729b82, d5f65f and 724add 2013-02-08 14:04:36 -06:00
vyv03354
729b82359a Implements the print permission 2013-02-08 23:28:27 +09:00
Yury Delendik
51c81a1d01 Merge pull request #2695 from yurydelendik/copy-protection-2
Fixes text search for "secured" documents (take 2)
2013-02-07 16:22:31 -08:00
Yury Delendik
d5f65f5431 Fixes text search for "secured" documents 2013-02-07 18:15:39 -06:00
Mack Duan
43e954f11d Merge pull request #2681 from vyv03354/bug767455_basefont
Take BaseFont entry from CIDFont dict instead of Type 0 Font dict
2013-02-07 12:04:46 -08:00
Yury Delendik
129fa5661c Merge pull request #2680 from vyv03354/bug767455_bxex
Reduce warning spam caused by BX/EX
2013-02-05 14:27:40 -08:00
Yury Delendik
578349b4dd Merge pull request #2675 from vyv03354/issue2674
Support non-BMP characters contained in embedded fonts
2013-02-05 14:26:28 -08:00
vyv03354
7fc0c9f2ca Take BaseFont entry from CIDFont dict instead of Type 0 Font dict 2013-02-06 06:47:41 +09:00
vyv03354
521723a9b5 Support non-BMP characters contained in embedded fonts 2013-02-06 06:15:07 +09:00
vyv03354
7dcbf7d2c3 Reduce warning spam caused by BX/EX 2013-02-06 03:57:59 +09:00
Mack Duan
2260458f27 Merge pull request #2671 from yurydelendik/chrome
Workaround for Chrome's issue 174023
2013-02-04 10:00:38 -08:00
Yury Delendik
133d5cf8d2 Workaround for Chrome's issue 174023 2013-02-04 10:51:53 -06:00
Yury Delendik
d13aa38c9c Enforces quotmark=single for jshint 2013-02-02 17:00:13 -06:00
Yury Delendik
5cf0d8fa80 Enforces maxlen for jshint 2013-02-02 16:49:19 -06:00
vyv03354
724add2ffd Make an effort to adhere the spec 7.6.3.2 2013-02-02 02:09:12 +09:00
Jon Buckley
b3634a3826 Issue #2008 - Fix lint errors for src/worker.js 2013-01-31 19:12:46 -05:00
Jon Buckley
e48bb8d966 Issue #2008 - Fix lint errors for src/utils/fonts_utils.js 2013-01-31 19:12:45 -05:00
Jon Buckley
3b3922764e Issue #2008 - Fix lint errors for src/util.js 2013-01-31 19:12:45 -05:00
Jon Buckley
4a292a310f Issue #2008 - Fix lint errors for src/stream.js 2013-01-31 19:12:45 -05:00
Jon Buckley
a1a098fbee Issue #2008 - Fix lint errors for src/pattern.js 2013-01-31 19:12:45 -05:00
Jon Buckley
315ac3ce8c Issue #2008 - Fix lint errors for src/parser.js 2013-01-31 19:12:45 -05:00
Jon Buckley
caaf7e8032 Issue #2008 - Fix lint errors for src/obj.js 2013-01-31 19:12:45 -05:00
Jon Buckley
9b13cbee69 Issue #2008 - Fix lint errors for src/metadata.js 2013-01-31 19:12:45 -05:00
Jon Buckley
21f0ff1dcf Issue #2008 - Fix lint errors for src/jpx.js 2013-01-31 19:12:45 -05:00
Jon Buckley
bc94a4d353 Issue #2008 - Fix lint errors for src/jbig2.js 2013-01-31 19:12:45 -05:00
Jon Buckley
f883a1f40f Issue #2008 - Fix lint errors for src/image.js 2013-01-31 19:12:45 -05:00
Jon Buckley
9ddb4eca95 Issue #2008 - Fix lint errors for src/function.js 2013-01-31 19:12:45 -05:00
Jon Buckley
3793ca5283 Issue #2008 - Fix lint errors for src/fonts.js 2013-01-31 19:12:45 -05:00
Jon Buckley
c281805fde Issue #2008 - Fix lint errors for src/evaluator.js 2013-01-31 19:12:45 -05:00
Jon Buckley
d7b005a79f Issue #2008 - Fix lint errors for src/crypto.js 2013-01-31 19:12:45 -05:00
Jon Buckley
d59e2105b1 Issue #2008 - Fix lint errors for src/core.js 2013-01-31 19:12:45 -05:00
Jon Buckley
4918c6f848 Issue #2008 - Fix lint errors for src/colorspace.js 2013-01-31 19:12:44 -05:00
Jon Buckley
98c2f96260 Issue #2008 - Fix lint errors for src/canvas.js 2013-01-31 19:12:44 -05:00
Jon Buckley
d301c1f13f Issue #2008 - Fix lint errors for src/bidi.js 2013-01-31 19:12:44 -05:00
Jon Buckley
c67d9d40b8 Issue #2008 - Fix lint errors for src/api.js 2013-01-31 19:12:44 -05:00
Yury Delendik
9c044e2c31 Fallback when AcroForm is present 2013-01-31 16:46:44 -05:00
Yury Delendik
e5a6246f70 Fixes cmap sanitizer fro #215 2013-01-31 16:13:36 -05:00
Brendan Dahl
4a19437537 Merge pull request #2630 from yurydelendik/width-cid
Fixes reading of the widths for CID fonts
2013-01-31 07:12:47 -08:00
Yury Delendik
cca1a68adf Merge pull request #2572 from mduan/issue2477
Make canvas transform matrix account for devicePixelRatio
2013-01-30 20:25:43 -08:00
mduan
e4c3b4501d Sanitization of truetype fonts to fix #2537 2013-01-30 19:01:53 -05:00
mduan
0527b8bc8d Fix invalid version number in truetype 'head' table 2013-01-30 16:52:19 -05:00
mduan
6bacb38692 Make canvas transform matrix account for devicePixelRatio 2013-01-30 16:06:12 -05:00
Yury Delendik
0f9b63e8be Merge pull request #2634 from Pomax/type1-string-index-SIDs
changed the type1font cff wrapping to use offsets 391,392... instead of 0,1... for pointing to strings in the String INDEX
2013-01-30 11:33:31 -08:00
mduan
5bffd2e7d8 Implement 9.6.6.4 of pdf spec for truetype fonts 2013-01-30 13:01:32 -05:00
Yury Delendik
8c78268a12 Merge pull request #2628 from mduan/issue2128
Add support for GBK-EUC-H encoding for cid fonts
2013-01-30 09:44:24 -08:00
Yury Delendik
d61d9a23ed Merge pull request #2624 from vyv03354/bug835661
Add Hankaku-Latin cid to Unicode mappings
2013-01-30 08:26:45 -08:00
Mike Kamermans
86c6bf1a67 changed the type1font cff wrapping to use offsets 391,392... instead of 0,1... for pointing to strings in the String INDEX 2013-01-30 11:15:08 -05:00
mduan
81399ee068 Add support for GBK-EUC-H encoding for cid fonts 2013-01-30 09:35:52 -05:00
vyv03354
a8aed74431 Add Hankaku-Latin cid to Unicode mappings 2013-01-30 21:48:18 +09:00
Yury Delendik
b5a38ded4c Fixes reading of the widths for CID fonts 2013-01-29 17:19:08 -05:00
Bill Walker
12af2f9431 fix for #2219, "provide a better error message when file= not found/accessible"
summary: create a new Exception class for missing PDF's, use it in place of generic

add new MissingPDFException to util.js
handle MissingPDF in api.js
handle MissingPDF in viewer.js, using new missing_file_error message
add new missing_file_error to l10n/en-US/viewer.properties
send MissingPDF from WorkerMessageHandler's loadDocument
send MissingPDF from GetDocRequest handler
2013-01-29 13:17:04 -08:00
Yury Delendik
9af6e05456 Merge pull request #2615 from vyv03354/master
Fixes CFF parser failure when CharStrings contains cntrmask
2013-01-26 08:46:34 -08:00
Yury Delendik
df731e7d9d Merge pull request #2527 from brendandahl/type1-charstrings
Evaluate type 1 charstrings for conversion to type 2.
2013-01-26 07:45:23 -08:00
vyv03354
a254de86fb CFF parser didn't count hints defined by hstem/vstem 2013-01-26 22:08:45 +09:00
Yury Delendik
9a58bc9aba Merge pull request #2581 from brendandahl/fix-cid
Fix normalized CID fonts for direct write 6.1.
2013-01-25 06:23:17 -08:00
Yury Delendik
2057855c8a Merge pull request #2602 from vyv03354/issue2598
Update font name matching for Type 0 CIDFont
2013-01-24 15:40:39 -08:00
vyv03354
622276ecc8 Update font name matching for Type 0 CIDFont 2013-01-24 08:03:13 +09:00
vyv03354
0df411a3da Fixes non-Japanese characters spacing 2013-01-24 01:23:22 +09:00
Brendan Dahl
a0313bef22 Merge pull request #2570 from mduan/issue2556
Fix bug w/ exception not being passed to error callbacks of a Promise
2013-01-22 14:46:08 -08:00
Brendan Dahl
45daf4e936 Merge pull request #2557 from mduan/issue2391-invalid-font
Default to a built-in font if an invalid non-embedded font is encountered
2013-01-18 12:35:59 -08:00
Brendan Dahl
dc914fe7ce Fix normalized CID fonts for direct write 6.1. 2013-01-18 11:05:38 -08:00
mduan
b718a3604a Default to a built-in font if an invalid non-embedded font is encountered 2013-01-16 13:57:41 -08:00
Yury Delendik
aac622a9b1 Merge pull request #2567 from vyv03354/master
Supports 'H/V', 'EUC-H/V' and '90ms*' CMaps
2013-01-16 08:07:33 -08:00
Yury Delendik
a3dd0098e0 Merge pull request #2571 from mduan/issue2129
Do not error when an EndOfPage segment is encountered in jbig2
2013-01-16 07:32:45 -08:00
vyv03354
deba913651 Merge branch 'master' of https://github.com/mozilla/pdf.js 2013-01-16 23:40:32 +09:00
vyv03354
38ffebc987 Supports 'H/V', 'EUC-H/V' and '90ms*' CMaps 2013-01-16 21:58:18 +09:00
mduan
317db2e7c6 Do not error when an EndOfPage segment is encountered in jbig2 2013-01-15 16:07:01 -08:00
mduan
5ab3bb1e03 Skip commands that have too few arguments
- Commands that have too few args will be skipped
- Commands that have too many args will generate an info, but still
execute
2013-01-15 14:07:16 -08:00
mduan
fadcb71c21 Handle missing 'FontName' entry in FontDescriptor object 2013-01-15 11:48:20 -08:00
mduan
4f1e94c9f7 Fix bug w/ exception not being passed to error callbacks of a Promise 2013-01-15 11:39:12 -08:00
Yury Delendik
e61b104852 Merge pull request #2547 from mduan/issue2085
Support corrupted pdfs that are encrypted but lack 'ID' in trailer
2013-01-14 14:51:42 -08:00
mduan
48fa0172ed Support corrupted pdfs that are encrypted but lack 'ID' in trailer 2013-01-14 13:43:10 -08:00
vyv03354
0980b4c322 Fix a problem about Japanese PDFs without embedded fonts 2013-01-12 11:18:44 -06:00
Brendan Dahl
a79f005527 Fix isDict when type is missing in dictionary. 2013-01-10 16:32:26 -08:00
Brendan Dahl
b5278c5e27 Evaluate type 1 charstrings for conversion to type 2. 2013-01-09 17:33:59 -08:00
Brendan Dahl
e978ea2617 Merge pull request #2540 from mduan/handle-broken-hex-string
Handle broken hex string
2013-01-08 15:54:43 -08:00
mduan
eb8f4e8343 Handle some illegal characters in hex string
Do not throw exception when hex strings are in the wrong format

Currently pdf.js is throwing an exception for the following hex string:

`<7 0 2 15 5 2 2 2 4 3 2 4>`

The issue is that the 15 is not a valid hex character so pdf.js ends up
throwing an exception.

This diff changes the parser to process the above hex string as follow:

`70 21 55 2 24 32` (Note: the final 4 of the hex string is ignored)

replicating the behaviour of MuPDF, and doesn't throw an exception.
2013-01-08 15:29:24 -08:00
Brendan Dahl
3aea29c7aa Merge pull request #2526 from yurydelendik/create-os2
Fixes creation of OS/2 table
2013-01-08 12:11:42 -08:00
Yury Delendik
318e7f6949 Merge pull request #2500 from brendandahl/private-entries
Add support for more Type1 private dictionary entries.
2013-01-08 11:24:38 -08:00
Brendan Dahl
9635612034 Merge pull request #2525 from yurydelendik/version-info
Traces pdf.js version
2013-01-08 11:17:42 -08:00
Brendan Dahl
2cbb35362e Add support for more Type1 private dictionary entries. 2013-01-08 10:44:39 -08:00
Brendan Dahl
7d9938df5f Merge pull request #2520 from yurydelendik/disable-blues
Disables *Blue* values when HINT_ENABLED == false
2013-01-04 16:21:29 -08:00
Yury Delendik
aa93eac261 Fixes creation of OS/2 table 2013-01-04 11:41:24 -06:00
Brendan Dahl
bf0abd61d1 Merge pull request #2505 from yurydelendik/refactor-cff-float
Refactors encodeFloat, font matrix and flex args
2013-01-04 09:24:58 -08:00
Brendan Dahl
c05f073a73 Merge pull request #2454 from yurydelendik/worker-xhr-response
Tests presence of the xhr-response in the worker
2013-01-04 09:12:01 -08:00
Yury Delendik
7b70710565 Traces pdf.js version 2013-01-04 11:01:31 -06:00
Yury Delendik
10bb6c9ec0 Refactors font matrix operations 2013-01-03 22:38:14 -06:00
Yury Delendik
ccfa0e1972 Refactors encodeFloat and flex args 2013-01-03 18:33:15 -06:00
Yury Delendik
eca6c6cb5d Disables *Blue* values when HINT_ENABLED == false 2013-01-03 17:06:52 -06:00
Yury Delendik
089b60d848 Merge pull request #2463 from brendandahl/remove-cid-keys
Remove cid dictionary values for normalized fonts.
2013-01-03 10:24:49 -08:00
Brendan Dahl
bf1a4adf61 Merge pull request #2499 from yurydelendik/rescale
Refactors rescaleImage: improving quality of scanned images
2012-12-28 12:04:49 -08:00
Yury Delendik
1826daa1d5 Refactors rescaleImage: improving quality of scanned images 2012-12-21 19:10:21 -06:00
Brendan Dahl
a235ec1441 Use CFF compiler for building Type1 font. 2012-12-21 14:11:58 -08:00
Brendan Dahl
acf64b3164 Add support for hmoveto and vmoveto during flex. 2012-12-20 11:14:10 -08:00
Yury Delendik
a2c6429cce Merge pull request #2465 from brendandahl/fix-expansion-factor
Fix cff private dictionary key.
2012-12-15 20:53:11 -08:00
Jakob Miland
4efab13c58 Support Filespec dictionary in annotations 2012-12-15 00:36:53 +01:00
Brendan Dahl
852ff7753b Fix cff private dictionary key. 2012-12-14 12:44:39 -08:00
Brendan Dahl
575f2dd8b1 Remove cid dictionary values for normalized fonts. 2012-12-13 12:32:45 -08:00
Brendan Dahl
78498ce648 Merge pull request #2448 from yurydelendik/issue-2386
Fixes encoding in CFF fonts
2012-12-11 13:31:15 -08:00
Yury Delendik
0e70aacc51 Tests presence of the xhr-response in the worker 2012-12-11 11:07:58 -06:00
Brendan Dahl
6ae135539d Warn on opentype fonts. 2012-12-10 14:59:23 -08:00
Brendan Dahl
b4adbe4967 Merge pull request #2417 from yurydelendik/inline-images
Removes "too many inline images" limit
2012-12-10 09:32:24 -08:00
Yury Delendik
b63da8bc82 Fixes encoding reading in CFF fonts 2012-12-09 12:57:40 -06:00
Yury Delendik
cae62341ac Split large image groups into smaller chunks 2012-12-07 17:19:06 -06:00
Yury Delendik
a0bc215a86 Removes comment per #2372 2012-12-07 14:28:17 -06:00
Yury Delendik
d71c702dcf Removes "too many inline images" limit 2012-12-07 12:19:43 -06:00
Brendan Dahl
0910c5e68e Merge pull request #2425 from yurydelendik/detect-fonts-off
Detecting if web fonts are disabled in Firefox.
2012-12-06 13:30:07 -08:00
Yury Delendik
859aad138c Merge pull request #2432 from yurydelendik/setDash
Using setListDash for dashed lines
2012-12-04 13:58:48 -08:00
Brendan Dahl
39038b7377 Rescale regular images manually if they are too big. 2012-12-04 09:36:42 -08:00
Yury Delendik
a7f0e9612a Using setDash for dashed lines 2012-12-04 08:26:10 -06:00
Yury Delendik
500421ddd2 Fixes "TypeError: info is undefined" 2012-11-30 17:36:39 -06:00
Yury Delendik
3346c284ab Excluding Type3 fonts from the check; removing dead code 2012-11-30 17:31:22 -06:00
Yury Delendik
5dc87a7fca Detecting if web fonts are disable in Firefox. 2012-11-30 17:08:19 -06:00
Yury Delendik
0dc137a0df Refactors Lab CS; uses different conversion for D50 and D65; adds getRgbItem 2012-11-30 12:46:55 -06:00
Yury Delendik
223ad0c117 Merge pull request #2418 from yurydelendik/refactor-cs
Initial refactoring to reduce amount of getRgb calls and objects creation
2012-11-30 07:01:20 -08:00
Yury Delendik
0029b34d45 Refactors getRgb and makeCssRgb calls; reduces amount of created objects 2012-11-29 17:11:51 -06:00
Brendan Dahl
abaed05174 Merge pull request #2346 from yurydelendik/info
Adds basic PDF info
2012-11-29 12:30:06 -08:00
Brendan Dahl
00fad28284 Merge pull request #2406 from yurydelendik/issue-2006
Fixes function array support for radial/axial pattern
2012-11-29 12:26:50 -08:00
Yury Delendik
2c87a6467b Fixes function array support for radial/axial pattern 2012-11-24 15:13:13 -06:00
Christian Mehlis
e95fbb3860 Update src/obj.js
fix Issue #1523
2012-11-24 21:31:05 +01:00
khodzha
18da086b96 fix of combineUrl(baseUrl, url) in case of url - null, empty, undefined + unittests 2012-11-24 04:25:49 +04:00
Yury Delendik
033545cc16 Merge pull request #2392 from benbro/master
Workaround for Private Use Area characters in Chrome on Windows
2012-11-16 14:23:26 -08:00
benbro
9841bc3e8e Workaround for Private Use Area characters in Chrome on Windows 2012-11-16 23:49:02 +02:00
Brendan Dahl
9910699fac Merge pull request #2385 from yurydelendik/issue-2374
Rejects post table if maxp numGlyph does not match
2012-11-16 13:46:11 -08:00
Nicolas Pierron
f5e8838bb0 Ensure the loop counter is not interpreted as a double.
This patch improves pure JavaScript performances by 30% by removing double computations from Type1Parser_extractFontProgram. When parseInt is fed with non numerical values, it returns a NaN which flows into the loop counter which cause every operation to be computed as a double and every index to be trunctated as an int before reading a character.  This patch force the NaN value to be coerce as an integer by using a bitwise-or operation with zero.
2012-11-16 02:33:32 -08:00
Yury Delendik
0646d397eb Rejects post table if maxp numGlyph does not match 2012-11-14 16:17:06 -06:00
Brendan Dahl
d302746c6b Merge pull request #2352 from yurydelendik/issue-1718
Cleaning name table
2012-11-13 10:58:27 -08:00
Brendan Dahl
8d3980a43a Merge pull request #2263 from yurydelendik/tables-removal
Attempt to remove vtmx, and vhea tables...
2012-11-13 09:30:40 -08:00
Yury Delendik
05148e8e7d Removes vtmx and vhea tables; sanitizes fpgm and prep 2012-11-12 21:10:20 -06:00
Brendan Dahl
9f460a9a8f Merge pull request #2251 from yurydelendik/validate-charstrings
Validates type2 charstrings
2012-11-12 11:53:04 -08:00
waddlesplash
32fbf687ab Refactor names in various files.
web/viewer.js
src/fonts.js (& remove unused global)
src/evaluator.js
src/canvas.js
2012-11-10 14:59:13 -05:00
Yury Delendik
68ab17e4a3 Cleaning name table 2012-11-07 18:24:13 -06:00
Yury Delendik
610215bada Validate charstrings 2012-11-07 13:56:17 -06:00
Yury Delendik
4da7be8d28 Verifies some of the OS2 font table fields 2012-11-07 11:11:36 -06:00
Yury Delendik
fbe3d71663 Re-creates invalid post table 2012-11-07 11:03:08 -06:00
Yury Delendik
725195b65f Fixes compressed object entries caching 2012-11-06 12:05:59 -06:00
Yury Delendik
1f56d242ff Adds basic PDF info 2012-11-05 11:12:17 -06:00
Brendan Dahl
68cb985083 Merge pull request #2341 from yurydelendik/issue-2337
Fixes stream loading for XRefStm
2012-11-02 12:54:48 -07:00
Yury Delendik
35af48123a Fixes stream loading for XRefStm 2012-11-02 08:26:45 -05:00
Yury Delendik
37fb625e87 Fixes lineWidth/scale calculation for the fonts 2012-11-02 08:10:22 -05:00
Ben Browitt
19faf4b9eb Fix closure compiler warnings. 2012-10-31 17:31:46 +02:00
Yury Delendik
b47e4b8855 Merge pull request #2327 from brendandahl/un-inline
Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code.
2012-10-29 16:43:23 -07:00
Julian Viereck
318b286da3 Fix typo in PartialEvaluator_getTextContent 2012-10-29 23:03:30 +01:00
Brendan Dahl
babd8df176 Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code. 2012-10-29 12:44:18 -07:00
Yury Delendik
1f084053e6 Merge pull request #2313 from yurydelendik/issue-1905
Fixes incomplete restore in paintFormXObject
2012-10-29 12:09:11 -07:00
Yury Delendik
3c5a9ba64b Merge pull request #2323 from waddlesplash/master
Vectorize the logo
2012-10-29 11:17:03 -07:00
waddlesplash
60e2e36ff7 Vectorize the logo. 2012-10-29 14:08:52 -04:00
Brendan Dahl
a592e02c49 Merge pull request #2317 from yurydelendik/memory-1
Refactors how page objects are stored
2012-10-29 10:44:39 -07:00
Yury Delendik
69b72078c0 Separate page objects/images from the fonts; does not store large images 2012-10-28 15:24:54 -05:00
Jean-Sebastien Legare
0cdecf007f try/catch bug. var not unset when getter length() throws error 2012-10-27 21:18:37 -07:00
Yury Delendik
4c533d065d Fixes incomplete restore in paintFormXObject 2012-10-26 23:30:01 -05:00
Yury Delendik
ee87a44c03 Merge pull request #2298 from zalun/show_alert_on_invalid_pdf_structure
Display an error on Invalid PDF
2012-10-25 19:18:26 -07:00
Piotr Zalewa
812bc6795d * InvalidPDFException added
* Act on throwing an Exception and InvalidPDFException by rejecting the worker
instead of throwing
* changed message for all builds
* alerting and closing window only for B2G builds
* invalid_file_error added to l10n (en and pl)
* UnknownErrorException added and used for every error()
2012-10-25 11:15:19 +02:00
Yury Delendik
4c0f9eb924 Fixes getNumber at the end of stream 2012-10-24 10:47:16 -05:00
Adil Allawi
88bd912840 Clear unused code 2012-10-23 04:31:01 -07:00
Saebekassebil
58d6974bf5 Implement NullStream, fix #1832 2012-10-22 17:53:15 +02:00
Brendan Dahl
ece9cd15d2 Merge pull request #2249 from yurydelendik/issue-2234
Reducing parameter of Mac->Win heuristic
2012-10-19 17:01:00 -07:00
Yury Delendik
13c430c6e1 Using CMYK SWOP colors 2012-10-17 10:57:51 -05:00
Brendan Dahl
c8cf4458c6 Merge pull request #2245 from yurydelendik/issue-1912
Fixes reading CFF with two .notdef in charset
2012-10-16 09:24:21 -07:00
Yury Delendik
0bc5216601 Merge pull request #2262 from waddlesplash/master
Support 'GoToR'-type links
2012-10-16 07:16:29 -07:00
waddlesplash
c111154979 Support 'GoToR' links.
Fix tabs.

Make changes as per @yurydelendik's request.

Forgot to remove 'TODO' comment.

Support 'GoToR'-type links.
2012-10-16 09:54:08 -04:00
Brendan Dahl
336d5041dd Merge pull request #2243 from yurydelendik/issue-1233
Removes useless font tables for PDF rendering
2012-10-15 17:04:28 -07:00
Brendan Dahl
d76f4d735f Merge pull request #2244 from yurydelendik/issue-2074
Fixes cmap when 0xFFFF character is included
2012-10-15 16:27:37 -07:00
Brendan Dahl
c31c79761c Merge pull request #2240 from yurydelendik/fix-text-clipping
Fixes text clipping
2012-10-15 15:27:44 -07:00
waddlesplash
1ed1de10a5 More descriptive link types warning. 2012-10-15 17:23:17 -04:00
Brendan Dahl
c67cc874e8 Merge pull request #2215 from yurydelendik/issue-1836
Falls back to ErrorFont when font object is not available or corrupted
2012-10-15 11:51:09 -07:00
Yury Delendik
ab058dbe75 Fixes text clipping 2012-10-15 12:52:37 -05:00
Brendan Dahl
846038991c Merge pull request #2214 from yurydelendik/issue-1859
Adds Type1 sbw command support for horizontal fonts
2012-10-15 10:07:36 -07:00
Yury Delendik
8c3a82ff4d Falls back to ErrorFont when font object is not available or corrupted 2012-10-15 11:48:45 -05:00
Yury Delendik
b09f0ccbaa Adds Type1 sbw command support for horizontal fonts 2012-10-15 11:40:55 -05:00
Brendan Dahl
8c3fdd069a Merge pull request #2254 from yurydelendik/no-glyphs
Fixes font processing when no glyphs are found
2012-10-15 09:09:46 -07:00
Yury Delendik
b6ad7fd103 Defines at least one glyph if none was found 2012-10-15 11:08:50 -05:00
Brendan Dahl
565d13f670 Merge pull request #2213 from yurydelendik/bug762657
Removes PutBinaryImageData compatibility check (re:bug 762657)
2012-10-15 08:58:24 -07:00
Yury Delendik
c129ecea8a Partially reverts #2239 due to reftest fails 2012-10-15 09:20:52 -05:00
Yury Delendik
19002cc8a3 Merge pull request #2239 from yurydelendik/no-glyphs-message
Stops font processing when valid glyphs are absent in the font
2012-10-15 07:06:27 -07:00
Yury Delendik
3ed6db69d0 Reducing parameter of Mac->Win heuristic 2012-10-14 17:52:14 -05:00
Yury Delendik
31b5f566d6 Fixes reading CFF with two .notdef in charset 2012-10-13 15:35:23 -05:00
Yury Delendik
7ea87c875e Fixes cmap when 0xFFFF character is included 2012-10-13 14:21:15 -05:00
Yury Delendik
e4c8121ed4 Suppresses useless for PDF rendering font tables 2012-10-13 11:41:44 -05:00
Yury Delendik
62b2c5a030 Stops font processing when valid glyphs are absent in the font 2012-10-12 17:54:20 -05:00
Clement Skau
5edd6d253f Fixes Viewport rotation above 360 2012-10-11 00:27:35 +09:00
Yury Delendik
b5f952a63a Fixes font debugger; text builder api refactoring 2012-10-09 08:25:41 -05:00
Yury Delendik
ee133197ee Removes PutBinaryImageData compatibility check (re:bug 762657) 2012-10-07 21:09:00 -05:00
Yury Delendik
bc19b5581e Removes usage of print as log 2012-10-04 10:01:53 -05:00
Julian Viereck
47809fe316 Address yury's review comments 2012-09-26 19:46:06 +02:00
Julian Viereck
658c6936fc Tune whitespace insertion 2012-09-25 16:07:59 +02:00
Julian Viereck
e98eba1b11 Merge pull request #2127 from jviereck/text-algo-3
Use the text extracted in the getTextContent function for the divs of the textLayer.
2012-09-25 05:52:46 -07:00
Yury Delendik
574d626f04 Merge pull request #1906 from brendandahl/use-plain-blob
Use Blob constructor when available instead of deprecated MozBlobBuilder.
2012-09-24 17:11:32 -07:00
Brendan Dahl
739ee47865 Use Blob constructor when available instead of deprecated MozBlobBuilder. 2012-09-22 09:44:49 -07:00
Julian Viereck
f1e0edbaa9 Address Yurys review comments 2012-09-22 11:18:26 +02:00
Adil Allawi
5bc2934014 Handle normalization of Arabic Unicode Presentation Forms A to Arabic Unicode 2012-09-22 08:10:53 +01:00
Adil Allawi
c04b4c1679 Handle normalization of Arabic Unicode Presentation Forms B to Arabic Unicode 2012-09-21 18:36:59 +01:00
Brendan Dahl
47340d557c Merge pull request #2145 from yurydelendik/fix-export-keyword
Renaming export to exportData
2012-09-20 21:30:40 -07:00
Julian Viereck
e48530d391 Fix AppendText after API changes 2012-09-20 22:09:03 +02:00
Yury Delendik
75e928c102 Merge pull request #2058 from Pimm/master
Small fixes for normal and potential post-compilation bugs
2012-09-20 11:36:55 -07:00
Yury Delendik
59eca230fa Merge pull request #2131 from saebekassebil/metadata2
Metadata optimization
2012-09-20 10:31:19 -07:00
Julian Viereck
a33ba145bf Don't compute the string for the TextLayer in the canvas backend anymore and change the syntax of appendText 2012-09-20 17:15:55 +02:00
Julian Viereck
3d0e6da2ff Move some more font conversion into loadFont function to make type3 fonts work for now 2012-09-20 17:12:36 +02:00
Julian Viereck
36d358fff8 Don't use shadow() for spaceWidth as otherwise sendering the font over to the mainthread causes issues if the worker used the property and the main thread tries to assign the spaceWidth to the getter function 2012-09-20 17:10:52 +02:00
Julian Viereck
fdb6a013c9 Fix unitialized text/dirs array 2012-09-20 17:10:52 +02:00
Julian Viereck
a525492f65 Make lint happy 2012-09-20 17:10:51 +02:00
Julian Viereck
6bc2a0b84a Remove spaces that don't make sense when using the text in divs 2012-09-20 17:10:51 +02:00
Julian Viereck
e22fc80d3e Add handling for gs in getTextContent 2012-09-20 17:10:51 +02:00
Julian Viereck
bd4434a7ea Apply bidi algorithm to the text in the worker 2012-09-20 17:10:51 +02:00
Julian Viereck
8d6565d1a8 Change the format of the BidiResult object. 2012-09-20 17:10:51 +02:00
Julian Viereck
897b99500e Fix typos that prevent space insertion for showSpaced in getTextContent 2012-09-20 17:10:51 +02:00
Julian Viereck
7432e596a1 Improve the space detection for the getTextContent function 2012-09-20 17:08:43 +02:00
Julian Viereck
9b9de87ac4 Undo some changes for now until there is support for font.spacedWidth 2012-09-20 17:08:43 +02:00
Julian Viereck
3a8426e179 Fix typo in new return value of bidi function 2012-09-20 17:08:42 +02:00
Julian Viereck
83c499595c Change the PDFJS.bidi function calls slightly to avoid creating a seperate object to pass to PDF.JS bidi and just pass in a string 2012-09-20 17:08:42 +02:00
Julian Viereck
668c2867d4 Change the format of textContent to be an array 2012-09-20 17:01:16 +02:00
Julian Viereck
a38c4bc729 Make getTextContent return offset array and improve the algorithm. Make
parts in viewer.js work again.
2012-09-20 17:01:15 +02:00
Yury Delendik
3d78ccd570 Renaming export to exportData 2012-09-20 09:38:59 -05:00
Julian Viereck
43f2db30b3 Fix current.x for type3 font word break 2012-09-19 22:19:21 +02:00
Brendan Dahl
81e708bf0f Merge pull request #2118 from yurydelendik/disable-font-hack
Removing font loading hack from MOZCENTRAL
2012-09-18 09:17:05 -07:00
Brendan Dahl
8dc49a3c9b Merge pull request #2124 from yurydelendik/fallback-font
Provides right fallback fonts for text layer
2012-09-17 10:06:42 -07:00
Yury Delendik
8d506212a8 Adds heuristic for monospace font detection 2012-09-16 14:38:30 -05:00
Saebekassebil
c88924f411 Optimize metadata parsing 2012-09-15 18:54:08 +02:00
Yury Delendik
ac7b6aeff4 Provides right fallback fonts for text layer 2012-09-14 11:17:35 -07:00
Yury Delendik
45741c33a5 Fixes RTL text extraction 2012-09-14 10:26:46 -07:00
Yury Delendik
38bb3b4880 Removing font loading hack from MOZCENTRAL 2012-09-13 16:45:56 -07:00
Yury Delendik
e086cf36f4 Refactor text extraction / font loading logic 2012-09-13 15:12:42 -07:00
Yury Delendik
9fba150dd2 Move font translation to the worker 2012-09-12 17:31:04 -07:00
Yury Delendik
40eb44eae4 Merge pull request #1809 from brendandahl/shading-extend
Adds support for the extend option for linear and radial shadings.
2012-09-11 05:24:53 -07:00
Brendan Dahl
164931d2fc Adds background support for gradient.
Warns on case when we don't handle radial gradients correctly.
Fixes chrome extend gradients.
2012-09-10 13:23:07 -07:00
Julian Viereck
bd0e42220b Merge pull request #2089 from yurydelendik/remove-currenttransf
Removes unnecessary ctx.mozCurrentTransformInverse transforms
2012-09-08 08:59:21 -07:00
Brendan Dahl
455bb6d98c Merge pull request #2076 from kkujala/dev
Add initial TilingType support.
2012-09-07 15:39:28 -07:00
Yury Delendik
954ea97158 Removes unnecessary ctx.mozCurrentTransformInverse transforms 2012-09-07 11:00:05 -05:00
Brendan Dahl
59016bcf59 Merge pull request #2082 from yurydelendik/chrome-fontload
Workaround for chrome's issue 145227
2012-09-07 08:50:55 -07:00
Kalervo Kujala
5f202e1596 Add initial TilingType support. 2012-09-05 22:36:20 +03:00
Brendan Dahl
76d877e48b Strip out license for bundled version. 2012-09-04 10:22:32 -07:00
Brendan Dahl
332ae4ce41 Change to the Apache v2 license. 2012-08-31 15:48:21 -07:00
Pimm Hogeling
080ab94a0d Lint syntax fixes. 2012-08-31 15:51:31 +02:00
Pimm Hogeling
0fbbc5a840 Syntax changed that will help minifiers/compilers (such as the Closure Compiler) in their processing. In particular, preventing said minifiers/compilers from making dangerous renames. 2012-08-31 13:40:37 +02:00
Pimm Hogeling
438e3c8f6d Fixes for subtile bugs that were introduced in 59283bdf6d and 99440ab691, among others. 2012-08-31 13:37:44 +02:00
Yury Delendik
deedb0a911 Workaround for chrome's issue 145227 2012-08-29 19:16:57 -05:00
Artur Adib
8e50da78ee Merge pull request #2050 from yurydelendik/issue-2040
Fixes incorrect font type and prevents future this.objs.objs[fonts[i]] ...
2012-08-29 14:47:32 -07:00
Yury Delendik
621686ca67 Fixes incorrect font type and prevents future this.objs.objs[fonts[i]] failures 2012-08-29 16:11:56 -05:00
Brendan Dahl
33f7e86171 Merge pull request #2047 from yurydelendik/font-linux
Fixes fonts on linux
2012-08-29 12:35:25 -07:00
Yury Delendik
e32ecc44d3 Fixes CFF test and CFF int16 parsing 2012-08-29 12:58:12 -05:00
Yury Delendik
93f9efde39 Fixes ascent and descent values for windows gdi 2012-08-29 12:19:09 -05:00
Brendan Dahl
d26ecff294 Reduce math for color key mask. 2012-08-29 09:36:12 -07:00
Yury Delendik
4550ffe14e Fixes fonts on linux 2012-08-29 10:31:59 -05:00
Brendan Dahl
19fa6a5260 Adds support for color key mask. 2012-08-28 17:19:31 -07:00
Brendan Dahl
d77bafa678 Merge pull request #1997 from yurydelendik/font-refact-1
Rectoring font loading concurency
2012-08-27 09:15:56 -07:00
Yury Delendik
a89cb5dd7a Disables symbolic encoding for non-standard fonts 2012-08-24 08:05:06 -05:00
Yury Delendik
296b98f977 Merge branch 'master' of git://github.com/mozilla/pdf.js.git into progress-indeterminate
Conflicts:
	extensions/firefox/components/PdfStreamConverter.js
2012-08-23 15:23:44 -05:00
Yury Delendik
cd1a645881 Adds support of the indeterminate loading progress 2012-08-22 10:48:56 -05:00
Tom Schuster
fad38f8286 Update src/fonts.js
One simple thing that came up while looking at the new Octane benchmark.
2012-08-22 07:22:47 -05:00
Yury Delendik
51b2587340 Copy decoded image data and keeps non-decoded pixes as transparent 2012-08-20 15:57:21 -05:00
Yury Delendik
4f20f5f1bb Verify the request id parameter 2012-08-17 16:56:47 -05:00
Yury Delendik
52d229761a Removing sum of the iframe times, browser does it for us 2012-08-17 16:08:42 -05:00
Yury Delendik
8459fef6c3 Cleanup: remove iframe and message handler 2012-08-17 14:00:35 -05:00
Yury Delendik
3c1d63055d Invoking callback via setTimeout 2012-08-17 11:32:34 -05:00
Yury Delendik
c414c76461 Fixes font loading concurency 2012-08-17 11:05:51 -05:00
Brendan Dahl
fd416d3788 Stop streams from being sent from worker for indexed color spaces. 2012-08-16 15:22:28 -07:00
Artur Adib
c9c5ae32d9 Merge pull request #1979 from yurydelendik/issue-1685
Discards invalid values for Blues
2012-08-16 09:58:10 -07:00
Brendan Dahl
590c6c413e Merge pull request #1978 from yurydelendik/issue-1655
Fixes bias calculation for type2 subr
2012-08-14 14:50:32 -07:00
Brendan Dahl
7acbe15061 Merge pull request #1977 from yurydelendik/callothersubr
Adds callothersubr support
2012-08-14 09:46:19 -07:00
Yury Delendik
972d08209a Discards invalid values for Blues 2012-08-11 23:05:41 -05:00
Yury Delendik
6277e6eda7 Fixes bias calculation for type2 subr 2012-08-11 20:10:31 -05:00
Yury Delendik
b4d75ca83b Adds callothersubr support 2012-08-11 11:57:42 -05:00
Yury Delendik
3093427480 Marks xref entries with offset 0 as free 2012-08-10 21:31:33 -05:00
Artur Adib
6ccf711966 Merge pull request #1971 from yurydelendik/issue-1970
Using fast pixels copy in putBinaryImageData
2012-08-10 11:40:12 -07:00
Yury Delendik
5e3882ab69 Changing cubic spline interpolation error to TODO 2012-08-10 08:30:20 -05:00
Yury Delendik
55b3b005b8 Using createImageData when available 2012-08-09 13:40:40 -05:00
Yury Delendik
65bc78d870 Using fast pixels copy in putBinaryImageData 2012-08-09 10:41:18 -05:00
Brendan Dahl
2ca8c0d999 Cleanup references to dom elements. 2012-08-08 09:07:31 -07:00
Yury Delendik
70beb11a50 Merge pull request #1953 from brendandahl/b2g
Add B2G build and new preprocessor.
2012-08-08 08:37:26 -07:00
Yury Delendik
5d95782ea1 Merge pull request #1957 from brendandahl/fix-doc-info
Sanitize the document info.
2012-08-06 15:18:55 -07:00
Brendan Dahl
70e415900c Address review comments. 2012-08-06 14:32:54 -07:00
Brendan Dahl
69eca3c50f Use timeout for font ready callback to avoid intermittent chrome failures. 2012-08-06 08:51:20 -07:00
Brendan Dahl
29263836c2 Sanitize the document info. 2012-08-03 16:11:43 -07:00
Brendan Dahl
9ddbe1fac7 Merge pull request #1947 from yurydelendik/issue-1944
Fix loading of the font widths
2012-08-02 11:54:58 -07:00
Yury Delendik
41a4272463 Implement textRise; reduce ref test to one page 2012-08-01 15:10:48 -05:00
Brendan Dahl
492fa6edb4 Add the new preprocessor. 2012-08-01 11:55:39 -07:00
Brendan Dahl
6d35073a9c Initial build for b2g. 2012-08-01 11:55:39 -07:00
Yury Delendik
f947b3bb4c Fixes Shading.Dummy return type 2012-08-01 10:59:21 -05:00
Yury Delendik
8aab1a7a7b Fix loading of the font widths 2012-07-31 17:58:28 -05:00
Yury Delendik
af4bd10c70 Allow relative URLs in getDocument 2012-07-26 12:11:28 -05:00
Brendan Dahl
b3a603c199 Merge pull request #1840 from yurydelendik/loadpdf-1
Moves loading of the binary PDF data to the worker
2012-07-23 16:27:55 -07:00
Brendan Dahl
7fff630e87 Merge pull request #1892 from brendandahl/seac
Add support for type 1 seac charstring command.
2012-07-20 17:27:18 -07:00
Brendan Dahl
792ef1b14d Support div number format for seac operator. 2012-07-20 15:53:39 -07:00
Brendan Dahl
377a96dda7 Merge pull request #1909 from benbro/master
Prevent the error callback from being called twice when getPdf fails because of a cross domain request.
2012-07-20 15:46:39 -07:00
Brendan Dahl
6ed639e4d8 Merge branch 'master' of github.com:mozilla/pdf.js into seac 2012-07-20 15:12:09 -07:00