Commit Graph

308 Commits

Author SHA1 Message Date
Vivien Nicolas
f4282f9802 Use strict mode for js files 2011-06-19 02:35:28 +02:00
sbarman
8cd69681fc Merge branch 'master' into tiling 2011-06-18 13:07:20 -07:00
sbarman
609230ad07 Fixed predictor 2011-06-18 13:06:54 -07:00
sbarman
0b9b0390b6 Merge branch 'master' into predictor 2011-06-18 09:33:59 -07:00
Andreas Gal
c04da11be6 remove toString code to avoid any future accidental implicit conversions 2011-06-18 01:18:21 -07:00
Andreas Gal
d2e18d35b5 speedup unicode/glyph conversion and cache translated strings in the font 2011-06-17 21:22:37 -07:00
Andreas Gal
dea351911a IsInteger => IsInt 2011-06-17 20:17:10 -07:00
sbarman
0b983990d4 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-17 17:58:24 -07:00
sbarman
80ee0faa37 Merge branch 'master' of github.com:andreasgal/pdf.js into streamrewrite2 2011-06-17 17:58:06 -07:00
sbarman
e80a8e6e2b clean up tiling 2011-06-17 17:48:44 -07:00
sbarman
698132daec clean up tiling 2011-06-17 17:46:02 -07:00
sbarman
90cc46a574 Merge branch 'master' into tiling 2011-06-17 17:38:29 -07:00
sbarman
518c7d3328 Cleaned up code for tiling 2011-06-17 17:35:56 -07:00
Andreas Gal
120a4a3f38 even more error checking for font translation 2011-06-17 16:34:29 -07:00
Andreas Gal
49c4196ec0 add more error checking for font translation 2011-06-17 16:29:48 -07:00
sbarman
8ce051c579 Working version of predictors 2011-06-17 16:06:02 -07:00
Andreas Gal
9e178e88c8 inline Encodings table into pdf.js and use getters for lazy construction 2011-06-17 15:48:17 -07:00
sbarman
2170c2408b Rearranged predictor interface 2011-06-17 13:32:26 -07:00
sbarman
5a4d679372 changed skip in FlateStream to not call getChar 2011-06-17 13:13:25 -07:00
sbarman
55a916e2d7 Merge branch 'master' into streamrewrite2 2011-06-17 12:32:32 -07:00
sbarman
10505be356 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-17 12:14:45 -07:00
Vivien Nicolas
e475d03675 Do not assume charset is defined and move some fonts timing to the right place 2011-06-17 20:29:34 +02:00
sbarman
9621727db5 stored bytes in flatestream 2011-06-17 10:10:29 -07:00
sbarman
4b6432b46c Merge branch 'master' into predictor 2011-06-17 09:07:40 -07:00
sbarman
9a3a61fc64 Merge branch 'master' into tiling 2011-06-17 09:00:04 -07:00
sbarman
f9dae73122 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-17 08:33:14 -07:00
notmasteryet
0e5f74b6c2 readXRefStream and PNG predictor 12 2011-06-17 07:37:14 -05:00
Vivien Nicolas
1980f4ef42 Clean up some debug leftovers 2011-06-17 13:55:42 +02:00
sbarman
4959dcb6a9 initial implementation of predictor 2011-06-16 17:03:15 -07:00
sbarman
72919470a9 Added comments 2011-06-16 12:03:50 -07:00
sbarman
5fa49ce3d6 working version of tiling 2011-06-16 11:26:50 -07:00
Vivien Nicolas
c9e0b05678 Resolve the char->glyphs mapping issue 2011-06-16 03:55:45 +02:00
Vivien Nicolas
a57b53b3b3 Merge from gal's master branch (got a regression on the mapping between char->glyph) 2011-06-16 03:05:55 +02:00
Chris Jones
7fb6c434c5 implement setDash 2011-06-15 12:55:48 -07:00
Chris Jones
470f0e49dd Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-15 12:42:48 -07:00
sbarman
23aba03f43 Merge branch 'master' of github.com:andreasgal/pdf.js
Conflicts:
	pdf.js
