Commit Graph

518 Commits

Author SHA1 Message Date
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
Chris Jones
3674f38fdd shadingFill placeholder 2011-05-09 21:14:09 -05:00
Chris Jones
c1758ea66f Placeholder even-odd fill 2011-05-09 21:08:21 -05:00
Chris Jones
e820a20b63 Clipping (non-zero winding) 2011-05-09 21:05:33 -05:00
Chris Jones
79ef581434 Merge 2011-05-09 20:17:22 -05:00
Chris Jones
fcdd7e3845 Implement "n" (end path), add stubs for NYI operators 2011-05-09 20:16:06 -05:00
Andreas Gal
bbbf30c81f throw Error for errors, and warn in browser and shell 2011-05-09 18:10:15 -07:00
Andreas Gal
f16e6b8d1c Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-09 18:04:31 -07:00
Andreas Gal
247509680e beginnings of inflate decompression 2011-05-09 18:04:22 -07:00
Chris Jones
f9839beda8 Implement j (line join style) 2011-05-09 19:11:40 -05:00
Chris Jones
5bf0818b2e Implement J (line-cap style) 2011-05-09 18:57:23 -05:00
Chris Jones
a8d9ab5e62 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-09 18:20:10 -05:00
Chris Jones
127a6e97d0 Implement TJ 2011-05-09 18:20:04 -05:00
Andreas Gal
a018fe60ef Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-09 15:58:50 -07:00
Andreas Gal
4a43ba6f8c bug fixes, getting closer to parsing a latex paper 2011-05-09 15:58:37 -07:00
Chris Jones
82f49501c3 Restore font lookup and setting 2011-05-09 15:18:19 -05:00
Andreas Gal
195671adba add buffer to write data to 2011-05-08 17:39:40 -07:00
Andreas Gal
5376c8b4e1 use Object.create for Dict instead of a key prefix 2011-05-08 14:26:08 -07:00
Andreas Gal
fed34c7d07 eliminate putBack 2011-05-08 14:08:38 -07:00
Andreas Gal
dd5ab1f10f don't use array buffes to implement moveStart, that won't work for filtered streams 2011-05-08 11:35:32 -07:00
Andreas Gal
a2dcda8be5 factor out isSpace 2011-05-08 11:32:53 -07:00
Andreas Gal
506828d522 fix StringStream constructor delegation to Stream 2011-05-07 22:57:04 -07:00
Andreas Gal
314889d3d1 add skeleton decryption and stream filter support 2011-05-07 01:20:04 -07:00
Andreas Gal
65a35fcabf start working on stream decoding 2011-05-06 23:37:49 -07:00
Andreas Gal
d971dfa01b fix reading linearized documents 2011-05-06 22:44:01 -07:00
Andreas Gal
e655900785 restore long-form function names and a mapping table 2011-05-06 22:15:18 -07:00
Andreas Gal
d65ebb7533 tighten up the interpreter loop 2011-05-06 18:15:51 -07:00
Andreas Gal
36f657b4ad get rid of Obj 2011-05-06 17:27:27 -07:00
Andreas Gal
4349a5b2bc more XRef parsing 2011-05-06 16:38:16 -07:00
Andreas Gal
16b3a7abc4 more XRef parsing 2011-05-06 16:18:13 -07:00
Andreas Gal
2e88d3779c skeleton for XRef support 2011-05-06 12:12:57 -07:00
Andreas Gal
860c8129bf fix a bunch of bugs and make startxref parsing work 2011-05-06 02:18:31 -07:00
Andreas Gal
4a5794e705 add command line arguments for the shell, -e for echo tests, -p for parse tests 2011-05-06 01:44:17 -07:00
Andreas Gal
455c646206 Merge branch 'master' of github.com:andreasgal/pdf.js 2011-05-06 01:16:20 -07:00
Andreas Gal
16bc5f6fe3 parse startxref 2011-05-06 01:16:09 -07:00
Chris Jones
e655fd0adb Lower the common denominator 2011-05-06 00:42:43 -05:00
Chris Jones
7827e91566 Respect media box 2011-05-05 23:46:54 -05:00
Chris Jones
68f1ca51ce Basic transforms of PDF page/text space to canvas space 2011-05-05 22:20:07 -05:00
Chris Jones
b860bc8d60 Less hacky save/restore/moveText impl 2011-05-05 12:40:34 -05:00
Chris Jones
2ecb90fd45 Mock resource dict, look up fonts 2011-05-05 12:28:37 -05:00
Chris Jones
e464d31d18 Indirect ops so that they can access interpreter state 2011-05-05 12:08:36 -05:00
Chris Jones
07119364fc More nicely truncate args array 2011-05-04 23:53:55 -05:00
Chris Jones
3b558229c1 Couple more tests and operators 2011-05-04 23:34:59 -05:00
Chris Jones
10c7ea0770 Manually hoist constant to avoid building it on each method invocation 2011-05-04 21:31:46 -05:00
Chris Jones
198a3f1a1b Dumb text WIP, more UI for test.html 2011-05-04 20:08:52 -05:00
Chris Jones
d2c96d420a Factor out mock tests, add browser test page, initial canvas backend 2011-05-04 19:32:59 -05:00
Chris Jones
bbab24da2e Add eofObj and helper for converting Obj->JS value 2011-05-04 17:15:26 -05:00
Chris Jones
9969a937ce isNum and operator argument type checking 2011-05-04 16:58:51 -05:00
Chris Jones
229043c15d Add more operators, another test, and reorganize per Table 51 in the spec. 2011-05-04 16:52:52 -05:00
Chris Jones
c46faf9e76 Backend skeleton and temporary testing code 2011-05-04 14:46:39 -05:00
Andreas Gal
ef2e66bf99 use undefined to indicate EOF 2011-05-03 02:17:17 -07:00
Andreas Gal
d3f3e611c3 Split out Stream functionality 2011-05-02 22:50:55 -07:00
Andreas Gal
2040b871da no need to freeze constructors and protos 2011-05-02 19:07:16 -07:00
Andreas Gal
a6b123016b shadow in the direct object, no defineProperty needed 2011-05-02 18:26:18 -07:00
Andreas Gal
21c54da9d1 use ES5 Object operations for lazy properties 2011-05-02 17:20:08 -07:00
Andreas Gal
07571b0bbf add PDFDoc 2011-05-02 15:34:59 -07:00
Andreas Gal
9334143941 a couple syntax fixes 2011-05-02 15:16:03 -07:00
Andreas Gal
4c74c34924 cleanup code a bit, avoid tabs, use java mode 2011-05-02 15:06:11 -07:00
Andreas Gal
4570f6a444 initial checkin, untested, just a couple lines of code 2011-04-26 15:33:36 +09:00