Rob Wu
c889e4e679
Fix error in WidgetAnnotation
11 years ago
Jonas Jenwald
9cb09324d2
Add strict equalities in src/core/annotation.js
11 years ago
Yury Delendik
88fd1aa78b
Removes PDFJS.Annotation
11 years ago
Yury Delendik
bdeca30fbf
Splits shared/annotation.js into core/ and display/
11 years ago
Samuel Chantaraud
f362b3c744
Fix #4914 by ignoring hidden annotation
11 years ago
Yury Delendik
d8eb8b1de1
Adds Promise to the getOperatorList
11 years ago
Jonas Jenwald
67a3b59864
Handle more cases of invalid line dash patterns in annotation borders
11 years ago
Tim van der Meij
7656408579
Refactoring Util.inherit.getOperatorList in annotation.js
11 years ago
Jonas Jenwald
cb59e7f872
Remove LegacyPromise in src/shared/annotation.js
11 years ago
Tim van der Meij
8d365b23ca
Force default icon size for Text annotations without appearance stream
11 years ago
Samuel Chantaraud
7a4543e348
Prevent the annotationLayer to be recreated when the page is redrawn
...
This allows interactive annotations to keep their states after a resize
11 years ago
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
11 years ago
Tim van der Meij
10f80bda23
Fixes lint warning W004 in src/shared
11 years ago
Tim van der Meij
a71a87a821
Fixes lint warning W018: confusing use of exclamation mark
11 years ago
Jonas Jenwald
772df5e0cb
Workaround for missing 'Rect' entry in annotation dictionaries (issue 4537)
11 years ago
Yury Delendik
31f081ae17
Doesn't traverse cyclic references in Dict.getAll; reduces empty-Dict garbage
11 years ago
Jonas Jenwald
4840c2ccdc
Add braces to single line statements in src/shared/annotation.js
11 years ago
Samuel Chantaraud
076b3433b4
Improved annotations' display/behavior.
...
Added an "InteractiveAnnotation" class to homogenize the annotations' structure (highlighting) and user interactions (for now, used for text and link annotations).
Text annotations:
The appearance (AP) has priority over the icon (Name).
The popup extends horizontally (up to a limit) as well as vertically.
Reduced the title's font size.
The annotation's color (C) is used to color the popup's background.
On top of the mouseover show/hide behavior, a click on the icon will lock the annotation open (for mobile purposes). It can be closed with another click on either the icon or the popup.
An annotation printing is conditioned by its "print" bit
Unsupported annotations are not displayed at all.
11 years ago
Yury Delendik
10af056f8f
Reset annotation stream; reset page annotation promise
11 years ago
Jonas Jenwald
054f1e7e57
Handle undefined url in LinkAnnotation
11 years ago
Rob Wu
3c0b8073be
Try to recover from bad URI value
...
See https://github.com/mozilla/pdf.js/issues/4159
BAD (http://cms.di.unipi.it/files/bbec7791fac20e98127c77531e4031912392156c/testo.pdf )
<< /S /URI /URI /v#2findex.php#2fFile:Logo.png >>
GOOD (http://www.ioi2012.org/wp-content/uploads/2011/12/practice.pdf ):
<< /S /URI /URI (http://127.0.0.1/v/index.php/File:Logo.png >>
The URL should be wrapped in parentheses, but sometimes it isn't.
Consequently, the value is interpreted as a Name (because of the leading "/"),
and the resulting object is `{name: "v/index.php/File:Logo.png" }`. Obviously,
this is not a string, so `url.indexOf` throws an error here.
11 years ago
Jonas Jenwald
46ba8d10b0
Only check for line dash pattern when annotation has a visible border (bug 957034 followup)
11 years ago
Jonas Jenwald
7c616502c2
Fix annotation border issue (bug 957034)
11 years ago
Yury Delendik
5bf3e44e30
Introduces LegacyPromise; polyfills DOM Promise
11 years ago
Brendan Dahl
2228343f77
Only trigger warning bar on certain unsupported features.
11 years ago
Brendan Dahl
f4942b11f8
Reduce the memory usage of the operator list.
12 years ago
Jonas Jenwald
fb52144cfb
Enable links beginning with 'www.' even if no protocol is specified
12 years ago
Tim van der Meij
48a24a48c1
Fixing annotation icon issues
12 years ago
Tim van der Meij
14912b5a03
Annotation selection
12 years ago
Brendan Dahl
feafb394d6
Use text widget annotation appearance stream if it is available.
12 years ago
Brendan Dahl
5ecce4996b
Split files into worker and main thread pieces.
12 years ago
Tim van der Meij
75035a2970
Named actions implementation
12 years ago
Jonas
688cea0758
Prevent link borders from being drawn if their width is undefined
12 years ago
Brendan Dahl
bf72bc94e2
Incrementally render by sending the operator list by chunks as they're ready.
12 years ago
Yury Delendik
28778e6c1b
Rejects incorrect url in download manager
12 years ago
Rob Wu
cc04cf5d1f
Configurable IMAGE_DIR for annotations
...
The Chrome extension activates PDF.js by inserting the script tags
in a document whose URL and location origin is identical to the PDF
file.
Because of this, the path './images/' was resolved relatively to the
location of the PDF file instead of the extension.
To fix this, the IMAGE_DIR constant is moved outside the local scope,
to allow extensions/chrome/insertviewer.js to override the value.
Originally, the IMAGE_DIR variable was a global variable, but commit
f8f4b3f45d
moved the global variable
to the local scope, causing the extension to malfunction.
Impact: low, the only consequence is that some rarely used images
were not visible.
Trivial test:
At the center of page 2, the annotation icon
(images/annotation-comment.svg) should be visible:
http://linorg.usp.br/CTAN/macros/latex/contrib/pdfcomment/doc/pdfcomment.pdf
12 years ago
Brendan Dahl
e62ab300f1
Handle annotations with no resources.
12 years ago
Brendan Dahl
01ce3d056c
Load all resources before getOperatorList/getTextContent.
12 years ago
Yury Delendik
d8e3f1da72
Adds missing link-annotation-border file and lint error
12 years ago
Yury Delendik
234812a807
Fixing appendToOperatorList
12 years ago
Mack Duan
fc5b7dbb1f
Add support for form text annotations
12 years ago
Mack Duan
a394c1bac6
Support borders for link annotations
12 years ago
Yury Delendik
336aa38f4a
Reset canvas state before drawing annotations
...
Conflicts:
src/core.js
12 years ago
Mack Duan
da2c4d58ec
Do not show appearance stream for text annotations
12 years ago
Mack Duan
f8f4b3f45d
Refactor code for annotations
12 years ago