2011-06-15 12:37:05 -07:00
Chris Jones
07c81a624e implement some operators and add TODOs for remaining undefined ones 2011-06-15 14:24:44 -05:00
sbarman
0f2d4c7011 cleaned up fetchIfRef, changed switch-case to array lookup, changed IsFunction to IsPDFFunction 2011-06-15 11:34:47 -07:00
Andreas Gal
6a9f7def45 fixes suggested by @brendaneich 2011-06-15 00:37:15 -07:00
Andreas Gal
b5dcf986eb clarify API a bit and hand in xref and resources to ease translation 2011-06-14 23:44:59 -07:00
Andreas Gal
77bc59681e completed async font loading framework 2011-06-14 23:41:26 -07:00
Andreas Gal
0ef077c44c eagerly translate all fonts (a no-op currently) 2011-06-14 23:34:11 -07:00
Andreas Gal
fbb2f497fd pdf is using a dumb name, content makes much more sense than Contents 2011-06-14 23:22:19 -07:00
Andreas Gal
5acb9a16de cache results of compilation 2011-06-14 23:16:53 -07:00
Andreas Gal
7afaca2d35 eagerly compile XForm objects 2011-06-14 22:54:49 -07:00
Andreas Gal
aecc4ebbb7 return ready-to-run closure from compile that captures its objpool 2011-06-14 20:36:45 -07:00
Vivien Nicolas
1dcd42b66c Add a basic support for TrueType (generate fonts with OS/2 table) 2011-06-15 04:46:48 +02:00
Andreas Gal
b9771416ba compile PDF command streams into JS code 2011-06-14 18:31:14 -07:00
sbarman
b7360823a2 Cleaned up code, renamed PDFFunction class 2011-06-14 13:49:50 -07:00
Vivien Nicolas
bd2e756100 Add XObjects fonts to the list of page fonts and has a forEach method to the Dict class 2011-06-14 21:38:59 +02:00
sbarman
aa6d9f75a3 cleaned up code 2011-06-14 12:19:35 -07:00
sbarman
9fc97d94e8 Implemented type 2 shading for the pdf (aka gradients) 2011-06-14 11:57:02 -07:00
Vivien Nicolas
6364e7fad5 Forgot to push function calls changes to get the unicode char from a random code 2011-06-14 19:40:36 +02:00
Vivien Nicolas
4cae2df1e5 Add support for ligatures, asterisks, etc. 2011-06-14 11:08:08 +02:00
Vivien Nicolas
375b383920 Make the fonts decoding code works with asynchronous data url 2011-06-14 04:35:46 +02:00
Vivien Nicolas
b7449f3bcc Do not use makeSubStream in the CFF constructor 2011-06-13 23:23:13 +02:00
Vivien Nicolas
3973b01ec9 Merge to upstream 2011-06-13 19:16:03 +02:00
Vivien Nicolas
2dc7bda2bc Merge the stream handling changes with the Font code 2011-06-13 18:59:46 +02:00
Vivien Nicolas
2c4a0aa269 Undo last patch, it broke font rendering 2011-06-13 07:06:51 +02:00
Andreas Gal
83e100b013 starting position of a stream is relative to the file, not the current stream 2011-06-13 12:47:40 +08:00
Andreas Gal
e0a6c8ef76 use const instead of var 2011-06-13 11:40:49 +08:00
Vivien Nicolas
0a135091de Add a root 'Font' class as the outside world API 2011-06-13 01:38:05 +02:00
Andreas Gal
bf2c525788 remove debug code 2011-06-11 23:49:17 -07:00
Vivien Nicolas
632fcfed18 Turn on TrueType decoder even if the sanitizer prevent them to load at the moment 2011-06-12 03:10:54 +02:00
Vivien Nicolas
828367a1b4 Make the Type1 to OTF code active, even if the sanitizer prevent fonts to load at the moment 2011-06-12 03:00:45 +02:00
Chris Jones
58cb3e76b2 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-10 12:17:00 -07:00
Chris Jones
a5731ddc47 skeleton of shading fill 2011-06-10 12:16:45 -07:00
sbarman
b61700b5a5 changed bufferPos to pos, fixed style issue (spacing) 2011-06-10 11:30:48 -07:00
sbarman
3d9f609054 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-06-09 23:06:36 -07:00
sbarman
f10aca6a46 Fixed up excess code 2011-06-09 19:34:34 -07:00
sbarman
1dbf2d1d0c cleaned up code, used dict.get2, hoisted conditional outside loop when drawing image 2011-06-09 19:19:09 -07:00
Chris Jones
78d0b3caf1 implement TL and T* 2011-06-09 18:19:17 -07:00
sbarman
b83979f40d Revert "working on optimizations"
This reverts commit 03747940a2.
2011-06-09 18:17:27 -07:00
sbarman
03747940a2 working on optimizations 2011-06-09 17:15:44 -07:00
Vivien Nicolas
74abf984d5 Add the beginning of a Type1 to Type2 charstring converter 2011-06-10 01:20:00 +02:00
sbarman
0e8f323f0a fixed error with getBytes in flate stream 2011-06-09 15:02:58 -07:00
sbarman
78493db421 Merge remote-tracking branch 'agal/master'
Conflicts:
	pdf.js
	test.html
