Commit Graph

247 Commits

Author SHA1 Message Date
Yury Delendik
5b50e0d414 Replaces RequireJS to SystemJS. 2017-02-27 08:32:39 -06:00
Yury Delendik
facefb0c79 Move compatibility code to the shared/compatibility.js. 2017-02-23 19:18:44 -06:00
Jonas Jenwald
3e5c6e4287 Merge pull request #8030 from timvandermeij/acroforms-example
Interactive forms: rewrite AcroForms example
2017-02-06 17:45:44 +01:00
Tim van der Meij
63fa26843b Interactive forms: rewrite AcroForms example
This patch lets the AcroForms example make use of the built-in interactive
forms functionality in PDF.js. This makes the example:

- much easier to understand;
- more feature-complete;
- in sync with the core when new functionality is added;
- similar to the other examples in terms of structure.
2017-02-05 23:44:32 +01:00
Yury Delendik
2049cf01db Moves preprocessor stuff to the gulpfile. 2017-02-04 08:19:46 -06:00
Jonas Jenwald
c850968fa7 Remove globals that are now unnecessary thanks to the use of various ESLint environments (e.g. Node, ShellJS, Jasmine) 2016-12-16 21:09:55 +01:00
Tim van der Meij
1d96854019 Widget annotation: implement field name according to the specification
The original code is difficult to read and, more importantly, performs
actions that are not described in the specification. It replaces empty
names with a backtick and an index, but this behavior is not described
in the specification. While the specification is not entirely clear
about what should happen in this case, it does specify that the `T`
field is optional and that multiple field dictionaries may have the same
fully qualified name, so to achieve this it makes the most sense to
ignore missing `T` fields during construction of the field name. This is
the most specification-compliant solution and, judging by opened issue #6623, also the required and expected behavior.
2016-11-02 21:44:44 +01:00
Tim van der Meij
de6c92a96d Examples: improve SVG viewer
This patch:

- resolves a warning in the console about missing character encoding;
- makes the viewer use the same background color and PDF file as the
  regular viewer;
- simplifies the example to bring it more in line with the other
  examples.
2016-10-15 21:08:24 +02:00
Jonas Jenwald
65e9ff68aa [mobile-viewer] Add an async close method to the example, and change open to also be async (issue 7571)
Since the `mobile-viewer` example is based on the old FirefoxOS/B2G PDF viewer, it didn't need to have the same kind of `open/close` methods as the default viewer.
However, now that it has been re-purposed as a simple `mobile-viewer` example, it seems like a good idea to ensure that it has proper asynchronous `open/close` methods.

Fixes 7571.
2016-08-27 12:57:34 +02:00
Tim van der Meij
a20f814265 Refactor the mobile viewer example
This mostly removes B2G-specific code and adds the styles from the B2G
components.
2016-07-27 17:31:52 +02:00
Tim van der Meij
a9dd2ab0ab Move B2G viewer to the examples folder 2016-07-27 17:31:52 +02:00
klemens
6f03f62327 trivial spelling fixes 2016-07-17 14:33:41 +02:00
Yury Delendik
5f883d763f Better components examples. 2016-04-28 13:30:03 -05:00
Yury Delendik
81fc46e666 Refactors FindController dependencies. 2016-04-24 08:25:55 -05:00
Yury Delendik
ae415f9e80 Removing "entry-loader" dependency from webpack. 2016-04-13 08:24:25 -05:00
Brendan Dahl
68e8f5fff5 Merge pull request #7126 from yurydelendik/rm-pdfjs-display
Move all PDFJS display/ usages into global.js file.
2016-04-07 11:47:58 -07:00
Yury Delendik
1e4886a15a Remove global window and navigator usages from the core code. 2016-04-07 13:46:07 -05:00
Yury Delendik
1e3e14e6b2 Exposes all functional members via lib exports and use them in viewer. 2016-04-07 13:46:07 -05:00
Tim van der Meij
b293d1caf5 Update Webpack and Browserify example README files
Previously the commands were not properly parsed as such by GitHub
because they need to be indented with four spaces.

Furthermore, address some minor textual nits.
2016-04-06 18:36:41 +02:00
Yury Delendik
d7d7935648 Initial browserify example. 2016-04-04 11:32:01 -05:00
Tim van der Meij
b8aaa24257 Convert all node make instances to gulp 2016-03-04 20:30:36 +01:00
Jonas Jenwald
4a6575643b [SVG] Specify the PDFJS.cMapUrl/PDFJS.cMapPacked parameters in the svgviewer example
Re: issue 7017.
This should prevent the error, but does not fix the broken rendering.

The rendering issues are caused by `svg.js` not supporting the various text rendering modes, in this case specifically "invisible" (as indicated in the console `Warning: Unimplemented method setTextRenderingMode`).

