Commit Graph
99 Commits
Author SHA1 Message Date
Jonas Jenwald d76cfc0610 Disable the NativeImageDecoder in the node/pdf2svg.js example (issue 7901)
It doesn't really make sense to attempt to utilize the `NativeImageDecoder` in Node, since there's no native image support available, hence building on PR 8035 we can easily disable it in the example.

Fixes 7901.
2017-04-04 17:24:29 +02:00
Mukul Mishra f885e98d20 Example for converting PDF to PNG using the Node canvas library 2017-03-26 20:24:00 +02:00
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