2011-06-09 14:59:15 -07:00
Andreas Gal
287e7a702a remove left-over shell code 2011-06-10 05:44:41 +08:00
sbarman
c5a04b900f Merge commit '496a6374c1ac04e'
Conflicts:
	pdf.js
2011-06-09 14:42:31 -07:00
sbarman
496a6374c1 fixed the display of images 2011-06-09 14:35:55 -07:00
sbarman
cfff44f2b2 fixed getBytes 2011-06-09 12:53:38 -07:00
sbarman
5da69f520d Half working version of paintImageXObject 2011-06-08 17:45:50 -07:00
sbarman
c326f1808f Fixed geBytes implementation 2011-06-08 17:42:29 -07:00
sbarman
19f9897ec3 added getBytes method 2011-06-08 15:41:17 -07:00
Andreas Gal
bab03e6add remove left-over shell code 2011-06-08 13:40:10 -07:00
sbarman
a89bd1d30e Copied entire buffer for flate stream's snarf function (since decoding looks back) 2011-06-08 11:49:37 -07:00
Andreas Gal
f85953b342 read in image data en-block instead of sucking it through the stream interface 2011-06-09 01:09:02 +08:00
Andreas Gal
8b119087f0 use dict.get2 to lookup with a key that has an abbreviation (i.e. BitsPerComponent/BPC) 2011-06-09 01:09:02 +08:00
Vivien Nicolas
c098f0b31f Fix some bugs and add the beginning of a Type2 reader 2011-06-08 17:26:29 +02:00
Andreas Gal
ee5d8763e8 read in image data en-block instead of sucking it through the stream interface 2011-06-08 07:50:35 -07:00
Vivien Nicolas
4d261759d9 Support TrueType Font 2011-06-07 19:17:46 +02:00
Andreas Gal
5c5d09c898 use dict.get2 to lookup with a key that has an abbreviation (i.e. BitsPerComponent/BPC) 2011-06-06 21:34:21 -07:00
sbarman
99aacfe42c Implemented basic version of smask 2011-06-06 18:35:45 -07:00
sbarman
27b8b68b87 Removed log code from previous commit 2011-06-06 18:34:24 -07:00
sbarman
11f427d235 Fixed FlateStreams to read in multiple blocks 2011-06-06 18:31:54 -07:00
Andreas Gal
386d70f33c add code to parse bits per component information for images 2011-06-05 10:56:05 -07:00
Andreas Gal
378f381625 don't cache stream objects 2011-06-04 23:18:55 -07:00
Andreas Gal
5c06cd1de5 use an array not an object to cache objects 2011-06-04 23:15:51 -07:00
Andreas Gal
47f0326eee parse Interpolate and ImageMask for images 2011-06-04 23:01:25 -07:00
Andreas Gal
5647dbc0a4 convert remaining inflate code tables to typed arrays 2011-06-04 11:11:14 -07:00
Andreas Gal
4d70cb4aaf turn distDecode into a typed array 2011-06-04 10:27:25 -07:00
Andreas Gal
9143ad4cf5 make lengthDecode a typed array 2011-06-04 10:18:04 -07:00
Andreas Gal
cd7c229ccc make codeLenCodeMap a typed array 2011-06-04 10:14:17 -07:00
Chris Jones
fadbb1b5e7 FlateStream wants a .dict member for duck typing 2011-06-03 22:58:06 -05:00
Chris Jones
2f8d80677b implement even-odd fill/clip 2011-06-03 22:52:27 -05:00
Vivien Nicolas
c166db13fd Add the 'for' keyword and support 2's complement signed integer 2011-06-04 00:43:50 +02:00
Andreas Gal
92aa46cf81 hand in xref to the parser if needed so we can resolve 'Length' for sub-streams 2011-06-03 14:38:54 -07:00
Andreas Gal
b6b5c2ac49 fix deflate code 2011-06-03 14:22:38 -07:00
Andreas Gal
267f312f13 fix length/end of stream handling 2011-06-03 14:16:04 -07:00
Vivien Nicolas
a08691313f Clean up some code and add some changes to pdf.js 2011-06-03 19:47:07 +02:00
Chris Jones
41f46ca346 fix typo that breaks ff4 2011-06-02 21:13:48 -07:00
Chris Jones
4533902953 skeleton of image drawing 2011-06-02 18:27:56 -05:00
Chris Jones
ebc483a0c7 Font and XObject entries can be refs, and dump image magic bytes 2011-06-02 14:24:46 -05:00
Andreas Gal
9b9a258a57 starting position of a stream is relative to the file, not the current stream 2011-06-02 10:57:06 -07:00
Vivien Nicolas
fe11af4b57 Add a the beggining of a Type1 font reader 2011-05-31 20:22:05 +02:00
Andreas Gal
503d888036 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-30 10:04:35 +02:00
Chris Jones
53018c8e4c fix next/prev/next bug, fiddle with UI, remove debugging code 2011-05-25 21:09:06 +12:00
Chris Jones
c79cb83d52 reset current point on text state changes and remove redundant "cur" prefix 2011-05-23 21:22:56 +12:00
Andreas Gal
98dfcf57ec use const instead of var 2011-05-21 07:40:28 +02:00
Chris Jones
f80a88864b basic kinda-working form xobject support 2011-05-17 14:08:05 +12:00
Chris Jones
d7f3c31d9d add assert helpers, small cleanup 2011-05-17 11:59:38 +12:00
Chris Jones
8f8b302b23 initial (broken) support for xobjects 2011-05-17 11:39:45 +12:00
Andreas Gal
db6f072507 fix a couple more shadowings 2011-05-13 00:23:27 -07:00
Andreas Gal
f4bb211283 forgot another shadowing 2011-05-13 00:21:32 -07:00
Andreas Gal
a4c5b6095b use defineProperty to shadow getters 2011-05-13 00:19:50 -07:00
Chris Jones
0753ce25c1 fix typo in lexing of octal escapes 2011-05-13 13:09:13 +12:00
Andreas Gal
a9a16ccb8a fix for new XHR2 binary API 2011-05-12 16:58:19 -07:00
Andreas Gal
fed7e723b8 clone stream if we got it from the cache in case its already in use 2011-05-11 23:00:36 -07:00
Chris Jones
76e43dd982 fix next/prev, small tweaks 2011-05-12 17:05:46 +12:00
Andreas Gal
9521168b5c remove the echo interpreter, dissolve interpreter into gfx and Page 2011-05-11 20:13:57 -07:00
Andreas Gal
bffedbb33c cache refs, not streams, in the interest of saving memory 2011-05-11 20:03:45 -07:00
Andreas Gal
284ef90e47 uncompressed pdfs render a bit now 2011-05-11 19:05:30 -07:00
Andreas Gal
6a4b0e8058 fix bug in string obj handling 2011-05-11 17:17:47 -07:00
Andreas Gal
52d8555c17 parser content streams 2011-05-11 17:09:06 -07:00
Andreas Gal
2326832f49 fixes for the huffman decoder 2011-05-11 16:30:30 -07:00
Andreas Gal
9543128796 wired up decompression, not working yet 2011-05-11 03:26:33 -07:00
Andreas Gal
cebd567fa1 parse the page tree and extract pages and their content 2011-05-11 03:14:08 -07:00
Andreas Gal
7c604ae280 add code to access the page dictionary 2011-05-11 01:50:47 -07:00
Andreas Gal
db5488a50e reading the catalog, at last 2011-05-11 01:20:12 -07:00
Andreas Gal
7b5effcdbe use exceptions instead of error codes in case of errors 2011-05-11 00:10:15 -07:00
Andreas Gal
c8ab1c014e finish inflate code, still untested 2011-05-10 23:57:03 -07:00
Andreas Gal
903e6e2b9d add inflate code 2011-05-10 21:22:28 -07:00
Andreas Gal
f9faa3f34a Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-10 00:31:51 -07:00
Andreas Gal
4a7d875495 use skip() instead of getChar() when the return value isn't used anyway 2011-05-09 23:47:08 -07:00
Andreas Gal
da1532e0d8 remove skipChar(), use skip() without an argument instead 2011-05-09 23:44:25 -07:00
Andreas Gal
2a60352e24 inline asString since its only used once 2011-05-09 23:37:21 -07:00
Andreas Gal
0b5cdf651d move find out of the Stream class 2011-05-09 23:32:22 -07:00
Andreas Gal
056a81ee89 remove putBack and make skip go via skipChar 2011-05-09 23:10:40 -07:00
Andreas Gal
ac17a847d0 remove getByte for now 2011-05-09 23:08:29 -07:00
Chris Jones
99972ad26a placeholders for scn/SCN 2011-05-09 21:19:26 -05:00