Compared to the canvas case, where we just ignore invisible text, a smarter solution is probably required for the SVG case. Since just ignoring invisible text in `svg.js` would mean that text-selection isn't possible.
2016-02-26 23:07:39 +01:00
Yury Delendik
85e95d34ed Use RequireJS in the viewer, examples and tests. 2015-12-29 09:20:52 -06:00
Yury Delendik
79c2f69c32 Adds/modifies examples for node.js and webpack. 2015-12-21 13:46:50 -06:00
Jonas Jenwald
3079dd937f Remove a superfluous "s" in AnnotationsLayerBuilder from files in web/
This patch makes the naming consistent with the `TextLayerBuilder`, and also the new `AnnotationLayer`, and should thus help reduce possible confusion when working with the code.
Please note that the files were renamed using `git mv`, in order to preserve blame.
2015-12-18 19:55:54 +01:00
Yury Delendik
6b60c8f4db Adds UMD headers to core, display and shared files. 2015-12-15 13:24:39 -06:00
Tim van der Meij
91274d6d2d Rename annotation_helper.js to annotation_layer.js 2015-12-02 23:30:28 +01:00
Yury Delendik
06c1904675 Refactors FontLoader to group fonts per document. 2015-11-24 13:27:22 -06:00
Yury Delendik
56ccaea99b Move text layer building logic into src/display/text_layer.js 2015-11-19 10:50:27 -06:00
Yury Delendik
2f34fd46cb Move CustomStyle. 2015-11-19 10:47:17 -06:00
Manas
a2ba1b8189 Uses editorconfig to maintain consistent coding styles
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
Yury Delendik
601d29b14e Fixes all examples to require workerSrc to be set. 2015-11-06 07:50:21 -06:00
Jonas Jenwald
1f9466ea02 Add a couple of CSS hacks in order for scrollIntoView to work in the "simpleviewer" component example
This is intended as a temporary solution, in order to get the "simpleviewer" example to work, until we've re-factored `scrollIntoView` to work in both the standard and components-based viewers.
2015-07-30 17:19:54 +02:00
Jonas Jenwald
297f760dce Add a PDFLinkService instance to the "simpleviewer" component example 2015-07-30 17:19:54 +02:00
Tim van der Meij
70cba472e0 Improve the instructions for the 'hello world' example 2015-03-18 22:27:00 +01:00
Tim van der Meij
fcefcb7e7e Remove broken links from hello world example 2015-03-18 20:59:14 +01:00
Collin Anderson
54e984c763 cleaned whitespace 2015-02-17 11:07:37 -05:00
Yury Delendik
81649b00a9 Base64 example and be more flexible what type of data is passed. 2015-01-12 14:52:52 -06:00
Yury Delendik
513a3d8c91 Replaces text selection example 2014-12-20 23:41:34 -06:00
Yury Delendik
6048c8a910 Minor node/pdf2svg.js fixes. 2014-10-22 09:59:20 -05:00
Yury Delendik
88d5fa0fc3 Fixes examples comments. 2014-09-30 15:42:28 -05:00
Yury Delendik
5740b96020 Introduces 'pagesinit' event. 2014-09-30 12:41:53 -05:00
Yury Delendik
b16a406f3a Packages PDFViewer as a UI component. 2014-09-30 12:41:53 -05:00
Yury Delendik
de844a8826 Removes examples from jsbin.com 2014-09-16 09:24:48 -05:00
Yury Delendik
de23d3791e Fixes image and font embedding 2014-08-14 15:11:27 -05:00
Yury Delendik
bc574aa629 Refactors SVG api 2014-08-14 12:56:11 -05:00
pramodhkp
0e5998a325 Added svg export tool 2014-08-14 23:18:19 +05:30
pramodhkp
6d53fc4db7 Minor changes for api.js, font_loader.js and svg.js 2014-08-14 01:01:09 +05:30
Yury Delendik
c6f8244ce5 Simplify text-selection example. 2014-08-06 10:56:05 -05:00
pramodhkp
7efd50e64d Added paintJpegXObject 2014-06-25 03:55:14 +05:30
Tim van der Meij
c7e614323a Removing unnecessary includes from text selection example 2014-06-23 22:45:11 +02:00
Yury Delendik
9a28b8a412 Misc UI improvements for the SVG Viewer 2014-06-19 22:20:55 -05:00
pramodhkp
dd253aadeb SVG Viewer example demo 2014-06-20 08:25:05 +05:30
Yury Delendik
bdeca30fbf Splits shared/annotation.js into core/ and display/ 2014-06-17 17:43:33 -05: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
Yury Delendik
8609f386a9 Merge pull request #4782 from mzgol/script-type
Remove type="text/javascript" from script tags.
2014-05-12 20:24:50 -05:00
Michał Gołębiowski
1a8fc8d2b6 Use jQuery 2 in examples
Since pdf.js doesn't work in IE8 anyway, it doesn't make sense to use
jQuery 1 with it. jQuery 2 should be used in every example that needs
jQuery.
2014-05-13 02:45:10 +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
b8344a543c Basic node.js example that demostrate pdf.combined.js file use 2014-04-19 15:43:16 -05:00
Yury Delendik
206db6f715 Merge pull request #4588 from yurydelendik/text-only
Adds text-only example
2014-04-10 20:30:46 -05:00
Yury Delendik
e128081857 Adds text-only example 2014-04-09 21:59:19 -05:00
Yury Delendik
9c84bfa416 Fixes text-selection example 2014-04-09 20:52:21 -05:00
Yury Delendik
f57c6935d7 Implements WebGL support 2014-04-03 08:36:22 -05:00
Cristihan
9613ba2e22 Update index.html 2014-03-12 10:57:59 -05:00
Tim van der Meij
1b1a9f1b81 Making all examples adhere to the style guide 2014-03-08 23:04:30 +01:00
Samuel Chantaraud
4eb7c04034 Fixed examples/acroforms/forms.js 2014-02-22 09:49:29 -04:00
Yury Delendik
bf432a37bb Refactors shared/pattern.js into core/ and display/ 2014-01-25 12:18:22 -06:00
Brendan Dahl
7563a9dfa0 Update docs on the workerSrc setting. 2013-11-18 14:37:01 -08:00
Sebastian Kruse
041671f81b BugFix: Missing var (context) in function call getOutputScale of text-selection example 2013-10-30 11:43:22 +01:00
Vivin Paliath
f3d1f20652 issue #3346
squashing commits.
2013-08-27 10:05:38 -07:00
Brendan Dahl
bb2529de03 Move the creation of canvas path fonts to the worker. 2013-08-19 16:33:20 -07:00
Brendan Dahl
5ecce4996b Split files into worker and main thread pieces. 2013-08-12 10:48:06 -07:00
Tim van der Meij
2ac858fc68 Fixing #3318 2013-06-02 23:51:08 +02:00
Mack Duan
f8f4b3f45d Refactor code for annotations 2013-05-07 14:22:13 -04:00
Mack Duan
ef423ef30c Implement progressive loading of PDFs 2013-04-12 16:13:22 -07:00
Matt Raible
8c6847eb27 Fixes Util is not defined in acroforms example when running in prod mode 2012-10-29 14:05:19 -05:00
Yury Delendik
306092f53e Add jbig2 references to examples and make.js 2012-06-22 06:41:28 -05:00
Yury Delendik
b312719d7e Fixes test driver and examples 2012-04-12 08:23:38 -07:00
notmasteryet
bfd1d427c7 Adding jpx.js to examples and Makefile 2012-01-18 20:17:50 -06:00
notmasteryet
8288b17edc move inputHint to examples 2011-12-19 20:04:16 -06:00
notmasteryet
6011b5b4db Moving forms UI into examples 2011-12-19 20:00:50 -06:00
Brendan Dahl
9bb2b881b0 Adds cmyk jpg support. Treats the cmyk jpg as a regular stream. 2011-11-08 08:48:10 -08:00
Julian Viereck
3b7829d057 Address review comments. Use only one PDFJS.workerSrc variable to specify the worker source 2011-11-01 19:32:20 +01:00
Julian Viereck
1e6d1f9922 Make worker support work again after file split. Add PDFJS_WORKER_DIR/PDFJS_WORKER_FILE to specify where to load files if worker support is enabled 2011-10-28 14:32:36 +02:00
Artur Adib
1d4e3025b6 PDF --> PDFJS, global wrapper named 2011-10-26 14:46:57 -04:00
Artur Adib
0075007d49 Production scripts 2011-10-25 17:22:45 -07:00
Artur Adib
74015f70ee hello world fixed 2011-10-25 10:53:18 -07:00
=
2ad1e622ab Move remaining worker.js code into pdf.js. 2011-10-20 12:13:18 -07:00
Julian Viereck
a6180830f8 Fix hello world example 2011-10-08 23:02:56 +02:00
Kalervo Kujala
de408dac70 Fix lint warnings.
And name anonymous functions.
2011-09-27 21:43:48 +03:00
Artur Adib
83854a085c Implemented getPdf(). Closes #516
Conflicts:

	examples/helloworld/hello.js
2011-09-27 13:30:47 -04:00
Andreas Gal
6ae80b5e78 Merge pull request #534 from kkujala/master
Fix lint warnings in hello.js.
2011-09-26 14:50:05 -07:00
Kalervo Kujala
d4723cf1cf Fix lint warnings in hello.js.
Also split the long lines in README.
2011-09-26 23:28:16 +03:00
Artur Adib
125c1fe473 Fixed Hello World example: PDFDoc(raw_data)
As per #532
2011-09-26 14:40:32 -04:00
Artur Adib
bc91b98fc8 Addressing comments by Vivien 2011-09-16 08:28:42 -07:00
Artur Adib
3476364886 Moved helloworld/ to examples/helloworld/ 2011-09-16 08:28:42 -07:00