New plugin: pdfviewer providing inline PDF rendering using pdf.js

This commit is contained in:
Thomas Bruederli 2013-01-24 14:03:12 +01:00
parent 53c77796dd
commit 451ced1d34
65 changed files with 8341 additions and 0 deletions

661
plugins/pdfviewer/LICENSE Normal file
View file

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.

48
plugins/pdfviewer/README Normal file
View file

@ -0,0 +1,48 @@
Roundcube inline PDF Viewer
===========================
The rendering of PDF documents is based on the pdf.js library
by andreasgal. See http://mozilla.github.com/pdf.js/ for more information.
INSTALLATION
------------
Add 'odfviewer' to the list of plugins in the config/main.inc.php file
of your Roundcube installation.
BUILD (for developers only)
-----
Clone the git repository into a local directory:
$ git clone https://github.com/mozilla/pdf.js.git pdfjs
$ cd pdfjs
To actually build the viewer, node.js is required!
$ node make generic
The viewer is generated in build/generic/web/ and the pdf.js script in
build/generic/build/pdf.js. Copy build/generic/web/ to the plugin directory
<roundcubedir>/plugins/pdfviewer/viewer/ and also copy pdf.js into the viewer
directory:
$ cd <roundcubedir>/plugins/pdfviewer
$ cp -r <pdfjsdir>/build/generic/web viewer
$ cp <pdfjsdir>/build/generic/build/pdf.js viewer/pdf.js
$ rm viewer/*.pdf
Then apply the pdfjs-viewer.diff patch to adjust the viewer for the use
within Roundcube:
$ patch -p1 < pdfjs-viewer.diff
Optionally, compress the scripts using Google's Closure Compiler [1]
or the YUI Compressor [2].
$ <roundcubedir>/bin/jsshrink.sh viewer/pdf.js ECMASCRIPT5
$ <roundcubedir>/bin/jsshrink.sh viewer/viewer.js ECMASCRIPT5
[1] http://closure-compiler.googlecode.com/
[2] http://developer.yahoo.com/yui/compressor/

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
http://pear.php.net/dtd/tasks-1.0.xsd
http://pear.php.net/dtd/package-2.0
http://pear.php.net/dtd/package-2.0.xsd">
<name>pdfviewer</name>
<uri>http://git.kolab.org/roundcubemail-plugins-kolab/</uri>
<summary>Inline PDF viewer plugin</summary>
<description>Render PDF files directly in the preview window by using the pdf.js from (http://mozilla.github.com/pdf.js)</description>
<lead>
<name>Thomas Bruederli</name>
<user>thomasb</user>
<email>bruederli@kolabsys.com</email>
<active>yes</active>
</lead>
<date>2013-01-24</date>
<time>12:20:00</time>
<version>
<release>0.1</release>
<api>0.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.gnu.org/licenses/agpl.html">GNU AGPL</license>
<notes>-</notes>
<contents>
<dir baseinstalldir="/" name="/">
<file name="pdfviewer.php" role="php"></file>
<file name="README" role="data"></file>
<file name="LICENSE" role="data"></file>
<file name="viewer/viewer.html" role="data"></file>
<file name="viewer/viewer.js" role="data"></file>
<file name="viewer/viewer.css" role="data"></file>
<file name="viewer/pdf.js" role="data"></file>
<file name="viewer/compatibility.js" role="data"></file>
<file name="viewer/debugger.js" role="data"></file>
<file name="viewer/l10n.js" role="data"></file>
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.2.1</min>
</php>
<pearinstaller>
<min>1.7.0</min>
</pearinstaller>
</required>
</dependencies>
<phprelease/>
</package>

View file

@ -0,0 +1,102 @@
--- a/viewer/viewer.html 2013-01-24 11:17:55.000000000 +0100
+++ b/viewer/viewer.html 2013-01-24 13:54:20.000000000 +0100
@@ -30,7 +30,7 @@
<!-- This snippet is used in production, see Makefile -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/>
<script type="text/javascript" src="l10n.js"></script>
-<script type="text/javascript" src="../build/pdf.js"></script>
+<script type="text/javascript" src="pdf.js"></script>
<script type="text/javascript" src="debugger.js"></script>
@@ -111,19 +111,9 @@
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
- <button id="openFile" class="toolbarButton openFile" title="Open File" tabindex="12" data-l10n-id="open_file">
- <span data-l10n-id="open_file_label">Open</span>
- </button>
-
<button id="print" class="toolbarButton print" title="Print" tabindex="13" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
-
- <button id="download" class="toolbarButton download" title="Download" tabindex="14" data-l10n-id="download">
- <span data-l10n-id="download_label">Download</span>
- </button>
- <!-- <div class="toolbarButtonSpacer"></div> -->
- <a href="#" id="viewBookmark" class="toolbarButton bookmark" title="Current view (copy or open in new window)" tabindex="15" data-l10n-id="bookmark"><span data-l10n-id="bookmark_label">Current View</span></a>
</div>
<div class="outerCenter">
<div class="innerCenter" id="toolbarViewerMiddle">
--- a/viewer/viewer.js 2013-01-24 11:17:55.000000000 +0100
+++ b/viewer/viewer.js 2013-01-24 13:51:05.000000000 +0100
@@ -17,7 +17,7 @@
'use strict';
-var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
+var DEFAULT_URL = null;
var DEFAULT_SCALE = 'auto';
var DEFAULT_SCALE_DELTA = 1.1;
var UNKNOWN_SCALE = 0;
@@ -43,7 +43,7 @@
FIND_PENDING: 3
};
- PDFJS.workerSrc = '../build/pdf.js';
+ PDFJS.workerSrc = 'pdf.js';
var mozL10n = document.mozL10n || document.webL10n;
@@ -2676,7 +2676,7 @@
var file = params.file || DEFAULT_URL;
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- document.getElementById('openFile').setAttribute('hidden', 'true');
+ // document.getElementById('openFile').setAttribute('hidden', 'true');
} else {
document.getElementById('fileInput').value = null;
}
@@ -2790,21 +2790,11 @@
PDFView.fullscreen();
});
- document.getElementById('openFile').addEventListener('click',
- function() {
- document.getElementById('fileInput').click();
- });
-
document.getElementById('print').addEventListener('click',
function() {
window.print();
});
- document.getElementById('download').addEventListener('click',
- function() {
- PDFView.download();
- });
-
document.getElementById('pageNumber').addEventListener('change',
function() {
PDFView.page = this.value;
@@ -2899,7 +2889,7 @@
store.set('scrollTop', Math.round(topLeft[1]));
});
var href = PDFView.getAnchorUrl(pdfOpenParams);
- document.getElementById('viewBookmark').href = href;
+ // document.getElementById('viewBookmark').href = href;
}
window.addEventListener('resize', function webViewerResize(evt) {
@@ -2933,8 +2923,8 @@
PDFView.setTitleUsingUrl(file.name);
// URL does not reflect proper document location - hiding some icons.
- document.getElementById('viewBookmark').setAttribute('hidden', 'true');
- document.getElementById('download').setAttribute('hidden', 'true');
+ // document.getElementById('viewBookmark').setAttribute('hidden', 'true');
+ // document.getElementById('download').setAttribute('hidden', 'true');
}, true);
function selectScaleOption(value) {

View file

@ -0,0 +1,134 @@
<?php
/**
* Inline PDF viewer plugin
*
* Render PDF files directly in the preview window
* by using the JavaScript PDF Reader pdf.js by andreasgal (http://mozilla.github.com/pdf.js)
*
* @version 0.1
* @author Thomas Bruederli <bruederli@kolabsys.com>
*
* Copyright (C) 2013, Kolab Systems AG
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class pdfviewer extends rcube_plugin
{
public $task = 'mail|calendar|tasks|logout';
private $pdf_mimetypes = array(
'application/pdf',
);
/**
* Plugin initialization
*/
function init()
{
// pdf.js only supports IE9 or higher
$ua = new rcube_browser;
if ($ua->ie && $ua->ver < 9)
return;
// extend list of mimetypes that should open in preview
$rcmail = rcube::get_instance();
if ($rcmail->action == 'preview' || $rcmail->action == 'show' || $rcmail->task == 'calendar' || $rcmail->task == 'tasks') {
$mimetypes = (array)$rcmail->config->get('client_mimetypes');
$rcmail->config->set('client_mimetypes', array_merge($mimetypes, $this->pdf_mimetypes));
}
// only use pdf.js if the browser doesn't support inline PDF rendering
if (empty($_SESSION['browser_caps']['pdf']) || $ua->opera)
$this->add_hook('message_part_get', array($this, 'get_part'));
$this->add_hook('message_part_structure', array($this, 'part_structure'));
}
/**
* Handler for message attachment download
*/
public function get_part($args)
{
if (!$args['download'] && $args['mimetype'] && in_array($args['mimetype'], $this->pdf_mimetypes)) {
$rcmail = rcube::get_instance();
$mimetype = 'application/pdf';
// redirect to viewer.html
if (empty($_GET['_load'])) {
$file_url = $this->abs_url($rcmail->url($_GET + array('_load' => 1)));
header('Location: ' . $this->abs_url($this->urlbase . 'viewer/viewer.html') . '?file=' . urlencode($file_url));
$args['abort'] = true;
}
}
return $args;
}
/**
* Hook for MIME message parsing.
* This allows us to fix mimetypes of PDF attachments
*/
public function part_structure($args)
{
if (!empty($args['structure']->parts)) {
foreach ($args['structure']->parts as $i => $part) {
$this->fix_mime_part($args['structure']->parts[$i], $args['object']);
}
}
else if ($args['structure']->mimetype != $args['mimetype']) {
$args['mimetype'] = $args['structure'];
}
return $args;
}
/**
* Helper method to fix potentially invalid mimetypes of PDF attachments
*/
private function fix_mime_part($part, $message)
{
// Some versions of Outlook create garbage Content-Type:
// application/pdf.A520491B_3BF7_494D_8855_7FAC2C6C0608
if (preg_match('/^application\/pdf.+/', $part->mimetype)) {
$part->mimetype = 'application/pdf';
}
// try to fix invalid application/octet-stream mimetypes for PDF attachments
if ($part->mimetype == 'application/octet-stream' && preg_match('/\.pdf$/', strval($part->filename))) {
$body = $part->body ? $part->body : $message->get_part_content($part->mime_id, null, true, 2048);
$real_mimetype = rcube_mime::file_content_type($body, $part->filename, $part->mimetype, true, true);
if (in_array($real_mimetype, $this->pdf_mimetypes)) {
$part->mimetype = $real_mimetype;
}
}
list($part->ctype_primary, $part->ctype_secondary) = explode('/', $part->mimetype);
}
/**
* Build an absolute URL with the given relative path
*/
private function abs_url($relpath = '')
{
$webroot = '';
if (dirname($_SERVER['SCRIPT_NAME']) != '/')
$webroot .= dirname($_SERVER['SCRIPT_NAME']) . '/';
return $webroot . preg_replace('!^\./!', '', $relpath);
}
}

View file

@ -0,0 +1,429 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
// Checking if the typed arrays are supported
(function checkTypedArrayCompatibility() {
if (typeof Uint8Array !== 'undefined') {
// some mobile versions do not support subarray (e.g. safari 5 / iOS)
if (typeof Uint8Array.prototype.subarray === 'undefined') {
Uint8Array.prototype.subarray = function subarray(start, end) {
return new Uint8Array(this.slice(start, end));
};
Float32Array.prototype.subarray = function subarray(start, end) {
return new Float32Array(this.slice(start, end));
};
}
// some mobile version might not support Float64Array
if (typeof Float64Array === 'undefined')
window.Float64Array = Float32Array;
return;
}
function subarray(start, end) {
return new TypedArray(this.slice(start, end));
}
function setArrayOffset(array, offset) {
if (arguments.length < 2)
offset = 0;
for (var i = 0, n = array.length; i < n; ++i, ++offset)
this[offset] = array[i] & 0xFF;
}
function TypedArray(arg1) {
var result;
if (typeof arg1 === 'number') {
result = [];
for (var i = 0; i < arg1; ++i)
result[i] = 0;
} else
result = arg1.slice(0);
result.subarray = subarray;
result.buffer = result;
result.byteLength = result.length;
result.set = setArrayOffset;
if (typeof arg1 === 'object' && arg1.buffer)
result.buffer = arg1.buffer;
return result;
}
window.Uint8Array = TypedArray;
// we don't need support for set, byteLength for 32-bit array
// so we can use the TypedArray as well
window.Uint32Array = TypedArray;
window.Int32Array = TypedArray;
window.Uint16Array = TypedArray;
window.Float32Array = TypedArray;
window.Float64Array = TypedArray;
})();
// Object.create() ?
(function checkObjectCreateCompatibility() {
if (typeof Object.create !== 'undefined')
return;
Object.create = function objectCreate(proto) {
var constructor = function objectCreateConstructor() {};
constructor.prototype = proto;
return new constructor();
};
})();
// Object.defineProperty() ?
(function checkObjectDefinePropertyCompatibility() {
if (typeof Object.defineProperty !== 'undefined') {
var definePropertyPossible = true;
try {
// some browsers (e.g. safari) cannot use defineProperty() on DOM objects
// and thus the native version is not sufficient
Object.defineProperty(new Image(), 'id', { value: 'test' });
// ... another test for android gb browser for non-DOM objects
var Test = function Test() {};
Test.prototype = { get id() { } };
Object.defineProperty(new Test(), 'id',
{ value: '', configurable: true, enumerable: true, writable: false });
} catch (e) {
definePropertyPossible = false;
}
if (definePropertyPossible) return;
}
Object.defineProperty = function objectDefineProperty(obj, name, def) {
delete obj[name];
if ('get' in def)
obj.__defineGetter__(name, def['get']);
if ('set' in def)
obj.__defineSetter__(name, def['set']);
if ('value' in def) {
obj.__defineSetter__(name, function objectDefinePropertySetter(value) {
this.__defineGetter__(name, function objectDefinePropertyGetter() {
return value;
});
return value;
});
obj[name] = def.value;
}
};
})();
// Object.keys() ?
(function checkObjectKeysCompatibility() {
if (typeof Object.keys !== 'undefined')
return;
Object.keys = function objectKeys(obj) {
var result = [];
for (var i in obj) {
if (obj.hasOwnProperty(i))
result.push(i);
}
return result;
};
})();
// No readAsArrayBuffer ?
(function checkFileReaderReadAsArrayBuffer() {
if (typeof FileReader === 'undefined')
return; // FileReader is not implemented
var frPrototype = FileReader.prototype;
// Older versions of Firefox might not have readAsArrayBuffer
if ('readAsArrayBuffer' in frPrototype)
return; // readAsArrayBuffer is implemented
Object.defineProperty(frPrototype, 'readAsArrayBuffer', {
value: function fileReaderReadAsArrayBuffer(blob) {
var fileReader = new FileReader();
var originalReader = this;
fileReader.onload = function fileReaderOnload(evt) {
var data = evt.target.result;
var buffer = new ArrayBuffer(data.length);
var uint8Array = new Uint8Array(buffer);
for (var i = 0, ii = data.length; i < ii; i++)
uint8Array[i] = data.charCodeAt(i);
Object.defineProperty(originalReader, 'result', {
value: buffer,
enumerable: true,
writable: false,
configurable: true
});
var event = document.createEvent('HTMLEvents');
event.initEvent('load', false, false);
originalReader.dispatchEvent(event);
};
fileReader.readAsBinaryString(blob);
}
});
})();
// No XMLHttpRequest.response ?
(function checkXMLHttpRequestResponseCompatibility() {
var xhrPrototype = XMLHttpRequest.prototype;
if (!('overrideMimeType' in xhrPrototype)) {
// IE10 might have response, but not overrideMimeType
Object.defineProperty(xhrPrototype, 'overrideMimeType', {
value: function xmlHttpRequestOverrideMimeType(mimeType) {}
});
}
if ('response' in xhrPrototype ||
'mozResponseArrayBuffer' in xhrPrototype ||
'mozResponse' in xhrPrototype ||
'responseArrayBuffer' in xhrPrototype)
return;
// IE9 ?
if (typeof VBArray !== 'undefined') {
Object.defineProperty(xhrPrototype, 'response', {
get: function xmlHttpRequestResponseGet() {
return new Uint8Array(new VBArray(this.responseBody).toArray());
}
});
return;
}
// other browsers
function responseTypeSetter() {
// will be only called to set "arraybuffer"
this.overrideMimeType('text/plain; charset=x-user-defined');
}
if (typeof xhrPrototype.overrideMimeType === 'function') {
Object.defineProperty(xhrPrototype, 'responseType',
{ set: responseTypeSetter });
}
function responseGetter() {
var text = this.responseText;
var i, n = text.length;
var result = new Uint8Array(n);
for (i = 0; i < n; ++i)
result[i] = text.charCodeAt(i) & 0xFF;
return result;
}
Object.defineProperty(xhrPrototype, 'response', { get: responseGetter });
})();
// window.btoa (base64 encode function) ?
(function checkWindowBtoaCompatibility() {
if ('btoa' in window)
return;
var digits =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
window.btoa = function windowBtoa(chars) {
var buffer = '';
var i, n;
for (i = 0, n = chars.length; i < n; i += 3) {
var b1 = chars.charCodeAt(i) & 0xFF;
var b2 = chars.charCodeAt(i + 1) & 0xFF;
var b3 = chars.charCodeAt(i + 2) & 0xFF;
var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
var d3 = i + 1 < n ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
var d4 = i + 2 < n ? (b3 & 0x3F) : 64;
buffer += (digits.charAt(d1) + digits.charAt(d2) +
digits.charAt(d3) + digits.charAt(d4));
}
return buffer;
};
})();
// Function.prototype.bind ?
(function checkFunctionPrototypeBindCompatibility() {
if (typeof Function.prototype.bind !== 'undefined')
return;
Function.prototype.bind = function functionPrototypeBind(obj) {
var fn = this, headArgs = Array.prototype.slice.call(arguments, 1);
var bound = function functionPrototypeBindBound() {
var args = Array.prototype.concat.apply(headArgs, arguments);
return fn.apply(obj, args);
};
return bound;
};
})();
// IE9/10 text/html data URI
(function checkDataURICompatibility() {
if (!('documentMode' in document) ||
document.documentMode !== 9 && document.documentMode !== 10)
return;
// overriding the src property
var originalSrcDescriptor = Object.getOwnPropertyDescriptor(
HTMLIFrameElement.prototype, 'src');
Object.defineProperty(HTMLIFrameElement.prototype, 'src', {
get: function htmlIFrameElementPrototypeSrcGet() { return this.$src; },
set: function htmlIFrameElementPrototypeSrcSet(src) {
this.$src = src;
if (src.substr(0, 14) != 'data:text/html') {
originalSrcDescriptor.set.call(this, src);
return;
}
// for text/html, using blank document and then
// document's open, write, and close operations
originalSrcDescriptor.set.call(this, 'about:blank');
setTimeout((function htmlIFrameElementPrototypeSrcOpenWriteClose() {
var doc = this.contentDocument;
doc.open('text/html');
doc.write(src.substr(src.indexOf(',') + 1));
doc.close();
}).bind(this), 0);
},
enumerable: true
});
})();
// HTMLElement dataset property
(function checkDatasetProperty() {
var div = document.createElement('div');
if ('dataset' in div)
return; // dataset property exists
Object.defineProperty(HTMLElement.prototype, 'dataset', {
get: function() {
if (this._dataset)
return this._dataset;
var dataset = {};
for (var j = 0, jj = this.attributes.length; j < jj; j++) {
var attribute = this.attributes[j];
if (attribute.name.substring(0, 5) != 'data-')
continue;
var key = attribute.name.substring(5).replace(/\-([a-z])/g,
function(all, ch) { return ch.toUpperCase(); });
dataset[key] = attribute.value;
}
Object.defineProperty(this, '_dataset', {
value: dataset,
writable: false,
enumerable: false
});
return dataset;
},
enumerable: true
});
})();
// HTMLElement classList property
(function checkClassListProperty() {
var div = document.createElement('div');
if ('classList' in div)
return; // classList property exists
function changeList(element, itemName, add, remove) {
var s = element.className || '';
var list = s.split(/\s+/g);
if (list[0] == '') list.shift();
var index = list.indexOf(itemName);
if (index < 0 && add)
list.push(itemName);
if (index >= 0 && remove)
list.splice(index, 1);
element.className = list.join(' ');
}
var classListPrototype = {
add: function(name) {
changeList(this.element, name, true, false);
},
remove: function(name) {
changeList(this.element, name, false, true);
},
toggle: function(name) {
changeList(this.element, name, true, true);
}
};
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
if (this._classList)
return this._classList;
var classList = Object.create(classListPrototype, {
element: {
value: this,
writable: false,
enumerable: true
}
});
Object.defineProperty(this, '_classList', {
value: classList,
writable: false,
enumerable: false
});
return classList;
},
enumerable: true
});
})();
// Check console compatability
(function checkConsoleCompatibility() {
if (typeof console == 'undefined') {
console = {
log: function() {},
error: function() {}
};
} else if (!('bind' in console.log)) {
// native functions in IE9 might not have bind
console.log = (function(fn) {
return function(msg) { return fn(msg); }
})(console.log);
console.error = (function(fn) {
return function(msg) { return fn(msg); }
})(console.error);
}
})();
// Check onclick compatibility in Opera
(function checkOnClickCompatibility() {
// workaround for reported Opera bug DSK-354448:
// onclick fires on disabled buttons with opaque content
function ignoreIfTargetDisabled(event) {
if (isDisabled(event.target)) {
event.stopPropagation();
}
}
function isDisabled(node) {
return node.disabled || (node.parentNode && isDisabled(node.parentNode));
}
if (navigator.userAgent.indexOf('Opera') != -1) {
// use browser detection since we cannot feature-check this bug
document.addEventListener('click', ignoreIfTargetDisabled, true);
}
})();
// Checks if navigator.language is supported
(function checkNavigatorLanguage() {
if ('language' in navigator)
return;
Object.defineProperty(navigator, 'language', {
get: function navigatorLanguage() {
var language = navigator.userLanguage || 'en-US';
return language.substring(0, 2).toLowerCase() +
language.substring(2).toUpperCase();
},
enumerable: true
});
})();

View file

@ -0,0 +1,490 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
var FontInspector = (function FontInspectorClosure() {
var fonts;
var panelWidth = 300;
var active = false;
var fontAttribute = 'data-font-name';
function removeSelection() {
var divs = document.querySelectorAll('div[' + fontAttribute + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
div.className = '';
}
}
function resetSelection() {
var divs = document.querySelectorAll('div[' + fontAttribute + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
div.className = 'debuggerHideText';
}
}
function selectFont(fontName, show) {
var divs = document.querySelectorAll('div[' + fontAttribute + '=' +
fontName + ']');
for (var i = 0, ii = divs.length; i < ii; ++i) {
var div = divs[i];
div.className = show ? 'debuggerShowText' : 'debuggerHideText';
}
}
function textLayerClick(e) {
if (!e.target.dataset.fontName || e.target.tagName != 'DIV')
return;
var fontName = e.target.dataset.fontName;
var selects = document.getElementsByTagName('input');
for (var i = 0; i < selects.length; ++i) {
var select = selects[i];
if (select.dataset.fontName != fontName) continue;
select.checked = !select.checked;
selectFont(fontName, select.checked);
select.scrollIntoView();
}
}
return {
// Properties/functions needed by PDFBug.
id: 'FontInspector',
name: 'Font Inspector',
panel: null,
manager: null,
init: function init() {
var panel = this.panel;
panel.setAttribute('style', 'padding: 5px;');
var tmp = document.createElement('button');
tmp.addEventListener('click', resetSelection);
tmp.textContent = 'Refresh';
panel.appendChild(tmp);
fonts = document.createElement('div');
panel.appendChild(fonts);
},
enabled: false,
get active() {
return active;
},
set active(value) {
active = value;
if (active) {
document.body.addEventListener('click', textLayerClick, true);
resetSelection();
} else {
document.body.removeEventListener('click', textLayerClick, true);
removeSelection();
}
},
// FontInspector specific functions.
fontAdded: function fontAdded(fontObj, url) {
function properties(obj, list) {
var moreInfo = document.createElement('table');
for (var i = 0; i < list.length; i++) {
var tr = document.createElement('tr');
var td1 = document.createElement('td');
td1.textContent = list[i];
tr.appendChild(td1);
var td2 = document.createElement('td');
td2.textContent = obj[list[i]].toString();
tr.appendChild(td2);
moreInfo.appendChild(tr);
}
return moreInfo;
}
var moreInfo = properties(fontObj, ['name', 'type']);
var m = /url\(['"]?([^\)"']+)/.exec(url);
var fontName = fontObj.loadedName;
var font = document.createElement('div');
var name = document.createElement('span');
name.textContent = fontName;
var download = document.createElement('a');
download.href = m[1];
download.textContent = 'Download';
var logIt = document.createElement('a');
logIt.href = '';
logIt.textContent = 'Log';
logIt.addEventListener('click', function(event) {
event.preventDefault();
console.log(fontObj);
});
var select = document.createElement('input');
select.setAttribute('type', 'checkbox');
select.dataset.fontName = fontName;
select.addEventListener('click', (function(select, fontName) {
return (function() {
selectFont(fontName, select.checked);
});
})(select, fontName));
font.appendChild(select);
font.appendChild(name);
font.appendChild(document.createTextNode(' '));
font.appendChild(download);
font.appendChild(document.createTextNode(' '));
font.appendChild(logIt);
font.appendChild(moreInfo);
fonts.appendChild(font);
// Somewhat of a hack, should probably add a hook for when the text layer
// is done rendering.
setTimeout(function() {
if (this.active)
resetSelection();
}.bind(this), 2000);
}
};
})();
// Manages all the page steppers.
var StepperManager = (function StepperManagerClosure() {
var steppers = [];
var stepperDiv = null;
var stepperControls = null;
var stepperChooser = null;
var breakPoints = {};
return {
// Properties/functions needed by PDFBug.
id: 'Stepper',
name: 'Stepper',
panel: null,
manager: null,
init: function init() {
var self = this;
this.panel.setAttribute('style', 'padding: 5px;');
stepperControls = document.createElement('div');
stepperChooser = document.createElement('select');
stepperChooser.addEventListener('change', function(event) {
self.selectStepper(this.value);
});
stepperControls.appendChild(stepperChooser);
stepperDiv = document.createElement('div');
this.panel.appendChild(stepperControls);
this.panel.appendChild(stepperDiv);
if (sessionStorage.getItem('pdfjsBreakPoints'))
breakPoints = JSON.parse(sessionStorage.getItem('pdfjsBreakPoints'));
},
enabled: false,
active: false,
// Stepper specific functions.
create: function create(pageIndex) {
var debug = document.createElement('div');
debug.id = 'stepper' + pageIndex;
debug.setAttribute('hidden', true);
debug.className = 'stepper';
stepperDiv.appendChild(debug);
var b = document.createElement('option');
b.textContent = 'Page ' + (pageIndex + 1);
b.value = pageIndex;
stepperChooser.appendChild(b);
var initBreakPoints = breakPoints[pageIndex] || [];
var stepper = new Stepper(debug, pageIndex, initBreakPoints);
steppers.push(stepper);
if (steppers.length === 1)
this.selectStepper(pageIndex, false);
return stepper;
},
selectStepper: function selectStepper(pageIndex, selectPanel) {
if (selectPanel)
this.manager.selectPanel(1);
for (var i = 0; i < steppers.length; ++i) {
var stepper = steppers[i];
if (stepper.pageIndex == pageIndex)
stepper.panel.removeAttribute('hidden');
else
stepper.panel.setAttribute('hidden', true);
}
var options = stepperChooser.options;
for (var i = 0; i < options.length; ++i) {
var option = options[i];
option.selected = option.value == pageIndex;
}
},
saveBreakPoints: function saveBreakPoints(pageIndex, bps) {
breakPoints[pageIndex] = bps;
sessionStorage.setItem('pdfjsBreakPoints', JSON.stringify(breakPoints));
}
};
})();
// The stepper for each page's IRQueue.
var Stepper = (function StepperClosure() {
function Stepper(panel, pageIndex, initialBreakPoints) {
this.panel = panel;
this.len = 0;
this.breakPoint = 0;
this.nextBreakPoint = null;
this.pageIndex = pageIndex;
this.breakPoints = initialBreakPoints;
this.currentIdx = -1;
}
Stepper.prototype = {
init: function init(IRQueue) {
// Shorter way to create element and optionally set textContent.
function c(tag, textContent) {
var d = document.createElement(tag);
if (textContent)
d.textContent = textContent;
return d;
}
var panel = this.panel;
this.len = IRQueue.fnArray.length;
var content = c('div', 'c=continue, s=step');
var table = c('table');
content.appendChild(table);
table.cellSpacing = 0;
var headerRow = c('tr');
table.appendChild(headerRow);
headerRow.appendChild(c('th', 'Break'));
headerRow.appendChild(c('th', 'Idx'));
headerRow.appendChild(c('th', 'fn'));
headerRow.appendChild(c('th', 'args'));
var self = this;
for (var i = 0; i < IRQueue.fnArray.length; i++) {
var line = c('tr');
line.className = 'line';
line.dataset.idx = i;
table.appendChild(line);
var checked = this.breakPoints.indexOf(i) != -1;
var args = IRQueue.argsArray[i] ? IRQueue.argsArray[i] : [];
var breakCell = c('td');
var cbox = c('input');
cbox.type = 'checkbox';
cbox.className = 'points';
cbox.checked = checked;
cbox.onclick = (function(x) {
return function() {
if (this.checked)
self.breakPoints.push(x);
else
self.breakPoints.splice(self.breakPoints.indexOf(x), 1);
StepperManager.saveBreakPoints(self.pageIndex, self.breakPoints);
}
})(i);
breakCell.appendChild(cbox);
line.appendChild(breakCell);
line.appendChild(c('td', i.toString()));
line.appendChild(c('td', IRQueue.fnArray[i]));
line.appendChild(c('td', args.join(', ')));
}
panel.appendChild(content);
var self = this;
},
getNextBreakPoint: function getNextBreakPoint() {
this.breakPoints.sort(function(a, b) { return a - b; });
for (var i = 0; i < this.breakPoints.length; i++) {
if (this.breakPoints[i] > this.currentIdx)
return this.breakPoints[i];
}
return null;
},
breakIt: function breakIt(idx, callback) {
StepperManager.selectStepper(this.pageIndex, true);
var self = this;
var dom = document;
self.currentIdx = idx;
var listener = function(e) {
switch (e.keyCode) {
case 83: // step
dom.removeEventListener('keydown', listener, false);
self.nextBreakPoint = self.currentIdx + 1;
self.goTo(-1);
callback();
break;
case 67: // continue
dom.removeEventListener('keydown', listener, false);
var breakPoint = self.getNextBreakPoint();
self.nextBreakPoint = breakPoint;
self.goTo(-1);
callback();
break;
}
};
dom.addEventListener('keydown', listener, false);
self.goTo(idx);
},
goTo: function goTo(idx) {
var allRows = this.panel.getElementsByClassName('line');
for (var x = 0, xx = allRows.length; x < xx; ++x) {
var row = allRows[x];
if (row.dataset.idx == idx) {
row.style.backgroundColor = 'rgb(251,250,207)';
row.scrollIntoView();
} else {
row.style.backgroundColor = null;
}
}
}
};
return Stepper;
})();
var Stats = (function Stats() {
var stats = [];
function clear(node) {
while (node.hasChildNodes())
node.removeChild(node.lastChild);
}
function getStatIndex(pageNumber) {
for (var i = 0, ii = stats.length; i < ii; ++i)
if (stats[i].pageNumber === pageNumber)
return i;
return false;
}
return {
// Properties/functions needed by PDFBug.
id: 'Stats',
name: 'Stats',
panel: null,
manager: null,
init: function init() {
this.panel.setAttribute('style', 'padding: 5px;');
PDFJS.enableStats = true;
},
enabled: false,
active: false,
// Stats specific functions.
add: function(pageNumber, stat) {
if (!stat)
return;
var statsIndex = getStatIndex(pageNumber);
if (statsIndex !== false) {
var b = stats[statsIndex];
this.panel.removeChild(b.div);
stats.splice(statsIndex, 1);
}
var wrapper = document.createElement('div');
wrapper.className = 'stats';
var title = document.createElement('div');
title.className = 'title';
title.textContent = 'Page: ' + pageNumber;
var statsDiv = document.createElement('div');
statsDiv.textContent = stat.toString();
wrapper.appendChild(title);
wrapper.appendChild(statsDiv);
stats.push({ pageNumber: pageNumber, div: wrapper });
stats.sort(function(a, b) { return a.pageNumber - b.pageNumber});
clear(this.panel);
for (var i = 0, ii = stats.length; i < ii; ++i)
this.panel.appendChild(stats[i].div);
}
};
})();
// Manages all the debugging tools.
var PDFBug = (function PDFBugClosure() {
var panelWidth = 300;
var buttons = [];
var activePanel = null;
return {
tools: [
FontInspector,
StepperManager,
Stats
],
enable: function(ids) {
var all = false, tools = this.tools;
if (ids.length === 1 && ids[0] === 'all')
all = true;
for (var i = 0; i < tools.length; ++i) {
var tool = tools[i];
if (all || ids.indexOf(tool.id) !== -1)
tool.enabled = true;
}
if (!all) {
// Sort the tools by the order they are enabled.
tools.sort(function(a, b) {
var indexA = ids.indexOf(a.id);
indexA = indexA < 0 ? tools.length : indexA;
var indexB = ids.indexOf(b.id);
indexB = indexB < 0 ? tools.length : indexB;
return indexA - indexB;
});
}
},
init: function init() {
/*
* Basic Layout:
* PDFBug
* Controls
* Panels
* Panel
* Panel
* ...
*/
var ui = document.createElement('div');
ui.id = 'PDFBug';
var controls = document.createElement('div');
controls.setAttribute('class', 'controls');
ui.appendChild(controls);
var panels = document.createElement('div');
panels.setAttribute('class', 'panels');
ui.appendChild(panels);
var container = document.getElementById('viewerContainer');
container.appendChild(ui);
container.style.right = panelWidth + 'px';
// Initialize all the debugging tools.
var tools = this.tools;
var self = this;
for (var i = 0; i < tools.length; ++i) {
var tool = tools[i];
var panel = document.createElement('div');
var panelButton = document.createElement('button');
panelButton.textContent = tool.name;
panelButton.addEventListener('click', (function(selected) {
return function(event) {
event.preventDefault();
self.selectPanel(selected);
};
})(i));
controls.appendChild(panelButton);
panels.appendChild(panel);
tool.panel = panel;
tool.manager = this;
if (tool.enabled)
tool.init();
else
panel.textContent = tool.name + ' is disabled. To enable add ' +
' "' + tool.id + '" to the pdfBug parameter ' +
'and refresh (seperate multiple by commas).';
buttons.push(panelButton);
}
this.selectPanel(0);
},
selectPanel: function selectPanel(index) {
if (index === activePanel)
return;
activePanel = index;
var tools = this.tools;
for (var j = 0; j < tools.length; ++j) {
if (j == index) {
buttons[j].setAttribute('class', 'active');
tools[j].active = true;
tools[j].panel.removeAttribute('hidden');
} else {
buttons[j].setAttribute('class', '');
tools[j].active = false;
tools[j].panel.setAttribute('hidden', 'true');
}
}
}
};
})();

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="40"
height="40">
<path
d="M 1.5006714,23.536225 6.8925879,18.994244 14.585721,26.037937 34.019683,4.5410479 38.499329,9.2235032 14.585721,35.458952 z"
id="path4"
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.25402856;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 392 B

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
height="40"
width="40">
<rect
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
width="33.76017"
height="33.76017"
x="3.119915"
y="3.119915" />
<path
d="m 20.677967,8.54499 c -7.342801,0 -13.295293,4.954293 -13.295293,11.065751 0,2.088793 0.3647173,3.484376 1.575539,5.150563 L 6.0267418,31.45501 13.560595,29.011117 c 2.221262,1.387962 4.125932,1.665377 7.117372,1.665377 7.3428,0 13.295291,-4.954295 13.295291,-11.065753 0,-6.111458 -5.952491,-11.065751 -13.295291,-11.065751 z"
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.93031836;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
</svg>

After

Width:  |  Height:  |  Size: 860 B

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="40"
height="40">
<g
transform="translate(0,-60)"
id="layer1">
<rect
width="36.460953"
height="34.805603"
x="1.7695236"
y="62.597198"
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.30826771;stroke-opacity:1" />
<g
transform="matrix(0.88763677,0,0,0.88763677,2.2472646,8.9890584)">
<path
d="M 20,64.526342 C 11.454135,64.526342 4.5263421,71.454135 4.5263421,80 4.5263421,88.545865 11.454135,95.473658 20,95.473658 28.545865,95.473658 35.473658,88.545865 35.473658,80 35.473658,71.454135 28.545865,64.526342 20,64.526342 z m -0.408738,9.488564 c 3.527079,0 6.393832,2.84061 6.393832,6.335441 0,3.494831 -2.866753,6.335441 -6.393832,6.335441 -3.527079,0 -6.393832,-2.84061 -6.393832,-6.335441 0,-3.494831 2.866753,-6.335441 6.393832,-6.335441 z"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1.02768445;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 7.2335209,71.819938 4.9702591,4.161823 c -1.679956,2.581606 -1.443939,6.069592 0.159325,8.677725 l -5.1263071,3.424463 c 0.67516,1.231452 3.0166401,3.547686 4.2331971,4.194757 l 3.907728,-4.567277 c 2.541952,1.45975 5.730694,1.392161 8.438683,-0.12614 l 3.469517,6.108336 c 1.129779,-0.44367 4.742234,-3.449633 5.416358,-5.003859 l -5.46204,-4.415541 c 1.44319,-2.424098 1.651175,-5.267515 0.557303,-7.748623 l 5.903195,-3.833951 C 33.14257,71.704996 30.616217,69.018606 29.02952,67.99296 l -4.118813,4.981678 C 22.411934,71.205099 18.900853,70.937534 16.041319,72.32916 l -3.595408,-5.322091 c -1.345962,0.579488 -4.1293881,2.921233 -5.2123901,4.812869 z m 8.1010311,3.426672 c 2.75284,-2.446266 6.769149,-2.144694 9.048998,0.420874 2.279848,2.56557 2.113919,6.596919 -0.638924,9.043185 -2.752841,2.446267 -6.775754,2.13726 -9.055604,-0.428308 -2.279851,-2.565568 -2.107313,-6.589485 0.64553,-9.035751 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64">
<path
d="M 32.003143,1.4044602 57.432701,62.632577 6.5672991,62.627924 z"
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:1.00493038;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</svg>

After

Width:  |  Height:  |  Size: 385 B

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64">
<path
d="M 25.470843,9.4933766 C 25.30219,12.141818 30.139101,14.445969 34.704831,13.529144 40.62635,12.541995 41.398833,7.3856498 35.97505,5.777863 31.400921,4.1549155 25.157674,6.5445892 25.470843,9.4933766 z M 4.5246282,17.652051 C 4.068249,11.832873 9.2742983,5.9270407 18.437379,3.0977088 29.751911,-0.87185184 45.495663,1.4008022 53.603953,7.1104009 c 9.275765,6.1889221 7.158128,16.2079421 -3.171076,21.5939521 -1.784316,1.635815 -6.380222,1.21421 -7.068351,3.186186 -1.04003,0.972427 -1.288046,2.050158 -1.232864,3.168203 1.015111,2.000108 -3.831548,1.633216 -3.270553,3.759574 0.589477,5.264544 -0.179276,10.53738 -0.362842,15.806257 -0.492006,2.184998 1.163456,4.574232 -0.734888,6.610642 -2.482919,2.325184 -7.30604,2.189143 -9.193497,-0.274767 -2.733688,-1.740626 -8.254447,-3.615254 -6.104247,-6.339626 3.468112,-1.708686 -2.116197,-3.449897 0.431242,-5.080274 5.058402,-1.39256 -2.393215,-2.304318 -0.146889,-4.334645 3.069198,-0.977415 2.056986,-2.518352 -0.219121,-3.540397 1.876567,-1.807151 1.484149,-4.868919 -2.565455,-5.942205 0.150866,-1.805474 2.905737,-4.136876 -1.679967,-5.20493 C 10.260902,27.882167 4.6872697,22.95045 4.5245945,17.652051 z"
id="path604"
style="fill:#ffff00;fill-opacity:1;stroke:#000000;stroke-width:1.72665179;stroke-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="64"
height="64">
<path
d="M 32.003143,10.913072 57.432701,53.086929 6.567299,53.083723 z"
id="path2985"
style="fill:#ffff00;fill-opacity:0.94117647;fill-rule:nonzero;stroke:#000000;stroke-width:0.83403099;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</svg>

After

Width:  |  Height:  |  Size: 403 B

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="40"
height="40">
<rect
width="36.075428"
height="31.096582"
x="1.962286"
y="4.4517088"
id="rect4"
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.23004246;stroke-opacity:1" />
<rect
width="27.96859"
height="1.5012145"
x="6.0157046"
y="10.285"
id="rect6"
style="fill:#000000;fill-opacity:1;stroke:none" />
<rect
width="27.96859"
height="0.85783684"
x="6.0157056"
y="23.21689"
id="rect8"
style="fill:#000000;fill-opacity:1;stroke:none" />
<rect
width="27.96859"
height="0.85783684"
x="5.8130345"
y="28.964394"
id="rect10"
style="fill:#000000;fill-opacity:1;stroke:none" />
<rect
width="27.96859"
height="0.85783684"
x="6.0157046"
y="17.426493"
id="rect12"
style="fill:#000000;fill-opacity:1;stroke:none" />
</svg>

After

Width:  |  Height:  |  Size: 1,018 B

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns="http://www.w3.org/2000/svg"
width="40"
height="40">
<rect
width="33.76017"
height="33.76017"
x="3.119915"
y="3.119915"
style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
d="m 17.692678,34.50206 0,-16.182224 c -1.930515,-0.103225 -3.455824,-0.730383 -4.57593,-1.881473 -1.12011,-1.151067 -1.680164,-2.619596 -1.680164,-4.405591 0,-1.992435 0.621995,-3.5796849 1.865988,-4.7617553 1.243989,-1.1820288 3.06352,-1.7730536 5.458598,-1.7730764 l 9.802246,0 0,2.6789711 -2.229895,0 0,26.3251486 -2.632515,0 0,-26.3251486 -3.45324,0 0,26.3251486 z"
style="font-size:29.42051125px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.07795751;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" />
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View file

@ -0,0 +1,922 @@
/** Copyright (c) 2011-2012 Fabien Cazenave, Mozilla.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/*
Additional modifications for PDF.js project:
- Disables language initialization on page loading;
- Adds fallback argument to the getL10nData;
- Removes consoleLog and simplifies consoleWarn;
- Removes window._ assignment.
*/
/*jshint browser: true, devel: true, es5: true, globalstrict: true */
'use strict';
document.webL10n = (function(window, document, undefined) {
var gL10nData = {};
var gTextData = '';
var gTextProp = 'textContent';
var gLanguage = '';
var gMacros = {};
var gReadyState = 'loading';
// read-only setting -- we recommend to load l10n resources synchronously
var gAsyncResourceLoading = true;
// debug helpers
function consoleWarn(message) {
console.log('[l10n] ' + message);
};
/**
* DOM helpers for the so-called "HTML API".
*
* These functions are written for modern browsers. For old versions of IE,
* they're overridden in the 'startup' section at the end of this file.
*/
function getL10nResourceLinks() {
return document.querySelectorAll('link[type="application/l10n"]');
}
function getTranslatableChildren(element) {
return element ? element.querySelectorAll('*[data-l10n-id]') : [];
}
function getL10nAttributes(element) {
if (!element)
return {};
var l10nId = element.getAttribute('data-l10n-id');
var l10nArgs = element.getAttribute('data-l10n-args');
var args = {};
if (l10nArgs) {
try {
args = JSON.parse(l10nArgs);
} catch (e) {
consoleWarn('could not parse arguments for #' + l10nId);
}
}
return { id: l10nId, args: args };
}
function fireL10nReadyEvent(lang) {
var evtObject = document.createEvent('Event');
evtObject.initEvent('localized', false, false);
evtObject.language = lang;
window.dispatchEvent(evtObject);
}
/**
* l10n resource parser:
* - reads (async XHR) the l10n resource matching `lang';
* - imports linked resources (synchronously) when specified;
* - parses the text data (fills `gL10nData' and `gTextData');
* - triggers success/failure callbacks when done.
*
* @param {string} href
* URL of the l10n resource to parse.
*
* @param {string} lang
* locale (language) to parse.
*
* @param {Function} successCallback
* triggered when the l10n resource has been successully parsed.
*
* @param {Function} failureCallback
* triggered when the an error has occured.
*
* @return {void}
* uses the following global variables: gL10nData, gTextData, gTextProp.
*/
function parseResource(href, lang, successCallback, failureCallback) {
var baseURL = href.replace(/\/[^\/]*$/, '/');
// handle escaped characters (backslashes) in a string
function evalString(text) {
if (text.lastIndexOf('\\') < 0)
return text;
return text.replace(/\\\\/g, '\\')
.replace(/\\n/g, '\n')
.replace(/\\r/g, '\r')
.replace(/\\t/g, '\t')
.replace(/\\b/g, '\b')
.replace(/\\f/g, '\f')
.replace(/\\{/g, '{')
.replace(/\\}/g, '}')
.replace(/\\"/g, '"')
.replace(/\\'/g, "'");
}
// parse *.properties text data into an l10n dictionary
function parseProperties(text) {
var dictionary = [];
// token expressions
var reBlank = /^\s*|\s*$/;
var reComment = /^\s*#|^\s*$/;
var reSection = /^\s*\[(.*)\]\s*$/;
var reImport = /^\s*@import\s+url\((.*)\)\s*$/i;
var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; // TODO: escape EOLs with '\'
// parse the *.properties file into an associative array
function parseRawLines(rawText, extendedSyntax) {
var entries = rawText.replace(reBlank, '').split(/[\r\n]+/);
var currentLang = '*';
var genericLang = lang.replace(/-[a-z]+$/i, '');
var skipLang = false;
var match = '';
for (var i = 0; i < entries.length; i++) {
var line = entries[i];
// comment or blank line?
if (reComment.test(line))
continue;
// the extended syntax supports [lang] sections and @import rules
if (extendedSyntax) {
if (reSection.test(line)) { // section start?
match = reSection.exec(line);
currentLang = match[1];
skipLang = (currentLang !== '*') &&
(currentLang !== lang) && (currentLang !== genericLang);
continue;
} else if (skipLang) {
continue;
}
if (reImport.test(line)) { // @import rule?
match = reImport.exec(line);
loadImport(baseURL + match[1]); // load the resource synchronously
}
}
// key-value pair
var tmp = line.match(reSplit);
if (tmp && tmp.length == 3)
dictionary[tmp[1]] = evalString(tmp[2]);
}
}
// import another *.properties file
function loadImport(url) {
loadResource(url, function(content) {
parseRawLines(content, false); // don't allow recursive imports
}, false, false); // load synchronously
}
// fill the dictionary
parseRawLines(text, true);
return dictionary;
}
// load the specified resource file
function loadResource(url, onSuccess, onFailure, asynchronous) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, asynchronous);
if (xhr.overrideMimeType) {
xhr.overrideMimeType('text/plain; charset=utf-8');
}
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200 || xhr.status === 0) {
if (onSuccess)
onSuccess(xhr.responseText);
} else {
if (onFailure)
onFailure();
}
}
};
xhr.send(null);
}
// load and parse l10n data (warning: global variables are used here)
loadResource(href, function(response) {
gTextData += response; // mostly for debug
// parse *.properties text data into an l10n dictionary
var data = parseProperties(response);
// find attribute descriptions, if any
for (var key in data) {
var id, prop, index = key.lastIndexOf('.');
if (index > 0) { // an attribute has been specified
id = key.substring(0, index);
prop = key.substr(index + 1);
} else { // no attribute: assuming text content by default
id = key;
prop = gTextProp;
}
if (!gL10nData[id]) {
gL10nData[id] = {};
}
gL10nData[id][prop] = data[key];
}
// trigger callback
if (successCallback)
successCallback();
}, failureCallback, gAsyncResourceLoading);
};
// load and parse all resources for the specified locale
function loadLocale(lang, callback) {
clear();
gLanguage = lang;
// check all <link type="application/l10n" href="..." /> nodes
// and load the resource files
var langLinks = getL10nResourceLinks();
var langCount = langLinks.length;
if (langCount == 0) {
consoleWarn('no resource to load, early way out');
fireL10nReadyEvent(lang);
gReadyState = 'complete';
return;
}
// start the callback when all resources are loaded
var onResourceLoaded = null;
var gResourceCount = 0;
onResourceLoaded = function() {
gResourceCount++;
if (gResourceCount >= langCount) {
if (callback) // execute the [optional] callback
callback();
fireL10nReadyEvent(lang);
gReadyState = 'complete';
}
};
// load all resource files
function l10nResourceLink(link) {
var href = link.href;
var type = link.type;
this.load = function(lang, callback) {
var applied = lang;
parseResource(href, lang, callback, function() {
consoleWarn(href + ' not found.');
applied = '';
});
return applied; // return lang if found, an empty string if not found
};
}
for (var i = 0; i < langCount; i++) {
var resource = new l10nResourceLink(langLinks[i]);
var rv = resource.load(lang, onResourceLoaded);
if (rv != lang) { // lang not found, used default resource instead
consoleWarn('"' + lang + '" resource not found');
gLanguage = '';
}
}
}
// clear all l10n data
function clear() {
gL10nData = {};
gTextData = '';
gLanguage = '';
// TODO: clear all non predefined macros.
// There's no such macro /yet/ but we're planning to have some...
}
/**
* Get rules for plural forms (shared with JetPack), see:
* http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
* https://github.com/mozilla/addon-sdk/blob/master/python-lib/plural-rules-generator.p
*
* @param {string} lang
* locale (language) used.
*
* @return {Function}
* returns a function that gives the plural form name for a given integer:
* var fun = getPluralRules('en');
* fun(1) -> 'one'
* fun(0) -> 'other'
* fun(1000) -> 'other'.
*/
function getPluralRules(lang) {
var locales2rules = {
'af': 3,
'ak': 4,
'am': 4,
'ar': 1,
'asa': 3,
'az': 0,
'be': 11,
'bem': 3,
'bez': 3,
'bg': 3,
'bh': 4,
'bm': 0,
'bn': 3,
'bo': 0,
'br': 20,
'brx': 3,
'bs': 11,
'ca': 3,
'cgg': 3,
'chr': 3,
'cs': 12,
'cy': 17,
'da': 3,
'de': 3,
'dv': 3,
'dz': 0,
'ee': 3,
'el': 3,
'en': 3,
'eo': 3,
'es': 3,
'et': 3,
'eu': 3,
'fa': 0,
'ff': 5,
'fi': 3,
'fil': 4,
'fo': 3,
'fr': 5,
'fur': 3,
'fy': 3,
'ga': 8,
'gd': 24,
'gl': 3,
'gsw': 3,
'gu': 3,
'guw': 4,
'gv': 23,
'ha': 3,
'haw': 3,
'he': 2,
'hi': 4,
'hr': 11,
'hu': 0,
'id': 0,
'ig': 0,
'ii': 0,
'is': 3,
'it': 3,
'iu': 7,
'ja': 0,
'jmc': 3,
'jv': 0,
'ka': 0,
'kab': 5,
'kaj': 3,
'kcg': 3,
'kde': 0,
'kea': 0,
'kk': 3,
'kl': 3,
'km': 0,
'kn': 0,
'ko': 0,
'ksb': 3,
'ksh': 21,
'ku': 3,
'kw': 7,
'lag': 18,
'lb': 3,
'lg': 3,
'ln': 4,
'lo': 0,
'lt': 10,
'lv': 6,
'mas': 3,
'mg': 4,
'mk': 16,
'ml': 3,
'mn': 3,
'mo': 9,
'mr': 3,
'ms': 0,
'mt': 15,
'my': 0,
'nah': 3,
'naq': 7,
'nb': 3,
'nd': 3,
'ne': 3,
'nl': 3,
'nn': 3,
'no': 3,
'nr': 3,
'nso': 4,
'ny': 3,
'nyn': 3,
'om': 3,
'or': 3,
'pa': 3,
'pap': 3,
'pl': 13,
'ps': 3,
'pt': 3,
'rm': 3,
'ro': 9,
'rof': 3,
'ru': 11,
'rwk': 3,
'sah': 0,
'saq': 3,
'se': 7,
'seh': 3,
'ses': 0,
'sg': 0,
'sh': 11,
'shi': 19,
'sk': 12,
'sl': 14,
'sma': 7,
'smi': 7,
'smj': 7,
'smn': 7,
'sms': 7,
'sn': 3,
'so': 3,
'sq': 3,
'sr': 11,
'ss': 3,
'ssy': 3,
'st': 3,
'sv': 3,
'sw': 3,
'syr': 3,
'ta': 3,
'te': 3,
'teo': 3,
'th': 0,
'ti': 4,
'tig': 3,
'tk': 3,
'tl': 4,
'tn': 3,
'to': 0,
'tr': 0,
'ts': 3,
'tzm': 22,
'uk': 11,
'ur': 3,
've': 3,
'vi': 0,
'vun': 3,
'wa': 4,
'wae': 3,
'wo': 0,
'xh': 3,
'xog': 3,
'yo': 0,
'zh': 0,
'zu': 3
};
// utility functions for plural rules methods
function isIn(n, list) {
return list.indexOf(n) !== -1;
}
function isBetween(n, start, end) {
return start <= n && n <= end;
}
// list of all plural rules methods:
// map an integer to the plural form name to use
var pluralRules = {
'0': function(n) {
return 'other';
},
'1': function(n) {
if ((isBetween((n % 100), 3, 10)))
return 'few';
if (n === 0)
return 'zero';
if ((isBetween((n % 100), 11, 99)))
return 'many';
if (n == 2)
return 'two';
if (n == 1)
return 'one';
return 'other';
},
'2': function(n) {
if (n !== 0 && (n % 10) === 0)
return 'many';
if (n == 2)
return 'two';
if (n == 1)
return 'one';
return 'other';
},
'3': function(n) {
if (n == 1)
return 'one';
return 'other';
},
'4': function(n) {
if ((isBetween(n, 0, 1)))
return 'one';
return 'other';
},
'5': function(n) {
if ((isBetween(n, 0, 2)) && n != 2)
return 'one';
return 'other';
},
'6': function(n) {
if (n === 0)
return 'zero';
if ((n % 10) == 1 && (n % 100) != 11)
return 'one';
return 'other';
},
'7': function(n) {
if (n == 2)
return 'two';
if (n == 1)
return 'one';
return 'other';
},
'8': function(n) {
if ((isBetween(n, 3, 6)))
return 'few';
if ((isBetween(n, 7, 10)))
return 'many';
if (n == 2)
return 'two';
if (n == 1)
return 'one';
return 'other';
},
'9': function(n) {
if (n === 0 || n != 1 && (isBetween((n % 100), 1, 19)))
return 'few';
if (n == 1)
return 'one';
return 'other';
},
'10': function(n) {
if ((isBetween((n % 10), 2, 9)) && !(isBetween((n % 100), 11, 19)))
return 'few';
if ((n % 10) == 1 && !(isBetween((n % 100), 11, 19)))
return 'one';
return 'other';
},
'11': function(n) {
if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))
return 'few';
if ((n % 10) === 0 ||
(isBetween((n % 10), 5, 9)) ||
(isBetween((n % 100), 11, 14)))
return 'many';
if ((n % 10) == 1 && (n % 100) != 11)
return 'one';
return 'other';
},
'12': function(n) {
if ((isBetween(n, 2, 4)))
return 'few';
if (n == 1)
return 'one';
return 'other';
},
'13': function(n) {
if ((isBetween((n % 10), 2, 4)) && !(isBetween((n % 100), 12, 14)))
return 'few';
if (n != 1 && (isBetween((n % 10), 0, 1)) ||
(isBetween((n % 10), 5, 9)) ||
(isBetween((n % 100), 12, 14)))
return 'many';
if (n == 1)
return 'one';
return 'other';
},
'14': function(n) {
if ((isBetween((n % 100), 3, 4)))
return 'few';
if ((n % 100) == 2)
return 'two';
if ((n % 100) == 1)
return 'one';
return 'other';
},
'15': function(n) {
if (n === 0 || (isBetween((n % 100), 2, 10)))
return 'few';
if ((isBetween((n % 100), 11, 19)))
return 'many';
if (n == 1)
return 'one';
return 'other';
},
'16': function(n) {
if ((n % 10) == 1 && n != 11)
return 'one';
return 'other';
},
'17': function(n) {
if (n == 3)
return 'few';
if (n === 0)
return 'zero';
if (n == 6)
return 'many';
if (n == 2)
return 'two';
if (n == 1)
return 'one';
return 'other';
},
'18': function(n) {
if (n === 0)
return 'zero';
if ((isBetween(n, 0, 2)) && n !== 0 && n != 2)
return 'one';
return 'other';
},
'19': function(n) {
if ((isBetween(n, 2, 10)))
return 'few';
if ((isBetween(n, 0, 1)))
return 'one';
return 'other';
},
'20': function(n) {
if ((isBetween((n % 10), 3, 4) || ((n % 10) == 9)) && !(
isBetween((n % 100), 10, 19) ||
isBetween((n % 100), 70, 79) ||
isBetween((n % 100), 90, 99)
))
return 'few';
if ((n % 1000000) === 0 && n !== 0)
return 'many';
if ((n % 10) == 2 && !isIn((n % 100), [12, 72, 92]))
return 'two';
if ((n % 10) == 1 && !isIn((n % 100), [11, 71, 91]))
return 'one';
return 'other';
},
'21': function(n) {
if (n === 0)
return 'zero';
if (n == 1)
return 'one';
return 'other';
},
'22': function(n) {
if ((isBetween(n, 0, 1)) || (isBetween(n, 11, 99)))
return 'one';
return 'other';
},
'23': function(n) {
if ((isBetween((n % 10), 1, 2)) || (n % 20) === 0)
return 'one';
return 'other';
},
'24': function(n) {
if ((isBetween(n, 3, 10) || isBetween(n, 13, 19)))
return 'few';
if (isIn(n, [2, 12]))
return 'two';
if (isIn(n, [1, 11]))
return 'one';
return 'other';
}
};
// return a function that gives the plural form name for a given integer
var index = locales2rules[lang.replace(/-.*$/, '')];
if (!(index in pluralRules)) {
consoleWarn('plural form unknown for [' + lang + ']');
return function() { return 'other'; };
}
return pluralRules[index];
}
// pre-defined 'plural' macro
gMacros.plural = function(str, param, key, prop) {
var n = parseFloat(param);
if (isNaN(n))
return str;
// TODO: support other properties (l20n still doesn't...)
if (prop != gTextProp)
return str;
// initialize _pluralRules
if (!gMacros._pluralRules)
gMacros._pluralRules = getPluralRules(gLanguage);
var index = '[' + gMacros._pluralRules(n) + ']';
// try to find a [zero|one|two] key if it's defined
if (n === 0 && (key + '[zero]') in gL10nData) {
str = gL10nData[key + '[zero]'][prop];
} else if (n == 1 && (key + '[one]') in gL10nData) {
str = gL10nData[key + '[one]'][prop];
} else if (n == 2 && (key + '[two]') in gL10nData) {
str = gL10nData[key + '[two]'][prop];
} else if ((key + index) in gL10nData) {
str = gL10nData[key + index][prop];
}
return str;
};
/**
* l10n dictionary functions
*/
// fetch an l10n object, warn if not found, apply `args' if possible
function getL10nData(key, args, fallback) {
var data = gL10nData[key];
if (!data) {
consoleWarn('#' + key + ' missing for [' + gLanguage + ']');
if (!fallback) {
return null;
}
data = fallback;
}
/** This is where l10n expressions should be processed.
* The plan is to support C-style expressions from the l20n project;
* until then, only two kinds of simple expressions are supported:
* {[ index ]} and {{ arguments }}.
*/
var rv = {};
for (var prop in data) {
var str = data[prop];
str = substIndexes(str, args, key, prop);
str = substArguments(str, args);
rv[prop] = str;
}
return rv;
}
// replace {[macros]} with their values
function substIndexes(str, args, key, prop) {
var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/;
var reMatch = reIndex.exec(str);
if (!reMatch || !reMatch.length)
return str;
// an index/macro has been found
// Note: at the moment, only one parameter is supported
var macroName = reMatch[1];
var paramName = reMatch[2];
var param;
if (args && paramName in args) {
param = args[paramName];
} else if (paramName in gL10nData) {
param = gL10nData[paramName];
}
// there's no macro parser yet: it has to be defined in gMacros
if (macroName in gMacros) {
var macro = gMacros[macroName];
str = macro(str, param, key, prop);
}
return str;
}
// replace {{arguments}} with their values
function substArguments(str, args) {
var reArgs = /\{\{\s*([a-zA-Z\.]+)\s*\}\}/;
var match = reArgs.exec(str);
while (match) {
if (!match || match.length < 2)
return str; // argument key not found
var arg = match[1];
var sub = '';
if (arg in args) {
sub = args[arg];
} else if (arg in gL10nData) {
sub = gL10nData[arg][gTextProp];
} else {
consoleWarn('could not find argument {{' + arg + '}}');
return str;
}
str = str.substring(0, match.index) + sub +
str.substr(match.index + match[0].length);
match = reArgs.exec(str);
}
return str;
}
// translate an HTML element
function translateElement(element) {
var l10n = getL10nAttributes(element);
if (!l10n.id)
return;
// get the related l10n object
var data = getL10nData(l10n.id, l10n.args);
if (!data) {
consoleWarn('#' + l10n.id + ' missing for [' + gLanguage + ']');
return;
}
// translate element (TODO: security checks?)
// for the node content, replace the content of the first child textNode
// and clear other child textNodes
if (data[gTextProp]) { // XXX
if (element.children.length === 0) {
element[gTextProp] = data[gTextProp];
} else {
var children = element.childNodes,
found = false;
for (var i = 0, l = children.length; i < l; i++) {
if (children[i].nodeType === 3 &&
/\S/.test(children[i].textContent)) { // XXX
// using nodeValue seems cross-browser
if (found) {
children[i].nodeValue = '';
} else {
children[i].nodeValue = data[gTextProp];
found = true;
}
}
}
if (!found) {
consoleWarn('unexpected error, could not translate element content');
}
}
delete data[gTextProp];
}
for (var k in data) {
element[k] = data[k];
}
}
// translate an HTML subtree
function translateFragment(element) {
element = element || document.documentElement;
// check all translatable children (= w/ a `data-l10n-id' attribute)
var children = getTranslatableChildren(element);
var elementCount = children.length;
for (var i = 0; i < elementCount; i++) {
translateElement(children[i]);
}
// translate element itself if necessary
translateElement(element);
}
// cross-browser API (sorry, oldIE doesn't support getters & setters)
return {
// get a localized string
get: function(key, args, fallback) {
var data = getL10nData(key, args, {textContent: fallback});
if (data) { // XXX double-check this
return 'textContent' in data ? data.textContent : '';
}
return '{{' + key + '}}';
},
// debug
getData: function() { return gL10nData; },
getText: function() { return gTextData; },
// get|set the document language
getLanguage: function() { return gLanguage; },
setLanguage: function(lang) { loadLocale(lang, translateFragment); },
// get the direction (ltr|rtl) of the current language
getDirection: function() {
// http://www.w3.org/International/questions/qa-scripts
// Arabic, Hebrew, Farsi, Pashto, Urdu
var rtlList = ['ar', 'he', 'fa', 'ps', 'ur'];
return (rtlList.indexOf(gLanguage) >= 0) ? 'rtl' : 'ltr';
},
// translate an element or document fragment
translate: translateFragment,
// this can be used to prevent race conditions
getReadyState: function() { return gReadyState; }
};
}) (window, document);

View file

@ -0,0 +1,111 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=الصفحة السابقة
previous_label=السابق
next.title=الصفحة التاليه
next_label=التالي
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=الصفحة:
page_of=من {{pageCount}}
zoom_out.title=تصغير
zoom_out_label=تصغير
zoom_in.title=تكبير
zoom_in_label=تكبير
zoom.title=التكبير
print.title=طباعة
print_label=طباعة
fullscreen.title=ملء الشاشة
fullscreen_label=ملء الشاشة
open_file.title=فتح الملف
open_file_label=فتح
download.title=تحميل
download_label=تحميل
bookmark.title=المشهد الحالي (نسخ أو فتح في نافذة جديدة)
bookmark_label=المشهد الحالي
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=تبديل الزلاق
toggle_slider_label=تبديل الزلاق
outline.title=إظهار ملخص المستند
outline_label=ملخص المستند
thumbs.title=إظهار الصور المصغرة
thumbs_label=الصور المصغرة
findbar.title=البحث في المستند
findbar_label=بحث
# Document outline messages
no_outline=لا يوجد ملخص
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=الصفحة {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=صورة مصغرة من الصفحة {{page}}
# Context menu
page_rotate_cw.label=تدوير مع عقارب الساعة
page_rotate_ccw.label=تدوير عكس عقارب الساعة
# Find panel button title and messages
find=بحث
find_terms_not_found=(لا يوجد)
# Error panel labels
error_more_info=مزيد من المعلومات
error_less_info=معلومات أقل
error_close=إغلاق
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=بناء PDF.JS: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=رسالة: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=المكدس: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=الملف: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=السطر: {{line}}
rendering_error=حدث خطأ اثناء رسم الصفحة.
# Predefined zoom values
page_scale_width=عرض الصفحة
page_scale_fit=تناسب الصفحة
page_scale_auto=تقريب تلقائي
page_scale_actual=الحجم الحقيقي
# Loading indicator messages
loading_error_indicator=خطأ
loading_error=حدث خطأ أثناء تحميل وثيقه الـPDF
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[ملاحظة {{type}}]
request_password=الـPDF محمي بكلمة مرور:
printing_not_supported=تحذير: الطباعة ليست مدعومة كليًا في هذا المتصفح.

View file

@ -0,0 +1,127 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Pàgina anterior
previous_label=Anterior
next.title=Pàgina següent
next_label=Següent
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Pàgina:
page_of=de {{pageCount}}
zoom_out.title=Reduir
zoom_out_label=Reduir
zoom_in.title=Ampliar
zoom_in_label=Ampliar
zoom.title=Ampliació
print.title=Imprimir
print_label=Imprimir
fullscreen.title=Pantalla completa
fullscreen_label=Pantalla completa
presentation_mode.title=Canviar a mode de Presentació
presentation_mode_label=Mode de Presentació
open_file.title=Obrir arxiu
open_file_label=Obrir
download.title=Descarregar
download_label=Descarregar
bookmark.title=Vista actual (copiï o obri en una finestra nova)
bookmark_label=Vista actual
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Alternar lliscador
toggle_slider_label=Alternar lliscador
outline.title=Mostrar esquema del document
outline_label=Esquema del document
thumbs.title=Mostrar miniatures
thumbs_label=Miniatures
findbar.title=Cercar en el document
findbar_label=Cercar
# Document outline messages
no_outline=No hi ha cap esquema disponible
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pàgina {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Miniatura de la pàgina {{page}}
# Find panel button title and messages
find=Cercar
find_terms_not_found=(No trobat)
# Context menu
first_page.label=Primera pàgina
last_page.label=Darrera pàgina
page_rotate_cw.label=Rotar sentit horari
page_rotate_ccw.label=Rotar sentit anti-horari
# Find panel button title and messages
find_label=Cerca:
find_previous.title=Trobar ocurrència anterior
find_previous_label=Previ
find_next.title=Trobar ocurrència posterior
find_next_label=Següent
find_highlight=Contrastar tot
find_match_case_label=Majúscules i minúscules
find_wrapped_to_bottom=Part superior assolida, continu a la part inferior
find_wrapped_to_top=Final de pàgina finalitzada, continu a la part superior
find_not_found=Frase no trobada
# Error panel labels
error_more_info=Més informació
error_less_info=Menys informació
error_close=Tancar
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=Compilació de PDF.JS: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Missatge: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Pila: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Arxiu: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Línia: {{line}}
rendering_error=Ha ocurregut un error mentre es renderitzava la pàgina.
# Predefined zoom values
page_scale_width=Ample de pàgina
page_scale_fit=Ajustar a la pàgina
page_scale_auto=Ampliació automàtica
page_scale_actual=Tamany real
# Loading indicator messages
loading_error_indicator=Error
loading_error=Ha ocorregut un error mentres es carregava el PDF.
invalid_file_error=Invàlid o fitxer PDF corrupte.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Anotació {{type}}]
request_password=El PDF està protegit amb una contrasenya:
printing_not_supported=Avís: La impressió no és compatible totalment en aquest navegador.

View file

@ -0,0 +1,59 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Aktuální zobrazení(zkopírovat nebo otevřít v novém okně)
previous.title=Předchozí stránka
next.title=Další stránka
print.title=Tisk
download.title=Stáhnout
zoom_out.title=Zmenšit
zoom_in.title=Zvětšit
error_more_info=Více informací
error_less_info=Méně informací
error_close=Zavřít
error_build=PDF.JS Build: {{build}}
error_message=Zpráva:{{message}}
error_stack=Stack:{{stack}}
error_file=Soubor:{{file}}
error_line=Řádek:{{line}}
page_scale_width=Šířka stránky
page_scale_fit=Stránka
page_scale_auto=Automatické přibližení
page_scale_actual=Skutečná velikost
toggle_slider.title=Přepnout posuvník
thumbs.title=Zobrazit náhledy
outline.title=Zobrazit osnovu dokumentu
loading=Načítám... {{percent}}%
loading_error_indicator=Chyba
loading_error=Došlo k chybě při načítání PDF.
rendering_error=Došlo k chybě při vykreslování stránky.
page_label=Stránka:
page_of=z{{pageCount}}
no_outline=Žádné osnovy k dispozici
open_file.title=Otevřít soubor
text_annotation_type=[{{type}}Anotace]
toggle_slider_label=Přepnout posuvník
thumbs_label=Náhledy
outline_label=Přehled dokumentu
bookmark_label=Aktuální zobrazení
previous_label=Předchozí
next_label=Další
print_label=Tisk
download_label=Stáhnout
zoom_out_label=Zmenšit
zoom_in_label=Přiblížit
zoom.title=Zvětšit
thumb_page_title=Stránka{{page}}
thumb_page_canvas=Náhled stránky {{page}}
request_password=PDF je chráněn heslem:

View file

@ -0,0 +1,107 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Værktøjslinje knapper (tooltups og billedtekster)
previous.title=Forrige
previous_label=Forrige
next.title=Næste
next_label=Næste
# Oversættelsesnote:
# Disse tekststrenge bliver sammensat i formen "Side: X af Y"
# Oversæt ikke "{{pageCount}}", det er en variabel og vil blive erstattet
# med det egentlig antal sider i PDF filen
page_label=Side:
page_of=af {{pageCount}}
zoom_out.title=Zoom ud
zoom_out_label=Zoom ud
zoom_in.title=Zoom ind
zoom_in_label=Zoom ind
zoom.title=Zoom
print_label=Udskriv
print.title=Udskriv
fullscreen.title=Fuldskærm
fullscreen_label=Fuldskærm
open_file.title=Åbn fil
open_file_label=Åbn
download.title=Hent
download_label=Hent
bookmark.title=Aktuel visning (kopier eller åbn i et nyt vindue)
bookmark_label=Aktuel visning
# Tooltips of alternativ billedtekst til sidepanelet
# (_label strengene er den alternative billedtekst, mens .title
# strengene er tooltips
toggle_slider.title=Skift slider
toggle_slider_label=Skift slider
outline.title=Vis dokumentoversigt
outline_label=Dokumentoversigt
thumbs.title=Vis thumbnails
thumbs_label=Thumbnails
findbar.title=Søg i dokumentet
findbar_label=Søg
# Dokumentoversigtsbeskeder
no_outline=Ingen dokumentoversigt tilgængelig
# Thumbnails panelet (tooltips og alt. billedtekst)
# Oversættelsesnote: "{{page}}" vil blive erstattet af det
# egentlige sidetal
thumb_page_title=Side {{page}}
# Oversættelsesnote: "{{page}}" vil blive erstattet af det
# egentlige sidetal
thumb_page_canvas=Thumbnail af side {{page}}
# Søgepanelet
find=Søg
find_terms_not_found=(Ikke fundet)
# Fejlpanel
error_more_info=Mere information
error_less_info=Mindre information
error_close=Luk
# Oversættelsesnote: "{{build}}" vil blive erstattet af PDF.JS build nummer
#
error_build=PDF.JS Build: {{build}}
# Oversættelsesnote: "{{message}}" vil blive erstattet af en (engelsk) fejlbesked
#
error_message=Besked: {{message}}
# Oversættelsesnote: "{{stack}}" vil blive erstattet af et stack trace
#
error_stack=Stak: {{stack}}
# Oversættelsesnote: "{{file}}" vil blive erstattet af et filnavn
error_file=Fil: {{file}}
# Oversættelsesnote: "{{line}}" vil blive erstattet af et linjetal
error_line=Linje: {{line}}
rendering_error=Der skete en fejl under gengivelsen af PDF-filen
# Prædefinerede zoom værdier
page_scale_width=Sidebredde
page_scale_fit=Helside
page_scale_auto=Automatisk zoom
page_scale_actual=Faktisk størrelse
# Indlæsningsindikator (load ikon)
loading_error_indicator=Fejl
loading_error=Der skete en fejl under indlæsningen af PDF-filen
# Oversættelsesnote: Dette vil blive brugt som et tooltip
# "{{type}}" vil blive ersattet af en kommentar type fra en liste
# defineret i PDF specifikationen (32000-1:2008 Table 169 Annotation types).
# Nogle almindelige typer er f.eks.: "Check", "Text", "Comment" og "Note"
text_annotation_type=[{{type}} Kommentar]
request_password=PDF filen er beskyttet med et kodeord:
printing_not_supported=Advarsel: Denne browser er ikke fuldt understøttet ved udskrift

View file

@ -0,0 +1,123 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Eine Seite zurück
previous_label=Zurück
next.title=Eine Seite vor
next_label=Vor
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Seite:
page_of=von {{pageCount}}
zoom_out.title=Verkleinern
zoom_out_label=Verkleinern
zoom_in.title=Vergrößern
zoom_in_label=Vergrößern
zoom.title=Zoom
print.title=Drucken
print_label=Drucken
presentation_mode.title=Zum Präsentationsmodus wechseln
presentation_mode_label=Bildschirmpräsentation
open_file.title=Datei öffnen
open_file_label=Öffnen
download.title=Herunterladen
download_label=Herunterladen
bookmark.title=Aktuelle Ansicht (Kopieren oder in einem neuen Fenster öffnen)
bookmark_label=Aktuelle Ansicht
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Seitenleiste anzeigen
toggle_slider_label=Seitenleiste
outline.title=Zeige Inhaltsverzeichnis
outline_label=Inhaltsverzeichnis
thumbs.title=Zeige Vorschaubilder
thumbs_label=Vorschaubilder
findbar.title=Im Dokument suchen
findbar_label=Suchen
# Document outline messages
no_outline=Kein Inhaltsverzeichnis verfügbar
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Seite {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Vorschau von Seite {{page}}
# Context menu
first_page.label=Erste Seite
last_page.label=Letzte Seite
page_rotate_cw.label=Im Uhrzeigersinn drehen
page_rotate_ccw.label=Entgegen dem Uhrzeigersinn drehen
# Find panel button title and messages
find_label=Suchen:
find_previous.title=Das vorherige Auftreten des Ausdrucks suchen
find_previous_label=Aufwärts
find_next.title=Das nächste Auftreten des Ausdrucks suchen
find_next_label=Abwärts
find_highlight=Hervorheben
find_match_case_label=Groß-/Kleinschreibung
find_reached_top=Der Anfang des Dokuments wurde erreicht, Suche am Ende des Dokuments fortgesetzt
find_reached_bottom=Das Ende des Dokuments wurde erreicht, Suche am Anfang des Dokuments fortgesetzt
find_not_found=Ausdruck nicht gefunden
# Error panel labels
error_more_info=Mehr Info
error_less_info=Weniger Info
error_close=Schließen
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=PDF.JS Build: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Nachricht: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stack: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Datei: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Zeile: {{line}}
rendering_error=Das PDF konnte nicht angezeigt werden.
# Predefined zoom values
page_scale_width=Seitenbreite
page_scale_fit=Ganze Seite
page_scale_auto=Automatisch
page_scale_actual=Originalgröße
# Loading indicator messages
loading_error_indicator=Fehler
loading_error=Das PDF konnte nicht geladen werden.
invalid_file_error=Ungültige oder beschädigte PDF-Datei.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Annotation]
request_password=Das PDF ist passwortgeschützt:
printing_not_supported=Warnung: Drucken wird durch diesen Browser nicht vollständig unterstützt.
web_fonts_disabled=Webfonts sind deaktiviert: Eingebundene PDF-Schriftarten können nicht verwendet werden.

View file

@ -0,0 +1,123 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Previous Page
previous_label=Previous
next.title=Next Page
next_label=Next
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Page:
page_of=of {{pageCount}}
zoom_out.title=Zoom Out
zoom_out_label=Zoom Out
zoom_in.title=Zoom In
zoom_in_label=Zoom In
zoom.title=Zoom
print.title=Print
print_label=Print
presentation_mode.title=Switch to Presentation Mode
presentation_mode_label=Presentation Mode
open_file.title=Open File
open_file_label=Open
download.title=Download
download_label=Download
bookmark.title=Current view (copy or open in new window)
bookmark_label=Current View
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Toggle Slider
toggle_slider_label=Toggle Slider
outline.title=Show Document Outline
outline_label=Document Outline
thumbs.title=Show Thumbnails
thumbs_label=Thumbnails
findbar.title=Find in Document
findbar_label=Find
# Document outline messages
no_outline=No Outline Available
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Page {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Thumbnail of Page {{page}}
# Context menu
first_page.label=Go to First Page
last_page.label=Go to Last Page
page_rotate_cw.label=Rotate Clockwise
page_rotate_ccw.label=Rotate Counterclockwise
# Find panel button title and messages
find_label=Find:
find_previous.title=Find the previous occurrence of the phrase
find_previous_label=Previous
find_next.title=Find the next occurrence of the phrase
find_next_label=Next
find_highlight=Highlight all
find_match_case_label=Match case
find_reached_top=Reached top of document, continued from bottom
find_reached_bottom=Reached end of document, continued from top
find_not_found=Phrase not found
# Error panel labels
error_more_info=More Information
error_less_info=Less Information
error_close=Close
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
error_version_info=PDF.js v{{version}} (build: {{build}})
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Message: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stack: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=File: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Line: {{line}}
rendering_error=An error occurred while rendering the page.
# Predefined zoom values
page_scale_width=Page Width
page_scale_fit=Page Fit
page_scale_auto=Automatic Zoom
page_scale_actual=Actual Size
# Loading indicator messages
loading_error_indicator=Error
loading_error=An error occurred while loading the PDF.
invalid_file_error=Invalid or corrupted PDF file.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Annotation]
request_password=PDF is protected by a password:
printing_not_supported=Warning: Printing is not fully supported by this browser.
web_fonts_disabled=Web fonts are disabled: unable to use embedded PDF fonts.

View file

@ -0,0 +1,107 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Página anterior
previous_label=Anterior
next.title=Página siguiente
next_label=Siguiente
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Página:
page_of=de {{pageCount}}
zoom_out.title=Reducir
zoom_out_label=Reducir
zoom_in.title=Ampliar
zoom_in_label=Ampliar
zoom.title=Ampliación
print.title=Imprimir
print_label=Imprimir
fullscreen.title=Pantalla completa
fullscreen_label=Pantalla completa
open_file.title=Abrir archivo
open_file_label=Abrir
download.title=Descargar
download_label=Descargar
bookmark.title=Vista actual (copie o abra en una ventana nueva)
bookmark_label=Vista actual
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Alternar deslizador
toggle_slider_label=Alternar deslizador
outline.title=Mostrar esquema del documento
outline_label=Esquema del documento
thumbs.title=Mostrar miniaturas
thumbs_label=Miniaturas
findbar.title=Buscar en el documento
findbar_label=Buscar
# Document outline messages
no_outline=No hay un esquema disponible
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Página {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Miniatura de la página {{page}}
# Find panel button title and messages
find=Buscar
find_terms_not_found=(No encontrado)
# Error panel labels
error_more_info=Más información
error_less_info=Menos información
error_close=Cerrar
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=Compilación de PDF.JS: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Mensaje: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Pila: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Archivo: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Línea: {{line}}
rendering_error=Ocurrió un error mientras se renderizaba la página.
# Predefined zoom values
page_scale_width=Anchura de página
page_scale_fit=Ajustar a la página
page_scale_auto=Ampliación automática
page_scale_actual=Tamaño real
# Loading indicator messages
loading_error_indicator=Error
loading_error=Ocurrió un error mientras se cargaba el PDF.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[Anotación {{type}}]
request_password=El PDF está protegido con una contraseña:
printing_not_supported=Aviso: La impresión no es compatible totalmente con este navegador.

View file

@ -0,0 +1,108 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Edellinen sivu
previous_label=Edellinen
next.title=Seuraava sivu
next_label=Seuraava
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Sivu:
page_of=/ {{pageCount}}
zoom_out.title=Suurenna
zoom_out_label=Suurenna
zoom_in.title=Pienennä
zoom_in_label=Pienennä
zoom.title=Sivun suurennus
print.title=Tulosta
print_label=Tulosta
fullscreen.title=Kokoruututila
fullscreen_label=Kokoruututila
open_file.title=Avaa tiedosto
open_file_label=Avaa
download.title=Lataa
download_label=Lataa
bookmark.title=Nykyinen näkymä (kopioi tai avaa uuteen ikkunaan)
bookmark_label=Nykyinen näkymä
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Vaihda vieritysnäkymä
toggle_slider_label=Vaihda vieritysnäkymä
outline.title=Näytä asiakirjan jäsennys
outline_label=Asiakirjan jäsennys
thumbs.title=Näytä esikatselukuvat
thumbs_label=Esikatselukuvat
findbar.title=Etsi asiakirjasta
findbar_label=Etsi
# Document outline messages
no_outline=Jäsennystä ei ole tarjolla
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Sivu {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Sivun {{page}} esikatselukuva
# Find panel button title and messages
find=Etsi
find_terms_not_found=(Ei löytynyt)
# Error panel labels
error_more_info=Enemmän tietoa
error_less_info=Vähemmän tietoa
error_close=Sulje
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=PDF.JS rakennus: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Viesti: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Kutsupino: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Tiedosto: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Rivi: {{line}}
rendering_error=Virhe on tapahtunut sivua mallintaessa.
# Predefined zoom values
page_scale_width=Sivun leveys
page_scale_fit=Sivun sovitus
page_scale_auto=Automaatinen sivun suurennus
page_scale_actual=Todellinen koko
# Loading indicator messages
loading_error_indicator=Virhe
loading_error=Virhe on tapahtunut PDF:ää ladattaessa.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Selite]
request_password=PDF on salasanasuojattu:
printing_not_supported=Varoitus: Tämä selain ei täysin tue tulostusta.

View file

@ -0,0 +1,71 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
previous.title=Page précédente
previous_label=Précédent
next.title=Page suivante
next_label=Suivant
page_label=Page :
page_of=sur {{pageCount}}
zoom_out.title=Zoom arrière
zoom_out_label=Zoom arrière
zoom_in.title=Zoom avant
zoom_in_label=Zoom avant
zoom.title=Zoom
print.title=Imprimer
print_label=Imprimer
presentation_mode.title=Basculer en mode présentation
presentation_mode_label=Mode présentation
open_file.title=Ouvrir le fichier
open_file_label=Ouvrir
download.title=Télécharger
download_label=Télécharger
bookmark.title=Affichage courant (copier ou ouvrir dans une nouvelle fenêtre)
bookmark_label=Affichage actuel
toggle_slider.title=Afficher/masquer le panneau latéral
toggle_slider_label=Afficher/masquer le panneau latéral
outline.title=Afficher les signets
outline_label=Signets du document
thumbs.title=Afficher les vignettes
thumbs_label=Vignettes
findbar.title=Rechercher dans le document
findbar_label=Rechercher
no_outline=Aucun signet disponible
thumb_page_title=Page {{page}}
thumb_page_canvas=Vignette de la page {{page}}
first_page.label=Aller à la première page
last_page.label=Aller à la dernière page
page_rotate_cw.label=Rotation horaire
page_rotate_ccw.label=Rotation anti-horaire
# Find panel button title and messages
find_label=Rechercher :
find_previous.title=Trouver l'occurrence précédente de la phrase
find_previous_label=Précédent
find_next.title=Trouver la prochaine occurrence de la phrase
find_next_label=Suivant
find_highlight=Tout surligner
find_match_case_label=Respecter la casse
find_wrapped_to_bottom=Bas de la page atteint, poursuite depuis la fin
find_wrapped_to_top=Bas de la page atteint, poursuite au début
find_not_found=Phrase introuvable
error_more_info=Plus d'informations
error_less_info=Moins d'informations
error_close=Fermer
error_build=Version de PDF.JS : {{build}}
error_message=Message : {{message}}
error_stack=Pile : {{stack}}
error_file=Fichier : {{file}}
error_line=Ligne : {{line}}
rendering_error=Une erreur s'est produite lors de l'affichage de la page.
page_scale_width=Pleine largeur
page_scale_fit=Page entière
page_scale_auto=Zoom automatique
page_scale_actual=Taille réelle
loading_error_indicator=Erreur
loading_error=Une erreur s'est produite lors du chargement du fichier PDF.
text_annotation_type=[Annotation {{type}}]
request_password=Le PDF est protégé par un mot de passe :
printing_not_supported=Attention : l'impression n'est pas totalement prise en charge par ce navigateur.

View file

@ -0,0 +1,60 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=דף נוכחי (העתקה או פתיחה בחלון חדש)
previous.title=דף קודם
next.title=דף הבא
print.title=הדפסה
download.title=הורדה
zoom_out.title=התרחקות
zoom_in.title=התקרבות
error_more_info=יותר מידע
error_less_info=פחות מידע
error_close=סגירה
error_build=בניית PDF.JS: {{build}}
error_message=הודעה: {{message}}
error_stack=מחסנית: {{stack}}
error_file=קובץ: {{file}}
error_line=שורה: {{line}}
page_scale_width=רוחב דף
page_scale_fit=גודל דף
page_scale_auto=התקרבות אוטומטית
page_scale_actual=גודל אמיתי
toggle_slider.title=מתג החלקה
thumbs.title=הצגת תמונות ממוזערות
outline.title=הצגת מתאר מסמך
loading=בטעינה... {{percent}}%
loading_error_indicator=שגיאה
loading_error=אירעה שגיאה בעת טעינת קובץ PDF.
rendering_error=אירעה שגיאה בעת עיבוד הדף.
page_label=דף:
page_of=מתוך {{pageCount}}
no_outline=אין מתאר זמין
open_file.title=פתיחת קובץ
text_annotation_type=[{{type}} Annotation]
toggle_slider_label=מתג החלקה
thumbs_label=תמונות ממוזערות
outline_label=מתאר מסמך
bookmark_label=תצוגה נוכחית
previous_label=קודם
next_label=הבא
print_label=הדפסה
download_label=הורדה
zoom_out_label=התרחקות
zoom_in_label=התקרבות
zoom.title=מרחק מתצוגה
thumb_page_title=דף {{page}}
thumb_page_canvas=תמונה ממוזערת של דף {{page}}
request_password=קובץ PDF מוגן בססמה:
open_file_label=פתיחה

View file

@ -0,0 +1,45 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Visualizzazione corrente (copia o apri in una nuova finestra)
previous.title=Precedente
next.title=Successiva
print.title=Stampa
download.title=Download
zoom_out.title=Riduci Zoom
zoom_in.title=Aumenta Zoom
error_more_info=Più Informazioni
error_less_info=Meno Informazioni
error_close=Chiudi
error_build=PDF.JS Build: {{build}}
error_message=Messaggio: {{message}}
error_stack=Stack: {{stack}}
error_file=File: {{file}}
error_line=Linea: {{line}}
page_scale_width=Adatta alla Larghezza
page_scale_fit=Adatta alla Pagina
page_scale_auto=Zoom Automatico
page_scale_actual=Dimensione Attuale
toggle_slider.title=Visualizza Riquadro Laterale
thumbs.title=Mostra Miniature
outline.title=Mostra Indice Documento
loading=Caricamento... {{percent}}%
loading_error_indicator=Errore
loading_error=È accaduto un errore durante il caricamento del PDF.
rendering_error=È accaduto un errore durante il rendering della pagina.
page_label=Pagina:
page_of=di {{pageCount}}
no_outline=Nessun Indice Disponibile
open_file.title=Apri File
text_annotation_type=[{{type}} Annotazione]

View file

@ -0,0 +1,123 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=前のページ
previous_label=前へ
next.title=次のページ
next_label=次へ
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=ページ:
page_of=of {{pageCount}}
zoom_out.title=縮小
zoom_out_label=縮小
zoom_in.title=拡大
zoom_in_label=拡大
zoom.title=ズーム
print.title=印刷
print_label=印刷
presentation_mode.title=プレゼンテーションモードに切り替えます
presentation_mode_label=プレゼンテーションモード
open_file.title=ファイルを開く
open_file_label=開く
download.title=ダウンロード
download_label=ダウンロード
bookmark.title=現在のビューをブックマーク
bookmark_label=現在のビューをブックマーク
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=サイドバーの切り替え
toggle_slider_label=サイドバーの切り替え
outline.title=文書の目次
outline_label=文書の目次
thumbs.title=縮小版
thumbs_label=縮小版
findbar.title=検索
findbar_label=検索
# Document outline messages
no_outline=利用可能な目次はありません
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title={{page}} ページ
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=ページの縮小版 {{page}}
# Context menu
first_page.label=最初のページへ移動
last_page.label=最後のページへ移動
page_rotate_cw.label=右回転
page_rotate_ccw.label=左回転
# Find panel button title and messages
find_label=検索:
find_previous.title=指定文字列に一致する 1 つ前の部分を検索します
find_previous_label=前へ
find_next.title=指定文字列に一致する次の部分を検索します
find_next_label=次へ
find_highlight=すべて強調表示
find_match_case_label=大文字/小文字を区別
find_reached_top=文書先頭まで検索したので末尾に戻って検索しました。
find_reached_bottom=文書末尾まで検索したので先頭に戻って検索しました。
find_not_found=見つかりませんでした。
# Error panel labels
error_more_info=詳細情報
error_less_info=詳細情報の非表示
error_close=閉じる
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
error_version_info=PDF.js v{{version}} (ビルド: {{build}})
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=メッセージ: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=スタック: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=ファイル: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=ライン: {{line}}
rendering_error=ページのレンダリング中にエラーが発生しました
# Predefined zoom values
page_scale_width=幅に合わせる
page_scale_fit=ページのサイズに合わせる
page_scale_auto=自動ズーム
page_scale_actual=実際のサイズ
# Loading indicator messages
loading_error_indicator=エラー
loading_error=PDFの読み込み中にエラーが発生しました
invalid_file_error=無効または破損したPDFファイル
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} 注釈]
request_password=PDFはパスワードによって保護されています
printing_not_supported=警告:このブラウザでは印刷が完全にサポートされていません
web_fonts_disabled=Webフォントが無効になっています: 埋め込まれたPDFのフォントを使用することができません

View file

@ -0,0 +1,63 @@
[ar]
@import url(ar/viewer.properties)
[ca]
@import url(ca/viewer.properties)
[cs]
@import url(cs/viewer.properties)
[da]
@import url(da/viewer.properties)
[de]
@import url(de/viewer.properties)
[en-US]
@import url(en-US/viewer.properties)
[es]
@import url(es/viewer.properties)
[fi]
@import url(fi/viewer.properties)
[fr]
@import url(fr/viewer.properties)
[he]
@import url(he/viewer.properties)
[it]
@import url(it/viewer.properties)
[ja]
@import url(ja/viewer.properties)
[nl]
@import url(nl/viewer.properties)
[pl]
@import url(pl/viewer.properties)
[pt-BR]
@import url(pt-BR/viewer.properties)
[ro]
@import url(ro/viewer.properties)
[ru]
@import url(ru/viewer.properties)
[sr]
@import url(sr/viewer.properties)
[sv]
@import url(sv/viewer.properties)
[zh-CN]
@import url(zh-CN/viewer.properties)
[zh-TW]
@import url(zh-TW/viewer.properties)

View file

@ -0,0 +1,121 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Vorige pagina
previous_label=Vorige
next.title=Volgende pagina
next_label=Volgende
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Pagina:
page_of=van {{pageCount}}
zoom_out.title=Uitzoomen
zoom_out_label=Uitzoomen
zoom_in.title=Inzoomen
zoom_in_label=Inzoomen
zoom.title=Zoomen
print.title=Afdrukken
print_label=Afdrukken
presentation_mode.title=Omschakelen naar presentatiemodus
presentation_mode_label=Presentatiemodus
open_file.title=Bestand openen
open_file_label=Openen
download.title=Downloaden
download_label=Downloaden
bookmark.title=Huidige weergave (kopiëren of openen in nieuw venster)
bookmark_label=Huidige weergave
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Zijbalk tonen/verbergen
toggle_slider_label=Zijbalk tonen/verbergen
outline.title=Documentstructuur tonen
outline_label=Documentstructuur
thumbs.title=Miniaturen tonen
thumbs_label=Miniaturen
findbar.title=Zoeken in document
findbar_label=Zoeken
# Document outline messages
no_outline=Geen documentstructuur beschikbaar
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Pagina {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Miniatuur van pagina {{page}}
# Context menu
first_page.label=Naar de eerste pagina gaan
last_page.label=Naar de laatste pagina gaan
page_rotate_cw.label=Met de klok mee roteren
page_rotate_ccw.label=Tegen de klok in roteren
# Find panel button title and messages
find_label=Zoeken:
find_previous.title=Het vorige voorkomen van de tekst zoeken
find_previous_label=Vorige
find_next.title=Het volgende voorkomen van de tekst zoeken
find_next_label=Volgende
find_highlight=Alles markeren
find_match_case_label=Hoofdlettergevoelig
find_wrapped_to_bottom=Onderkant van de pagina bereikt, doorgegaan vanaf de onderkant
find_wrapped_to_top=Onderkant van de pagina bereikt, doorgegaan vanaf de bovenkant
find_not_found=Tekst niet gevonden
# Error panel labels
error_more_info=Meer informatie
error_less_info=Minder informatie
error_close=Sluiten
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=PDF.JS-build: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Bericht: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stack: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Bestand: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Regel: {{line}}
rendering_error=Er is een probleem opgetreden bij het renderen van de pagina.
# Predefined zoom values
page_scale_width=Paginabreed maken
page_scale_fit=Passend maken
page_scale_auto=Automatisch zoomen
page_scale_actual=Werkelijke grootte
# Loading indicator messages
loading_error_indicator=Fout
loading_error=Er is een fout opgetreden bij het laden van de PDF.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}}-aantekening]
request_password=Dit PDF-bestand is beveiligd met een wachtwoord:
printing_not_supported=Waarschuwing: afdrukken wordt niet volledig ondersteund door deze browser.

View file

@ -0,0 +1,57 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Aktualny widok (kopiuj lub otwórz w nowym oknie)
previous.title=Poprzednia strona
next.title=Następna strona
print.title=Drukuj
download.title=Pobierz
zoom_out.title=Pomniejsz
zoom_in.title=Powiększ
error_more_info=Więcej informacji
error_less_info=Mniej informacji
error_close=Zamknij
error_build=Wersja PDF.JS: {{build}}
error_message=Wiadomość: {{message}}
error_stack=Stos: {{stack}}
error_file=Plik: {{file}}
error_line=Linia: {{line}}
page_scale_width=Szerokość strony
page_scale_fit=Cała strona
page_scale_auto=Automatyczne dopasowanie
page_scale_actual=Rzeczywisty rozmiar
toggle_slider.title=Włącz/wyłącz suwak
thumbs.title=Wyświetl miniatury
outline.title=Wyświetl konspekt dokumentu
loading=Wczytywanie... {{percent}}%
loading_error_indicator=Błąd
loading_error=Wystąpił błąd podczas wczytywania pliku PDF.
invalid_file_error=Błędny lub zepsuty plik PDF.
rendering_error=Wystąpił błąd podczas wyświetlania strony.
page_label=Strona:
page_of=z {{pageCount}}
no_outline=Konspekt nie jest dostępny
open_file.title=Otwórz plik
text_annotation_type=[Komentarz {{type}}]
toggle_slider_label=Przełącz suwak
thumbs_label=Miniatury
outline_label=Konspekt dokumentu
bookmark_label=Aktualny widok
previous_label=Wstecz
next_label=Dalej
print_label=Drukuj
download_label=Pobierz
zoom_out_label=Pomniejsz
zoom_in_label=Powiększ
zoom.title=Powiększenie

View file

@ -0,0 +1,45 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Marcar posição atual (bookmark)
previous.title=Página anterior
next.title=Próxima página
print.title=Imprimir
download.title=Baixar arquivo
zoom_out.title=Diminuir Zoom
zoom_in.title=Aumentar Zoom
error_more_info=Mais informações
error_less_info=Menos informações
error_close=Fechar
error_build=PDF.JS Versão: {{build}}
error_message=Mensagem: {{message}}
error_stack=Pilha: {{stack}}
error_file=Arquivo: {{file}}
error_line=Linha: {{line}}
page_scale_width=Largura da página
page_scale_fit=Página inteira
page_scale_auto=Zoom automático
page_scale_actual=Tamanho original
toggle_slider.title=Abrir/fechar aba lateral
thumbs.title=Mostrar miniaturas
outline.title=Mostrar índice
loading=Carregando... {{percent}}%
loading_error_indicator=Erro
loading_error=Um erro ocorreu ao carregar o arquivo.
rendering_error=Um erro ocorreu ao apresentar a página.
page_label=Página:
page_of=de {{pageCount}}
no_outline=Índice não disponível
open_file.title=Abrir arquivo
text_annotation_type=[{{type}} Anotações]

View file

@ -0,0 +1,56 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Vederea curentă (copiază sau deschide în fereastră nouă)
previous.title=Pagina precedentă
next.title=Pagina următoare
print.title=Tipărește
download.title=Descarcă
zoom_out.title=Micșorează
zoom_in.title=Mărește
error_more_info=Detaliat
error_less_info=Sumarizat
error_close=Închide
error_build=PDF.JS Build: {{build}}
error_message=Message: {{message}}
error_stack=Stack: {{stack}}
error_file=File: {{file}}
error_line=Line: {{line}}
page_scale_width=După lățime
page_scale_fit=Toată pagina
page_scale_auto=Mărime automată
page_scale_actual=Mărime originală
toggle_slider.title=Vedere de ansamblu
thumbs.title=Miniaturi
outline.title=Cuprins
loading=Încărcare... {{percent}}%
loading_error_indicator=Eroare
loading_error=S-a produs o eroare în timpul încărcării documentului.
rendering_error=S-a produs o eroare în timpul procesării paginii.
page_label=Pagina:
page_of=din {{pageCount}}
no_outline=Cuprins indisponibil
open_file.title=Deschide fișier
text_annotation_type=[Adnotare {{type}}]
toggle_slider_label=Vedere de ansamblu
thumbs_label=Miniaturi
outline_label=Cuprins
bookmark_label=Vederea curentă
previous_label=Înapoi
next_label=Înainte
print_label=Tipărește
download_label=Descarcă
zoom_out_label=Micșorează
zoom_in_label=Mărește
zoom.title=Mărime

View file

@ -0,0 +1,63 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Ссылка на текущий вид (скопировать или открыть в новом окне)
previous.title=Предыдущая страница
next.title=Следующая страница
print.title=Печать
download.title=Загрузить
zoom_out.title=Уменьшить
zoom_in.title=Увеличить
error_more_info=Детали
error_less_info=Скрыть детали
error_close=Закрыть
error_build=PDF.JS компиляция: {{build}}
error_message=Сообщение: {{message}}
error_stack=Стeк: {{stack}}
error_file=Файл: {{file}}
error_line=Строка: {{line}}
page_scale_width=По ширине страницы
page_scale_fit=Во всю страницу
page_scale_auto=Авто
page_scale_actual=Настоящий размер
toggle_slider.title=Открыть/закрыть вспомогательную панель
thumbs.title=Показать уменьшенные изображения
outline.title=Показать содержание документа
loading=Загрузка... {{percent}}%
loading_error_indicator=Ошибка
loading_error=Произошла ошибка во время загрузки PDF.
rendering_error=Произошла ошибка во время создания страницы.
page_label=Страница:
page_of=из {{pageCount}}
no_outline=Содержание не доступно
open_file.title=Открыть файл
text_annotation_type=[Аннотация {{type}}]
toggle_slider_label=Вспомогательная панель
thumbs_label=Уменьшенные изображения
outline_label=Содержание документа
bookmark_label=Текущий вид
previous_label=Предыдущая
next_label=Следующая
print_label=Печать
download_label=Загрузить
zoom_out_label=Уменьшить
zoom_in_label=Увеличить
zoom.title=Масштаб
thumb_page_title=Страница {{page}}
thumb_page_canvas=Уменьшенное изображение страницы {{page}}
request_password=PDF защищён паролем:
fullscreen.title=Полный экран
fullscreen_label=Полный экран
page_rotate_cw.label=Повернуть по часовой стрелке
page_rotate_ccw.label=Повернуть против часовой стрелки

View file

@ -0,0 +1,56 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
bookmark.title=Тренутни приказ (Умножити или отворити у новом прозору)
previous.title=Предходна страна
next.title=Следећа страна
print.title=Штампај
download.title=Преузми
zoom_out.title=Умањи
zoom_in.title=Увећај
error_more_info=Више информација
error_less_info=Мање информација
error_close=Затвори
error_build=PDF.JS Build: {{build}}
error_message=Message: {{message}}
error_stack=Stack: {{stack}}
error_file=File: {{file}}
error_line=Line: {{line}}
page_scale_width=Ширина странице
page_scale_fit=Уклопи
page_scale_auto=Увећај аутоматски
page_scale_actual=Стварна величина
toggle_slider.title=Клизач
thumbs.title=Прикажи у сличицама
outline.title=Прикажи у линијама
loading=Учитавање... {{percent}}%
loading_error_indicator=Грешка
loading_error=Дошло је до грешке током учитавања ПДФ-а.
rendering_error=Дошло је до грешке приликом приказивања стране.
page_label=Страна:
page_of=од {{pageCount}}
no_outline=Нема линија
open_file.title=Отвори датотеку
text_annotation_type=[{{type}} Annotation]
toggle_slider_label=Клизач
thumbs_label=Сличице
outline_label=Документи у линијама
bookmark_label=Тренутни приказ
previous_label=Предходна
next_label=Следећа
print_label=Штампај
download_label=Преузми
zoom_out_label=Умањи
zoom_in_label=Увећај
zoom.title=Скала

View file

@ -0,0 +1,122 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=Föregående sida
previous_label=Föregående
next.title=Nästa sida
next_label=Nästa
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=Sida:
page_of=av {{pageCount}}
zoom_out.title=Zooma ut
zoom_out_label=Zooma ut
zoom_in.title=Zooma in
zoom_in_label=Zooma in
zoom.title=Zooma
print.title=Skriv ut
print_label=Skriv ut
presentation_mode.title=Växla till presentationsläge
presentation_mode_label=Presentatationsläge
open_file.title=Öppna fil
open_file_label=Öppna
download.title=Ladda ner
download_label=Ladda ner
bookmark.title=Aktuell vy (kopiera eller öppna i nytt fönster)
bookmark_label=Aktuell vy
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=Visa/Dölj panel
toggle_slider_label=Visa/Dölj panel
outline.title=Visa dokumentdisposition
outline_label=Dokumentdisposition
thumbs.title=Visa miniatyrer
thumbs_label=Miniatyrer
findbar.title=Sök i dokumentet
findbar_label=Sök
# Document outline messages
no_outline=Ingen dokumentdisposition tillgänglig
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=Sida {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=Miniatyr av sida {{page}}
# Context menu
first_page.label=Gå till första sidan
last_page.label=Gå till sista sidan
page_rotate_cw.label=Rotera medurs
page_rotate_ccw.label=Rotera moturs
# Find panel button title and messages
find_label=Sök:
find_previous.title=Hitta föregående förekomst av frasen
find_previous_label=Föregående
find_next.title=Hitta nästa förekomst av frasen
find_next_label=Nästa
find_highlight=Markera alla
find_match_case_label=Matcha versaler/gemener
find_wrapped_to_bottom=Nådde toppen av sidan, fortsätter från slutet
find_wrapped_to_top=Nådde slutet av sidan, fortsätter från toppen
find_not_found=Frasen hittades inte
# Error panel labels
error_more_info=Mer information
error_less_info=Mindre information
error_close=Stäng
# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
# build ID.
error_build=PDF.JS Bygge: {{build}}
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Meddelande: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stack: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=Fil: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Rad: {{line}}
rendering_error=Ett fel inträffade när sidan renderades.
# Predefined zoom values
page_scale_width=Sidbredd
page_scale_fit=Passa sida
page_scale_auto=Automatisk Zoom
page_scale_actual=Faktisk storlek
# Loading indicator messages
loading_error_indicator=Fel
loading_error=Ett fel inträffade när PDFen skulle laddas.
invalid_file_error=Ogiltig eller korrupt PDF-fil.
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} Annotering]
request_password=PDFen är skyddad av lösenord:
printing_not_supported=Varning: Utskrifter stöds inte fullt ut av denna webbläsare.

View file

@ -0,0 +1,123 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=上一页
previous_label=向上
next.title=下一页
next_label=向下
# LOCALIZATION NOTE (page_label, page_of):
# These strings are concatenated to form the "Page: X of Y" string.
# Do not translate "{{pageCount}}", it will be substituted with a number
# representing the total number of pages.
page_label=页码:
page_of=/ {{pageCount}}
zoom_out.title=缩小
zoom_out_label=缩小
zoom_in.title=放大
zoom_in_label=放大
zoom.title=缩放
print.title=打印
print_label=打印
presentation_mode.title=切换至幻灯模式
presentation_mode_label=幻灯模式
open_file.title=打开文件
open_file_label=打开
download.title=下载
download_label=下载
bookmark.title=当前视图(复制或在新窗口中打开)
bookmark_label=当前视图
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_slider.title=切换侧栏
toggle_slider_label=切换侧栏
outline.title=显示文档大纲
outline_label=文档大纲
thumbs.title=显示缩略图
thumbs_label=缩略图
findbar.title=在该文档内查找
findbar_label=查找
# Document outline messages
no_outline=没有可用的大纲
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=页码 {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=页面 {{page}} 的缩略图
# Context menu
first_page.label=转到第一页
last_page.label=转到结尾页
page_rotate_cw.label=顺时针旋转
page_rotate_ccw.label=逆时针旋转
# Find panel button title and messages
find_label=查找:
find_previous.title=查找该短语上一次出现的位置
find_previous_label=上一个
find_next.title=查找该短语下一次出现的位置
find_next_label=下一个
find_highlight=全部高亮
find_match_case_label=区分大小写
find_reached_top=已查找至文档的开始位置,将从文档末尾继续查找
find_reached_bottom=已查找至文档的末尾位置,将从文档的开始位置继续查找
find_not_found=找不到
# Error panel labels
error_more_info=更多信息
error_less_info=简略信息
error_close=关闭
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
error_version_info=PDF.js v{{version}} (构建版本: {{build}})
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=错误信息: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=堆栈: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=文件: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=行数: {{line}}
rendering_error=渲染页面时出错。
# Predefined zoom values
page_scale_width=符合页宽
page_scale_fit=符合页面
page_scale_auto=自动缩放
page_scale_actual=实际大小
# Loading indicator messages
loading_error_indicator=错误
loading_error=加载 PDF 文件时出错。
invalid_file_error=PDF 文件无效或已损坏。
# LOCALIZATION NOTE (text_annotation_type): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type=[{{type}} 注解]
request_password=该 PDF 文档受密码保护:
printing_not_supported=警告:该浏览器不能完全支持打印。
web_fonts_disabled=Web 页面字体已被禁用,无法使用嵌入到 PDF 中的字体。

View file

@ -0,0 +1,113 @@
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 主工具列按鍵 (工具提示和圖像的替代文字)
previous.title=上一頁
previous_label=上一頁
next.title=下一頁
next_label=下一頁
# 本地化提示 (page_label, page_of):
# 這些字符串會連接成 "Page: X of Y" 的表示方式。
# 不要翻譯 "{{pageCount}}" , 因為它用來表示總頁數。
page_label=
page_of=頁,共 {{pageCount}} 頁
zoom_out.title=縮小
zoom_out_label=縮小
zoom_in.title=放大
zoom_in_label=放大
zoom.title=縮放
print.title=列印
print_label=列印
presentation_mode.title=切換到簡報模式
presentation_mode_label=簡報模式
open_file.title=開啟檔案
open_file_label=開啟
download.title=下載
download_label=下載
bookmark.title=目前檢視(複製或在新視窗中開啟)
bookmark_label=目前檢視
# 側邊欄工具列按鍵 (工具提示和圖像的替代文字)
# (_label 字符串是按鍵的替代文字, .title 字符串是工具提示)
toggle_slider.title=切換側邊欄
toggle_slider_label=切換側邊欄
outline.title=顯示文件綱要
outline_label=文件綱要
thumbs.title=顯示縮圖
thumbs_label=縮圖
findbar.title=在文件中搜尋
findbar_label=搜索
# 文件綱要相關訊息
no_outline=無可用的綱要
# 縮圖面板項目 (工具提示和圖像的替代文字)
# 本地化提示 (thumb_page_title): "{{page}}" 會被頁數取代。
thumb_page_title=第 {{page}} 頁
# 本地化提示 (thumb_page_canvas): "{{page}}" 會被頁數取代。
thumb_page_canvas=第 {{page}} 頁的縮圖
# 右鍵菜單
page_rotate_cw.label=順時針旋轉
page_rotate_ccw.label=逆時針旋轉
# 搜尋面板按鍵文字及訊息
find_label=搜尋:
find_previous.title=尋找上一個出現的詞組
find_previous_label=上一個
find_next.title=尋找下一個出現的詞組
find_next_label=下一個
find_highlight=全部以高亮顯示
find_match_case_label=區分大小寫
find_reached_top=到達文件頂端,由末端繼續搜尋
find_reached_bottom=到達文件末端,由頂端繼續搜尋
find_not_found=找不到詞組
# 錯誤面板標籤
error_more_info=更多資訊
error_less_info=更少資訊
error_close=關閉
# 本地化提示 (error_version_info): "{{version}}" and "{{build}}" 會被PDF.JS版本編號及組建編號取代。
error_version_info=PDF.js v{{version}} (組建: {{build}})
# 本地化提示 (error_message): "{{message}}" 會被英文的錯誤描述取代。
error_message=錯誤信息:{{message}}
# 本地化提示 (error_stack): "{{stack}}" 會被錯誤堆疊取代。
error_stack=堆疊:{{stack}}
# 本地化提示 (error_file): "{{file}}" 會被檔案名稱取代。
error_file=檔案:{{file}}
# 本地化提示 (error_line): "{{line}}" 會被行數取代。
error_line=行數:{{line}}
rendering_error=渲染頁面時發生錯誤。
# 預設的縮放值
page_scale_width=符合頁寬
page_scale_fit=符合頁面
page_scale_auto=自動縮放
page_scale_actual=實際大小
# 載入指示訊息
loading_error_indicator=錯誤
loading_error=載入PDF檔案時發生錯誤。
invalid_file_error=無效或受損的PDF檔案。
# 其他標籤和訊息
# "{{type}}" 用來表示PDF格式規範 (32000-1:2008 Table 169 Annotation types) 入面所定義的註解種類。
# 一些常見的類型有: "Check"、 "Text"、 "Comment"、 "Note"
text_annotation_type={{type}} 註解]
request_password=PDF檔案受密碼保護
printing_not_supported=警告:這個瀏覽器不完全支援列印。
web_fonts_disabled=禁止使用網路字型無法使用嵌入PDF檔案的字型。

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,194 @@
<!DOCTYPE html>
<!--
Copyright 2012 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>PDF.js viewer</title>
<link rel="stylesheet" href="viewer.css"/>
<script type="text/javascript" src="compatibility.js"></script>
<!-- This snippet is used in production, see Makefile -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/>
<script type="text/javascript" src="l10n.js"></script>
<script type="text/javascript" src="pdf.js"></script>
<script type="text/javascript" src="debugger.js"></script>
<script type="text/javascript" src="viewer.js"></script>
</head>
<body>
<div id="outerContainer">
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="1" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span>
</button>
<button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="2" data-l10n-id="outline">
<span data-l10n-id="outline_label">Document Outline</span>
</button>
</div>
</div>
<div id="sidebarContent">
<div id="thumbnailView">
</div>
<div id="outlineView" class="hidden">
</div>
</div>
</div> <!-- sidebarContainer -->
<div id="mainContainer">
<div class="findbar hidden doorHanger" id="findbar">
<label for="findInput" class="toolbarLabel" data-l10n-id="find_label">Find:</label>
<input id="findInput" class="toolbarField" tabindex="20">
<div class="splitToolbarButton">
<button class="toolbarButton findPrevious" title="" id="findPrevious" tabindex="21" data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton findNext" title="" id="findNext" tabindex="22" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Next</span>
</button>
</div>
<input type="checkbox" id="findHighlightAll" class="toolbarField">
<label for="findHighlightAll" class="toolbarLabel" tabindex="23" data-l10n-id="find_highlight">Highlight all</label>
<input type="checkbox" id="findMatchCase" class="toolbarField">
<label for="findMatchCase" class="toolbarLabel" tabindex="24" data-l10n-id="find_match_case_label">Match case</label>
<span id="findMsg" class="toolbarLabel"></span>
</div>
<div class="toolbar">
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="3" data-l10n-id="toggle_slider">
<span data-l10n-id="toggle_slider_label">Toggle Sidebar</span>
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton group" title="Find in Document" tabindex="4" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
</button>
<div class="splitToolbarButton">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="5" data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="6" data-l10n-id="next">
<span data-l10n-id="next_label">Next</span>
</button>
</div>
<label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
<input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="7">
</input>
<span id="numPages" class="toolbarLabel"></span>
</div>
<div id="toolbarViewerRight">
<input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" />
<button id="fullscreen" class="toolbarButton fullscreen" title="Switch to Presentation Mode" tabindex="11" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<button id="print" class="toolbarButton print" title="Print" tabindex="13" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
</div>
<div class="outerCenter">
<div class="innerCenter" id="toolbarViewerMiddle">
<div class="splitToolbarButton">
<button class="toolbarButton zoomOut" title="Zoom Out" tabindex="8" data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Zoom Out</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton zoomIn" title="Zoom In" tabindex="9" data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Zoom In</span>
</button>
</div>
<span id="scaleSelectContainer" class="dropdownToolbarButton">
<select id="scaleSelect" title="Zoom" oncontextmenu="return false;" tabindex="10" data-l10n-id="zoom">
<option id="pageAutoOption" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
<option id="pageActualOption" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
<option id="pageFitOption" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option>
<option id="pageWidthOption" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
<option id="customScaleOption" value="custom"></option>
<option value="0.5">50%</option>
<option value="0.75">75%</option>
<option value="1">100%</option>
<option value="1.25">125%</option>
<option value="1.5">150%</option>
<option value="2">200%</option>
</select>
</span>
</div>
</div>
</div>
</div>
</div>
<menu type="context" id="viewerContextMenu">
<menuitem label="First Page" id="first_page"
data-l10n-id="first_page" ></menuitem>
<menuitem label="Last Page" id="last_page"
data-l10n-id="last_page" ></menuitem>
<menuitem label="Rotate Counter-Clockwise" id="page_rotate_ccw"
data-l10n-id="page_rotate_ccw" ></menuitem>
<menuitem label="Rotate Clockwise" id="page_rotate_cw"
data-l10n-id="page_rotate_cw" ></menuitem>
</menu>
<div id="viewerContainer">
<div id="viewer" contextmenu="viewerContextMenu"></div>
</div>
<div id="loadingBox">
<div id="loading"></div>
<div id="loadingBar"><div class="progress"></div></div>
</div>
<div id="errorWrapper" hidden='true'>
<div id="errorMessageLeft">
<span id="errorMessage"></span>
<button id="errorShowMore" onclick="" oncontextmenu="return false;" data-l10n-id="error_more_info">
More Information
</button>
<button id="errorShowLess" onclick="" oncontextmenu="return false;" data-l10n-id="error_less_info" hidden='true'>
Less Information
</button>
</div>
<div id="errorMessageRight">
<button id="errorClose" oncontextmenu="return false;" data-l10n-id="error_close">
Close
</button>
</div>
<div class="clearBoth"></div>
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
</div>
</div> <!-- mainContainer -->
</div> <!-- outerContainer -->
<div id="printContainer"></div>
</body>
</html>

View file

@ -0,0 +1,93 @@
var DEFAULT_URL=null,DEFAULT_SCALE="auto",DEFAULT_SCALE_DELTA=1.1,UNKNOWN_SCALE=0,CACHE_SIZE=20,CSS_UNITS=96/72,SCROLLBAR_PADDING=40,VERTICAL_PADDING=5,MIN_SCALE=0.25,MAX_SCALE=4,IMAGE_DIR="./images/",SETTINGS_MEMORY=20,ANNOT_MIN_SIZE=10,RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},FindStates={FIND_FOUND:0,FIND_NOTFOUND:1,FIND_WRAPPED:2,FIND_PENDING:3};PDFJS.workerSrc="pdf.js";var mozL10n=document.mozL10n||document.webL10n;
function getFileName(a){var b=a.indexOf("#"),c=a.indexOf("?"),b=Math.min(0<b?b:a.length,0<c?c:a.length);return a.substring(a.lastIndexOf("/",b)+1,b)}function scrollIntoView(a,b){for(var c=a.offsetParent,d=a.offsetTop;c.clientHeight==c.scrollHeight;)if(d+=c.offsetTop,c=c.offsetParent,!c)return;b&&(d+=b.top);c.scrollTop=d}
var Cache=function(a){var b=[];this.push=function(c){var d=b.indexOf(c);0<=d&&b.splice(d);b.push(c);b.length>a&&b.shift().destroy()}},ProgressBar=function(){function a(a,c){this.div=document.querySelector(a+" .progress");this.height=c.height||100;this.width=c.width||100;this.units=c.units||"%";this.div.style.height=this.height+this.units}a.prototype={updateBar:function(){if(this._indeterminate)this.div.classList.add("indeterminate");else{var a=this.width*this._percent/100;95<this._percent?this.div.classList.add("full"):
this.div.classList.remove("full");this.div.classList.remove("indeterminate");this.div.style.width=a+this.units}},get percent(){return this._percent},set percent(a){this._indeterminate=isNaN(a);this._percent=Math.min(Math.max(a,0),100);this.updateBar()}};return a}(),Settings=function(){function a(a){this.fingerprint=a;this.initializedPromise=new PDFJS.Promise;a=function(a){this.initialize(a||"{}");this.initializedPromise.resolve()}.bind(this);b&&a(localStorage.getItem("database"))}var b;try{b="localStorage"in
window&&null!==window.localStorage&&localStorage}catch(c){b=!1}a.prototype={initialize:function(a){a=JSON.parse(a);"files"in a||(a.files=[]);a.files.length>=SETTINGS_MEMORY&&a.files.shift();for(var b,c=0,f=a.files.length;c<f;c++)if(a.files[c].fingerprint==this.fingerprint){b=c;break}"number"!=typeof b&&(b=a.files.push({fingerprint:this.fingerprint})-1);this.file=a.files[b];this.database=a},set:function(a,c){if(this.initializedPromise.isResolved){this.file[a]=c;var j=JSON.stringify(this.database);
b&&localStorage.setItem("database",j)}},get:function(a,b){return!this.initializedPromise.isResolved?b:this.file[a]||b}};return a}(),cache=new Cache(CACHE_SIZE),currentPageNumber=1,PDFFindController={startedTextExtraction:!1,extractTextPromises:[],active:!1,pageContents:[],pageMatches:[],selected:{pageIdx:-1,matchIdx:-1},offset:{pageIdx:null,matchIdx:null},resumePageIdx:null,resumeCallback:null,state:null,dirtyMatch:!1,findTimeout:null,initialize:function(){var a=["find","findagain","findhighlightallchange",
"findcasesensitivitychange"];this.handleEvent=this.handleEvent.bind(this);for(var b=0;b<a.length;b++)window.addEventListener(a[b],this.handleEvent)},calcFindMatch:function(a){var b=this.pageContents[a],c=this.state.query,d=this.state.caseSensitive,e=c.length;if(0!==e){d||(b=b.toLowerCase(),c=c.toLowerCase());for(var d=[],j=-e;;){j=b.indexOf(c,j+e);if(-1===j)break;d.push(j)}this.pageMatches[a]=d;this.updatePage(a);this.resumePageIdx===a&&(a=this.resumeCallback,this.resumeCallback=this.resumePageIdx=
null,a())}},extractText:function(){function a(b){PDFView.pages[b].getTextContent().then(function(c){c=c.bidiTexts;for(var f="",h=0;h<c.length;h++)f+=c[h].str;d.pageContents.push(f);d.extractTextPromises[b].resolve(b);b+1<PDFView.pages.length&&a(b+1)})}if(!this.startedTextExtraction){this.startedTextExtraction=!0;this.pageContents=[];for(var b=0,c=PDFView.pdfDocument.numPages;b<c;b++)this.extractTextPromises.push(new PDFJS.Promise);var d=this;a(0);return this.extractTextPromise}},handleEvent:function(a){if(null===
this.state||"findagain"!==a.type)this.dirtyMatch=!0;this.state=a.detail;this.updateUIState(FindStates.FIND_PENDING);this.extractText();clearTimeout(this.findTimeout);"find"===a.type?this.findTimeout=setTimeout(this.nextMatch.bind(this),250):this.nextMatch()},updatePage:function(a){var b=PDFView.pages[a];this.selected.pageIdx===a&&b.scrollIntoView();b.textLayer&&b.textLayer.updateMatches()},nextMatch:function(){var a=this.state.findPrevious,b=PDFView.pages.length;this.active=!0;if(this.dirtyMatch){this.dirtyMatch=
!1;this.selected.pageIdx=this.selected.matchIdx=-1;this.offset.pageIdx=a?b-1:0;this.offset.matchIdx=null;this.hadMatch=!1;this.resumePageIdx=this.resumeCallback=null;this.pageMatches=[];for(var c=this,d=0;d<b;d++)this.updatePage(d),this.extractTextPromises[d].onData(function(a){setTimeout(function(){c.calcFindMatch(a)})})}if(""===this.state.query)this.updateUIState(FindStates.FIND_FOUND);else if(!this.resumeCallback){b=this.offset;if(null!==b.matchIdx){d=this.pageMatches[b.pageIdx].length;if(!a&&
b.matchIdx+1<d||a&&0<b.matchIdx){this.hadMatch=!0;b.matchIdx=a?b.matchIdx-1:b.matchIdx+1;this.updateMatch(!0);return}this.advanceOffsetPage(a)}this.nextPageMatch()}},nextPageMatch:function(){null!==this.resumePageIdx&&console.error("There can only be one pending page.");var a=function(a){var b=this.offset;a=a.length;var c=this.state.findPrevious;if(a)this.hadMatch=!0,b.matchIdx=c?a-1:0,this.updateMatch(!0);else{this.advanceOffsetPage(c);if(b.wrapped&&(b.matchIdx=null,!this.hadMatch)){this.updateMatch(!1);
return}this.nextPageMatch()}}.bind(this),b=this.offset.pageIdx,c=this.pageMatches;c[b]?a(c[b]):(this.resumeCallback=function(){a(c[b])},this.resumePageIdx=b)},advanceOffsetPage:function(a){var b=this.offset,c=this.extractTextPromises.length;b.pageIdx=a?b.pageIdx-1:b.pageIdx+1;b.matchIdx=null;if(b.pageIdx>=c||0>b.pageIdx)b.pageIdx=a?c-1:0,b.wrapped=!0},updateMatch:function(a){var b=FindStates.FIND_NOTFOUND,c=this.offset.wrapped;this.offset.wrapped=!1;a&&(a=this.selected.pageIdx,this.selected.pageIdx=
this.offset.pageIdx,this.selected.matchIdx=this.offset.matchIdx,b=c?FindStates.FIND_WRAPPED:FindStates.FIND_FOUND,-1!==a&&a!==this.selected.pageIdx&&this.updatePage(a));this.updateUIState(b,this.state.findPrevious);-1!==this.selected.pageIdx&&this.updatePage(this.selected.pageIdx,!0)},updateUIState:function(a,b){PDFView.supportsIntegratedFind?FirefoxCom.request("updateFindControlState",{result:a,findPrevious:b}):PDFFindBar.updateUIState(a,b)}},PDFFindBar={opened:!1,initialize:function(){this.bar=
document.getElementById("findbar");this.toggleButton=document.getElementById("viewFind");this.findField=document.getElementById("findInput");this.highlightAll=document.getElementById("findHighlightAll");this.caseSensitive=document.getElementById("findMatchCase");this.findMsg=document.getElementById("findMsg");this.findStatusIcon=document.getElementById("findStatusIcon");var a=this;this.toggleButton.addEventListener("click",function(){a.toggle()});this.findField.addEventListener("input",function(){a.dispatchEvent("")});
this.bar.addEventListener("keydown",function(b){switch(b.keyCode){case 13:b.target===a.findField&&a.dispatchEvent("again",b.shiftKey);break;case 27:a.close()}});document.getElementById("findPrevious").addEventListener("click",function(){a.dispatchEvent("again",!0)});document.getElementById("findNext").addEventListener("click",function(){a.dispatchEvent("again",!1)});this.highlightAll.addEventListener("click",function(){a.dispatchEvent("highlightallchange")});this.caseSensitive.addEventListener("click",
function(){a.dispatchEvent("casesensitivitychange")})},dispatchEvent:function(a,b){var c=document.createEvent("CustomEvent");c.initCustomEvent("find"+a,!0,!0,{query:this.findField.value,caseSensitive:this.caseSensitive.checked,highlightAll:this.highlightAll.checked,findPrevious:b});return window.dispatchEvent(c)},updateUIState:function(a,b){var c=!1,d="",e="";switch(a){case FindStates.FIND_PENDING:e="pending";break;case FindStates.FIND_NOTFOUND:d=mozL10n.get("find_not_found",null,"Phrase not found");
c=!0;break;case FindStates.FIND_WRAPPED:d=b?mozL10n.get("find_reached_top",null,"Reached top of document, continued from bottom"):mozL10n.get("find_reached_bottom",null,"Reached end of document, continued from top")}c?this.findField.classList.add("notFound"):this.findField.classList.remove("notFound");this.findField.setAttribute("data-status",e);this.findMsg.textContent=d},open:function(){this.opened||(this.opened=!0,this.toggleButton.classList.add("toggled"),this.bar.classList.remove("hidden"),this.findField.select(),
this.findField.focus())},close:function(){this.opened&&(this.opened=!1,this.toggleButton.classList.remove("toggled"),this.bar.classList.add("hidden"),PDFFindController.active=!1)},toggle:function(){this.opened?this.close():this.open()}},PDFView={pages:[],thumbnails:[],currentScale:UNKNOWN_SCALE,currentScaleValue:null,initialBookmark:document.location.hash.substring(1),startedTextExtraction:!1,pageText:[],container:null,thumbnailContainer:null,initialized:!1,fellback:!1,pdfDocument:null,sidebarOpen:!1,
pageViewScroll:null,thumbnailViewScroll:null,isFullscreen:!1,previousScale:null,pageRotation:0,mouseScrollTimeStamp:0,mouseScrollDelta:0,lastScroll:0,previousPageNumber:1,initialize:function(){var a=this,b=this.container=document.getElementById("viewerContainer");this.pageViewScroll={};this.watchScroll(b,this.pageViewScroll,updateViewarea);var c=this.thumbnailContainer=document.getElementById("thumbnailView");this.thumbnailViewScroll={};this.watchScroll(c,this.thumbnailViewScroll,this.renderHighestPriority.bind(this));
PDFFindBar.initialize();PDFFindController.initialize();this.initialized=!0;b.addEventListener("scroll",function(){a.lastScroll=Date.now()},!1)},watchScroll:function(a,b,c){b.down=!0;b.lastY=a.scrollTop;a.addEventListener("scroll",function(){var d=a.scrollTop,e=b.lastY;d>e?b.down=!0:d<e&&(b.down=!1);b.lastY=d;c()},!0)},setScale:function(a,b,c){if(a!=this.currentScale){for(var d=this.pages,e=0;e<d.length;e++)d[e].update(a*CSS_UNITS);!c&&this.currentScale!=a&&this.pages[this.page-1].scrollIntoView();
this.currentScale=a;c=document.createEvent("UIEvents");c.initUIEvent("scalechange",!1,!1,window,0);c.scale=a;c.resetAutoSettings=b;window.dispatchEvent(c)}},parseScale:function(a,b,c){if("custom"!=a){var d=parseFloat(a);this.currentScaleValue=a;if(d)this.setScale(d,!0,c);else{var e=this.container,j=this.pages[this.page-1];if(j){var f=(e.clientWidth-SCROLLBAR_PADDING)/j.width*j.scale/CSS_UNITS,e=(e.clientHeight-VERTICAL_PADDING)/j.height*j.scale/CSS_UNITS;switch(a){case "page-actual":d=1;break;case "page-width":d=
f;break;case "page-height":d=e;break;case "page-fit":d=Math.min(f,e);break;case "auto":d=Math.min(1,f)}this.setScale(d,b,c);selectScaleOption(a)}}}},zoomIn:function(){var a=(this.currentScale*DEFAULT_SCALE_DELTA).toFixed(2),a=Math.min(MAX_SCALE,a);this.parseScale(a,!0)},zoomOut:function(){var a=(this.currentScale/DEFAULT_SCALE_DELTA).toFixed(2),a=Math.max(MIN_SCALE,a);this.parseScale(a,!0)},set page(a){var b=this.pages;document.getElementById("pageNumber");var c=document.createEvent("UIEvents");c.initUIEvent("pagechange",
!1,!1,window,0);0<a&&a<=b.length?(b[a-1].updateStats(),this.previousPageNumber=currentPageNumber,currentPageNumber=a,c.pageNumber=a,window.dispatchEvent(c),updateViewarea.inProgress||this.loading&&1==a||b[a-1].scrollIntoView()):(this.previousPageNumber=a,c.pageNumber=this.page,window.dispatchEvent(c))},get page(){return currentPageNumber},get supportsPrinting(){var a="mozPrintCallback"in document.createElement("canvas");Object.defineProperty(this,"supportsPrinting",{value:a,enumerable:!0,configurable:!0,
writable:!1});return a},get supportsFullscreen(){var a=document.documentElement,a=a.requestFullscreen||a.mozRequestFullScreen||a.webkitRequestFullScreen;window.frameElement&&(a=!1);Object.defineProperty(this,"supportsFullScreen",{value:a,enumerable:!0,configurable:!0,writable:!1});return a},get supportsIntegratedFind(){Object.defineProperty(this,"supportsIntegratedFind",{value:!1,enumerable:!0,configurable:!0,writable:!1});return!1},get supportsDocumentFonts(){Object.defineProperty(this,"supportsDocumentFonts",
{value:!0,enumerable:!0,configurable:!0,writable:!1});return!0},get isHorizontalScrollbarEnabled(){var a=document.getElementById("viewerContainer");return a.scrollWidth>a.clientWidth},initPassiveLoading:function(){PDFView.loadingBar||(PDFView.loadingBar=new ProgressBar("#loadingBar",{}));window.addEventListener("message",function(a){var b=a.data;if("object"===typeof b&&"pdfjsLoadAction"in b)switch(b.pdfjsLoadAction){case "progress":PDFView.progress(b.loaded/b.total);break;case "complete":if(!b.data){PDFView.error(mozL10n.get("loading_error",
null,"An error occurred while loading the PDF."),a);break}PDFView.open(b.data,0)}});FirefoxCom.requestSync("initPassiveLoading",null)},setTitleUsingUrl:function(a){this.url=a;try{this.setTitle(decodeURIComponent(getFileName(a))||a)}catch(b){this.setTitle(a)}},setTitle:function(a){document.title=a},open:function(a,b,c){var d={password:c};"string"===typeof a?(this.setTitleUsingUrl(a),d.url=a):a&&"byteLength"in a&&(d.data=a);PDFView.loadingBar||(PDFView.loadingBar=new ProgressBar("#loadingBar",{}));
this.pdfDocument=null;var e=this;e.loading=!0;PDFJS.getDocument(d).then(function(a){e.load(a,b);e.loading=!1},function(d,f){if(f&&"PasswordException"===f.name&&"needpassword"===f.code){var h=mozL10n.get("request_password",null,"PDF is protected by a password:");if((c=prompt(h))&&0<c.length)return PDFView.open(a,b,c)}h=mozL10n.get("loading_error",null,"An error occurred while loading the PDF.");f&&"InvalidPDFException"===f.name&&(h=mozL10n.get("invalid_file_error",null,"Invalid or corrupted PDF file."));
document.getElementById("loading").textContent=mozL10n.get("loading_error_indicator",null,"Error");e.error(h,{message:d});e.loading=!1},function(a){e.progress(a.loaded/a.total)})},download:function(){var a=this.url.split("#")[0];window.open(a+"#pdfjs.action=download","_parent")},fallback:function(){},navigateTo:function(a){"string"===typeof a&&(a=this.destinations[a]);if(a instanceof Array){var b=a[0],b=b instanceof Object?this.pagesRefMap[b.num+" "+b.gen+" R"]:b+1;b>this.pages.length&&(b=this.pages.length);
b&&(this.page=b,this.pages[b-1].scrollIntoView(a))}},getDestinationHash:function(a){if("string"===typeof a)return PDFView.getAnchorUrl("#"+escape(a));if(a instanceof Array){var b=a[0];if(b=b instanceof Object?this.pagesRefMap[b.num+" "+b.gen+" R"]:b+1){var b=PDFView.getAnchorUrl("#page="+b),c=a[1];if("object"===typeof c&&("name"in c&&"XYZ"==c.name)&&(b+="&zoom="+100*(a[4]||this.currentScale),a[2]||a[3]))b+=","+(a[2]||0)+","+(a[3]||0);return b}}return""},getAnchorUrl:function(a){return a},getOutputScale:function(){var a=
"devicePixelRatio"in window?window.devicePixelRatio:1;return{sx:a,sy:a,scaled:1!=a}},error:function(a,b){var c=mozL10n.get("error_version_info",{version:PDFJS.version||"?",build:PDFJS.build||"?"},"PDF.js v{{version}} (build: {{build}})")+"\n";b&&(c+=mozL10n.get("error_message",{message:b.message},"Message: {{message}}"),b.stack?c+="\n"+mozL10n.get("error_stack",{stack:b.stack},"Stack: {{stack}}"):(b.filename&&(c+="\n"+mozL10n.get("error_file",{file:b.filename},"File: {{file}}")),b.lineNumber&&(c+=
"\n"+mozL10n.get("error_line",{line:b.lineNumber},"Line: {{line}}"))));document.getElementById("loadingBox").setAttribute("hidden","true");var d=document.getElementById("errorWrapper");d.removeAttribute("hidden");document.getElementById("errorMessage").textContent=a;document.getElementById("errorClose").onclick=function(){d.setAttribute("hidden","true")};var e=document.getElementById("errorMoreInfo"),j=document.getElementById("errorShowMore"),f=document.getElementById("errorShowLess");j.onclick=function(){e.removeAttribute("hidden");
j.setAttribute("hidden","true");f.removeAttribute("hidden")};f.onclick=function(){e.setAttribute("hidden","true");j.removeAttribute("hidden");f.setAttribute("hidden","true")};j.removeAttribute("hidden");f.setAttribute("hidden","true");e.value=c;e.rows=c.split("\n").length-1},progress:function(a){a=Math.round(100*a);PDFView.loadingBar.percent=a},load:function(a,b){function c(a,b){a.onAfterDraw=function(){b.setImage(a.canvas)}}this.pdfDocument=a;document.getElementById("errorWrapper").setAttribute("hidden",
"true");document.getElementById("loadingBox").setAttribute("hidden","true");document.getElementById("loading").textContent="";var d=document.getElementById("thumbnailView");for(d.parentNode.scrollTop=0;d.hasChildNodes();)d.removeChild(d.lastChild);"_loadingInterval"in d&&clearInterval(d._loadingInterval);for(var e=document.getElementById("viewer");e.hasChildNodes();)e.removeChild(e.lastChild);var j=a.numPages,f=a.fingerprint;document.getElementById("numPages").textContent=mozL10n.get("page_of",{pageCount:j},
"of {{pageCount}}");document.getElementById("pageNumber").max=j;PDFView.documentFingerprint=f;var h=PDFView.store=new Settings(f),f=h.initializedPromise;this.pageRotation=0;var g=this.pages=[];this.pageText=[];this.startedTextExtraction=!1;for(var m={},k=this.thumbnails=[],l=[],n=1;n<=j;n++)l.push(a.getPage(n));var p=this,l=PDFJS.Promise.all(l);l.then(function(a){for(var f=1;f<=j;f++){var h=a[f-1],l=new PageView(e,h,f,b,h.stats,p.navigateTo.bind(p)),n=new ThumbnailView(d,h,f);c(l,n);g.push(l);k.push(n);
h=h.ref;m[h.num+" "+h.gen+" R"]=f}p.pagesRefMap=m});n=a.getDestinations();n.then(function(a){p.destinations=a});PDFJS.Promise.all([l,n,f]).then(function(){a.getOutline().then(function(a){p.outline=new DocumentOutlineView(a)});var c=null;if(h.get("exists",!1))var c=h.get("page","1"),d=h.get("zoom",PDFView.currentScale),e=h.get("scrollLeft","0"),f=h.get("scrollTop","0"),c="page="+c+"&zoom="+d+","+e+","+f;p.setInitialView(c,b)});a.getMetadata().then(function(b){var c=b.info;b=b.metadata;p.documentInfo=
c;p.metadata=b;console.log("PDF "+a.fingerprint+" ["+c.PDFFormatVersion+" "+(c.Producer||"-")+" / "+(c.Creator||"-")+"]"+(PDFJS.version?" (PDF.js: "+PDFJS.version+")":""));var d;b&&b.has("dc:title")&&(d=b.get("dc:title"));!d&&(c&&c.Title)&&(d=c.Title);d&&p.setTitle(d+" - "+document.title)})},setInitialView:function(a,b){this.currentScale=0;this.currentScaleValue=null;this.initialBookmark?(this.setHash(this.initialBookmark),this.initialBookmark=null):a?this.setHash(a):b&&(this.parseScale(b,!0),this.page=
1);PDFView.currentScale===UNKNOWN_SCALE&&this.parseScale(DEFAULT_SCALE,!0)},renderHighestPriority:function(){var a=this.getVisiblePages();(a=this.getHighestPriority(a,this.pages,this.pageViewScroll.down))?this.renderView(a,"page"):this.sidebarOpen&&(a=this.getVisibleThumbs(),(a=this.getHighestPriority(a,this.thumbnails,this.thumbnailViewScroll.down))&&this.renderView(a,"thumbnail"))},getHighestPriority:function(a,b,c){var d=a.views,e=d.length;if(0===e)return!1;for(var j=0;j<e;++j){var f=d[j].view;
if(!this.isViewFinished(f))return f}a=c?a.last.id:a.first.id-2;return b[a]&&!this.isViewFinished(b[a])?b[a]:!1},isViewFinished:function(a){return a.renderingState===RenderingStates.FINISHED},renderView:function(a,b){switch(a.renderingState){case RenderingStates.FINISHED:return!1;case RenderingStates.PAUSED:PDFView.highestPriorityPage=b+a.id;a.resume();break;case RenderingStates.RUNNING:PDFView.highestPriorityPage=b+a.id;break;case RenderingStates.INITIAL:PDFView.highestPriorityPage=b+a.id,a.draw(this.renderHighestPriority.bind(this))}return!0},
setHash:function(a){if(a)if(0<=a.indexOf("=")){var b=PDFView.parseQueryString(a);if("nameddest"in b)PDFView.navigateTo(b.nameddest);else if("page"in b)if(a=b.page|0||1,"zoom"in b){var b=b.zoom.split(","),c=b[0],d=parseFloat(c);d&&(c=d/100);this.pages[a-1].scrollIntoView([null,{name:"XYZ"},b[1]|0,b[2]|0,c])}else this.page=a}else/^\d+$/.test(a)?this.page=a:PDFView.navigateTo(unescape(a))},switchSidebarView:function(a){var b=document.getElementById("thumbnailView"),c=document.getElementById("outlineView"),
d=document.getElementById("viewThumbnail"),e=document.getElementById("viewOutline");switch(a){case "thumbs":a=b.classList.contains("hidden");d.classList.add("toggled");e.classList.remove("toggled");b.classList.remove("hidden");c.classList.add("hidden");PDFView.renderHighestPriority();a&&scrollIntoView(document.getElementById("thumbnailContainer"+this.page));break;case "outline":d.classList.remove("toggled"),e.classList.add("toggled"),b.classList.add("hidden"),c.classList.remove("hidden"),e.getAttribute("disabled")}},
getVisiblePages:function(){return this.getVisibleElements(this.container,this.pages,!0)},getVisibleThumbs:function(){return this.getVisibleElements(this.thumbnailContainer,this.thumbnails)},getVisibleElements:function(a,b,c){for(var d=0,e,j=a.scrollTop,f=1,h=b.length;f<=h;++f){e=b[f-1];d=e.el.offsetTop;if(d+e.el.clientHeight>j)break;d+=e.el.clientHeight}var g=[];if(this.isFullscreen)return c=this.pages[this.page-1],g.push({id:c.id,view:c}),{first:c,last:c,views:g};a=j+a.clientHeight;for(var m,k,l;f<=
h&&d<a;++f)e=b[f-1],l=e.el.clientHeight,d=e.el.offsetTop,m=d+l,k=Math.max(0,j-d)+Math.max(0,m-a),k=Math.floor(100*(l-k)/l),g.push({id:e.id,y:d,view:e,percent:k}),d=m;b=g[0];d=g[g.length-1];c&&g.sort(function(a,b){var c=a.percent-b.percent;return 0.0010<Math.abs(c)?-c:a.id-b.id});return{first:b,last:d,views:g}},parseQueryString:function(a){a=a.split("&");for(var b={},c=0;c<a.length;++c){var d=a[c].split("="),e=1<d.length?d[1]:null;b[unescape(d[0])]=unescape(e)}return b},beforePrint:function(){if(this.supportsPrinting){document.querySelector("body").setAttribute("data-mozPrintCallback",
!0);for(var a=0,b=this.pages.length;a<b;++a)this.pages[a].beforePrint()}else a=mozL10n.get("printing_not_supported",null,"Warning: Printing is not fully supported by this browser."),this.error(a)},afterPrint:function(){for(var a=document.getElementById("printContainer");a.hasChildNodes();)a.removeChild(a.lastChild)},fullscreen:function(){if(document.fullscreenElement||document.mozFullScreen||document.webkitIsFullScreen)return!1;var a=document.getElementById("viewerContainer");if(document.documentElement.requestFullscreen)a.requestFullscreen();
else if(document.documentElement.mozRequestFullScreen)a.mozRequestFullScreen();else if(document.documentElement.webkitRequestFullScreen)a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);else return!1;this.isFullscreen=!0;var b=this.pages[this.page-1];this.previousScale=this.currentScaleValue;this.parseScale("page-fit",!0);setTimeout(function(){b.scrollIntoView()},0);this.showPresentationControls();return!0},exitFullscreen:function(){this.isFullscreen=!1;this.parseScale(this.previousScale);this.page=
this.page;this.clearMouseScrollState();this.hidePresentationControls()},showPresentationControls:function(){var a=document.getElementById("viewerContainer");this.presentationControlsTimeout?clearTimeout(this.presentationControlsTimeout):a.classList.add("presentationControls");this.presentationControlsTimeout=setTimeout(function(){a.classList.remove("presentationControls");delete PDFView.presentationControlsTimeout},3E3)},hidePresentationControls:function(){this.presentationControlsTimeout&&(clearTimeout(this.presentationControlsTimeout),
delete this.presentationControlsTimeout,document.getElementById("viewerContainer").classList.remove("presentationControls"))},rotatePages:function(a){this.pageRotation=(this.pageRotation+360+a)%360;a=0;for(var b=this.pages.length;a<b;a++){var c=this.pages[a];c.update(c.scale,this.pageRotation)}a=0;for(b=this.thumbnails.length;a<b;a++)this.thumbnails[a].updateRotation(this.pageRotation);var d=this.pages[this.page-1];this.parseScale(this.currentScaleValue,!0);this.renderHighestPriority();setTimeout(function(){d.scrollIntoView()},
0)},mouseScroll:function(a){var b=(new Date).getTime(),c=this.mouseScrollTimeStamp;b>c&&50>b-c||((0<this.mouseScrollDelta&&0>a||0>this.mouseScrollDelta&&0<a)&&this.clearMouseScrollState(),this.mouseScrollDelta+=a,120<=Math.abs(this.mouseScrollDelta)&&(a=0<this.mouseScrollDelta?-1:1,this.clearMouseScrollState(),c=this.page,1==c&&-1==a||c==this.pages.length&&1==a||(this.page+=a,this.mouseScrollTimeStamp=b)))},clearMouseScrollState:function(){this.mouseScrollDelta=this.mouseScrollTimeStamp=0}},PageView=
function(a,b,c,d){this.id=c;this.pdfPage=b;this.rotation=0;this.scale=d||1;this.viewport=this.pdfPage.getViewport(this.scale,this.pdfPage.rotate);this.renderingState=RenderingStates.INITIAL;this.textLayer=this.textContent=this.resume=null;c=document.createElement("a");c.name=""+this.id;var e=this.el=document.createElement("div");e.id="pageContainer"+this.id;e.className="page";e.style.width=Math.floor(this.viewport.width)+"px";e.style.height=Math.floor(this.viewport.height)+"px";a.appendChild(c);a.appendChild(e);
this.destroy=function(){this.update();this.pdfPage.destroy()};this.update=function(a,b){this.renderingState=RenderingStates.INITIAL;this.resume=null;"undefined"!==typeof b&&(this.rotation=b);this.scale=a||this.scale;var c=this.pdfPage.getViewport(this.scale,(this.rotation+this.pdfPage.rotate)%360);this.viewport=c;e.style.width=Math.floor(c.width)+"px";for(e.style.height=Math.floor(c.height)+"px";e.hasChildNodes();)e.removeChild(e.lastChild);e.removeAttribute("data-loaded");delete this.canvas;this.loadingIconDiv=
document.createElement("div");this.loadingIconDiv.className="loadingIcon";e.appendChild(this.loadingIconDiv)};Object.defineProperty(this,"width",{get:function(){return this.viewport.width},enumerable:!0});Object.defineProperty(this,"height",{get:function(){return this.viewport.height},enumerable:!0});this.getPagePoint=function(a,b){return this.viewport.convertToPdfPoint(a,b)};this.scrollIntoView=function(a){if(a){var b=0,c=0,d=0,m=0,k;k=0;switch(a[1].name){case "XYZ":b=a[2];c=a[3];k=a[4];break;case "Fit":case "FitB":k=
"page-fit";break;case "FitH":case "FitBH":c=a[2];k="page-width";break;case "FitV":case "FitBV":b=a[2];k="page-height";break;case "FitR":b=a[2];c=a[3];d=a[4]-b;m=a[5]-c;a=(this.container.clientWidth-SCROLLBAR_PADDING)/d/CSS_UNITS;k=(this.container.clientHeight-SCROLLBAR_PADDING)/m/CSS_UNITS;k=Math.min(a,k);break;default:return}k&&k!==PDFView.currentScale?PDFView.parseScale(k,!0,!0):PDFView.currentScale===UNKNOWN_SCALE&&PDFView.parseScale(DEFAULT_SCALE,!0,!0);var l=[this.viewport.convertToViewportPoint(b,
c),this.viewport.convertToViewportPoint(b+d,c+m)];setTimeout(function(){var a=Math.min(l[0][0],l[1][0]),b=Math.min(l[0][1],l[1][1]),c=Math.abs(l[0][0]-l[1][0]),d=Math.abs(l[0][1]-l[1][1]);scrollIntoView(e,{left:a,top:b,width:c,height:d})},0)}else scrollIntoView(e)};this.getTextContent=function(){this.textContent||(this.textContent=this.pdfPage.getTextContent());return this.textContent};this.draw=function(a){function c(d){n.renderingState=RenderingStates.FINISHED;n.loadingIconDiv&&(e.removeChild(n.loadingIconDiv),
delete n.loadingIconDiv);d&&PDFView.error(mozL10n.get("rendering_error",null,"An error occurred while rendering the page."),d);n.stats=b.stats;n.updateStats();if(n.onAfterDraw)n.onAfterDraw();cache.push(n);a()}this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing");this.renderingState=RenderingStates.RUNNING;var d=document.createElement("canvas");d.id="page"+this.id;d.mozOpaque=!0;e.appendChild(d);this.canvas=d;var g=null;PDFJS.disableTextLayer||(g=document.createElement("div"),
g.className="textLayer",e.appendChild(g));var m=this.textLayer=g?new TextLayerBuilder(g,this.id-1):null,k=this.viewport,l=PDFView.getOutputScale();d.width=Math.floor(k.width)*l.sx;d.height=Math.floor(k.height)*l.sy;l.scaled&&(k="scale("+1/l.sx+", "+1/l.sy+")",CustomStyle.setProp("transform",d,k),CustomStyle.setProp("transformOrigin",d,"0% 0%"),g&&(CustomStyle.setProp("transform",g,k),CustomStyle.setProp("transformOrigin",g,"0% 0%")));g=d.getContext("2d");g.save();g.fillStyle="rgb(255, 255, 255)";
g.fillRect(0,0,d.width,d.height);g.restore();l.scaled&&g.scale(l.sx,l.sy);var n=this;this.pdfPage.render({canvasContext:g,viewport:this.viewport,textLayer:m,continueCallback:function(a){PDFView.highestPriorityPage!=="page"+n.id?(n.renderingState=RenderingStates.PAUSED,n.resume=function(){n.renderingState=RenderingStates.RUNNING;a()}):a()}}).then(function(){c(null)},function(a){c(a)});m&&this.getTextContent().then(function(a){m.setTextContent(a)});var p=this.viewport,q=function(a,b){a.href=PDFView.getDestinationHash(b);
a.onclick=function(){b&&PDFView.navigateTo(b);return!1}},r=function(a,b,c){c||(c=p.convertToViewportRectangle(b.rect),c=PDFJS.Util.normalizeRect(c));a=document.createElement(a);a.style.left=Math.floor(c[0])+"px";a.style.top=Math.floor(c[1])+"px";a.style.width=Math.ceil(c[2]-c[0])+"px";a.style.height=Math.ceil(c[3]-c[1])+"px";return a},s=function(a){var b=document.createElement("section");b.className="annotText";var c=p.convertToViewportRectangle(a.rect),c=PDFJS.Util.normalizeRect(c);c[3]-c[1]<ANNOT_MIN_SIZE&&
(c[3]=c[1]+ANNOT_MIN_SIZE);c[2]-c[0]<ANNOT_MIN_SIZE&&(c[2]=c[0]+(c[3]-c[1]));var d=r("img",a,c),e=a.name;d.src=IMAGE_DIR+"annotation-"+e.toLowerCase()+".svg";d.alt=mozL10n.get("text_annotation_type",{type:e},"[{{type}} Annotation]");var f=document.createElement("div");f.setAttribute("hidden",!0);var e=document.createElement("h1"),j=document.createElement("p");f.style.left=Math.floor(c[2])+"px";f.style.top=Math.floor(c[1])+"px";e.textContent=a.title;if(!a.content&&!a.title)f.setAttribute("hidden",
!0);else{c=document.createElement("span");a=a.content.split(/(?:\r\n?|\n)/);for(var h=0,g=a.length;h<g;++h)c.appendChild(document.createTextNode(a[h])),h<g-1&&c.appendChild(document.createElement("br"));j.appendChild(c);d.addEventListener("mouseover",function(){f.removeAttribute("hidden")},!1);d.addEventListener("mouseout",function(){f.setAttribute("hidden",!0)},!1)}f.appendChild(e);f.appendChild(j);b.appendChild(d);b.appendChild(f);return b};this.pdfPage.getAnnotations().then(function(a){for(var b=
0;b<a.length;b++){var c=a[b];switch(c.type){case "Link":var d=r("a",c);d.href=c.url||"";c.url||q(d,"dest"in c?c.dest:null);e.appendChild(d);break;case "Text":(c=s(c))&&e.appendChild(c);break;case "Widget":PDFView.fallback()}}});e.setAttribute("data-loaded",!0)};this.beforePrint=function(){var a=this.pdfPage,b=a.getViewport(1),c=this.canvas=document.createElement("canvas");c.width=2*Math.floor(b.width);c.height=2*Math.floor(b.height);c.style.width=2*b.width+"pt";c.style.height=2*b.height+"pt";CustomStyle.setProp("transform",
c,"scale(0.5, 0.5)");CustomStyle.setProp("transformOrigin",c,"0% 0%");document.getElementById("printContainer").appendChild(c);var d=this;c.mozPrintCallback=function(e){var k=e.context;k.save();k.fillStyle="rgb(255, 255, 255)";k.fillRect(0,0,c.width,c.height);k.restore();k.scale(2,2);a.render({canvasContext:k,viewport:b}).then(function(){e.done();d.pdfPage.destroy()},function(a){console.error(a);"abort"in object?e.abort():e.done();d.pdfPage.destroy()})}};this.updateStats=function(){PDFJS.pdfBug&&
Stats.enabled&&Stats.add(this.id,this.stats)}},ThumbnailView=function(a,b,c){function d(){var a=document.createElement("canvas");a.id="thumbnail"+c;a.mozOpaque=!0;a.width=k;a.height=l;a.className="thumbnailImage";a.setAttribute("aria-label",mozL10n.get("thumb_page_canvas",{page:c},"Thumbnail of Page {{page}}"));p.setAttribute("data-loaded",!0);q.appendChild(a);a=a.getContext("2d");a.save();a.fillStyle="rgb(255, 255, 255)";a.fillRect(0,0,k,l);a.restore();return a}var e=document.createElement("a");
e.href=PDFView.getAnchorUrl("#page="+c);e.title=mozL10n.get("thumb_page_title",{page:c},"Page {{page}}");e.onclick=function(){PDFView.page=c;return!1};var j=0,f=(j+b.rotate)%360,h=b.getViewport(1,f),g=this.width=h.width,m=this.height=h.height;this.id=c;var k=98,l=k/this.width*this.height,n=this.scaleX=k/g;this.scaleY=l/m;var p=this.el=document.createElement("div");p.id="thumbnailContainer"+c;p.className="thumbnail";1===c&&p.classList.add("selected");var q=document.createElement("div");q.className=
"thumbnailSelectionRing";q.style.width=k+"px";q.style.height=l+"px";p.appendChild(q);e.appendChild(p);a.appendChild(e);this.hasImage=!1;this.renderingState=RenderingStates.INITIAL;this.updateRotation=function(a){j=a;f=(j+b.rotate)%360;h=b.getViewport(1,f);g=this.width=h.width;m=this.height=h.height;l=k/this.width*this.height;n=this.scaleX=k/g;this.scaleY=l/m;p.removeAttribute("data-loaded");q.textContent="";q.style.width=k+"px";q.style.height=l+"px";this.hasImage=!1;this.renderingState=RenderingStates.INITIAL;
this.resume=null};this.drawingRequired=function(){return!this.hasImage};this.draw=function(a){this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing");this.renderingState=RenderingStates.RUNNING;if(this.hasImage)a();else{var c=this,e=d(),j=b.getViewport(n,f);b.render({canvasContext:e,viewport:j,continueCallback:function(a){PDFView.highestPriorityPage!=="thumbnail"+c.id?(c.renderingState=RenderingStates.PAUSED,c.resume=function(){c.renderingState=RenderingStates.RUNNING;
a()}):a()}}).then(function(){c.renderingState=RenderingStates.FINISHED;a()},function(){c.renderingState=RenderingStates.FINISHED;a()});this.hasImage=!0}};this.setImage=function(a){if(!this.hasImage&&a){this.renderingState=RenderingStates.FINISHED;var b=d();b.drawImage(a,0,0,a.width,a.height,0,0,b.canvas.width,b.canvas.height);this.hasImage=!0}}},DocumentOutlineView=function(a){function b(a,b){a.href=PDFView.getDestinationHash(b.dest);a.onclick=function(){PDFView.navigateTo(b.dest);return!1}}for(var c=
document.getElementById("outlineView");c.firstChild;)c.removeChild(c.firstChild);if(a)for(c=[{parent:c,items:a}];0<c.length;){a=c.shift();var d,e=a.items.length;for(d=0;d<e;d++){var j=a.items[d],f=document.createElement("div");f.className="outlineItem";var h=document.createElement("a");b(h,j);h.textContent=j.title;f.appendChild(h);0<j.items.length&&(h=document.createElement("div"),h.className="outlineItems",f.appendChild(h),c.push({parent:h,items:j.items}));a.parent.appendChild(f)}}else a=document.createElement("div"),
a.classList.add("noOutline"),a.textContent=mozL10n.get("no_outline",null,"No Outline Available"),c.appendChild(a)},CustomStyle=function(){function a(){}var b=["ms","Moz","Webkit","O"],c={};a.getProp=function(a,e){if(1==arguments.length&&"string"==typeof c[a])return c[a];e=e||document.documentElement;var j=e.style,f,h;if("string"==typeof j[a])return c[a]=a;h=a.charAt(0).toUpperCase()+a.slice(1);for(var g=0,m=b.length;g<m;g++)if(f=b[g]+h,"string"==typeof j[f])return c[a]=f;return c[a]="undefined"};
a.setProp=function(a,b,c){a=this.getProp(a);"undefined"!=a&&(b.style[a]=c)};return a}(),TextLayerBuilder=function(a,b){var c=document.createDocumentFragment();this.textLayerDiv=a;this.divContentDone=this.layoutDone=!1;this.pageIdx=b;this.matches=[];this.beginLayout=function(){this.textDivs=[];this.textLayerQueue=[];this.renderingDone=!1};this.endLayout=function(){this.layoutDone=!0;this.insertDivContent()};this.renderLayer=function(){var a=this.textDivs,b=this.textLayerDiv,j=document.createElement("canvas").getContext("2d");
if(!(1E5<a.length)){for(var f=0,h=a.length;f<h;f++){var g=a[f];c.appendChild(g);j.font=g.style.fontSize+" "+g.style.fontFamily;var m=j.measureText(g.textContent).width;0<m&&(CustomStyle.setProp("transform",g,"scale("+g.dataset.canvasWidth/m+", 1)"),CustomStyle.setProp("transformOrigin",g,"0% 0%"),b.appendChild(g))}this.renderingDone=!0;this.updateMatches();b.appendChild(c)}};this.setupRenderLayoutTimer=function(){var a=this;200<Date.now()-PDFView.lastScroll?this.renderLayer():(this.renderTimer&&clearTimeout(this.renderTimer),
this.renderTimer=setTimeout(function(){a.setupRenderLayoutTimer()},200))};this.appendText=function(a){var b=document.createElement("div"),c=a.fontSize*a.vScale;b.dataset.canvasWidth=a.canvasWidth*a.hScale;b.dataset.fontName=a.fontName;b.style.fontSize=c+"px";b.style.fontFamily=a.fontFamily;b.style.left=a.x+"px";b.style.top=a.y-c+"px";this.textDivs.push(b)};this.insertDivContent=function(){if(this.layoutDone&&!this.divContentDone&&this.textContent){this.divContentDone=!0;for(var a=this.textDivs,b=
this.textContent.bidiTexts,c=0;c<b.length;c++){var f=b[c],h=a[c];h.textContent=f.str;h.dir=f.ltr?"ltr":"rtl"}this.setupRenderLayoutTimer()}};this.setTextContent=function(a){this.textContent=a;this.insertDivContent()};this.convertMatches=function(a){for(var b=0,c=0,f=this.textContent.bidiTexts,h=f.length-1,g=PDFFindController.state.query.length,m=[],k=0;k<a.length;k++){for(var l=a[k];b!==h&&l>=c+f[b].str.length;)c+=f[b].str.length,b++;b==f.length&&console.error("Could not find matching mapping");for(var n=
{begin:{divIdx:b,offset:l-c}},l=l+g;b!==h&&l>c+f[b].str.length;)c+=f[b].str.length,b++;n.end={divIdx:b,offset:l-c};m.push(n)}return m};this.renderMatches=function(a){function b(a,c){var d=a.divIdx,e=h[d];e.textContent="";var g=f[d].str.substring(0,a.offset),g=document.createTextNode(g);if(c){var d=m&&d===k,j=document.createElement("span");j.className=c+(d?" selected":"");j.appendChild(g);e.appendChild(j)}else e.appendChild(g)}function c(a,b,d){var e=a.divIdx,g=h[e];a=f[e].str.substring(a.offset,b.offset);
a=document.createTextNode(a);d?(b=document.createElement("span"),b.className=d,b.appendChild(a),g.appendChild(b)):g.appendChild(a)}if(0!==a.length){var f=this.textContent.bidiTexts,h=this.textDivs,g=null,m=this.pageIdx===PDFFindController.selected.pageIdx,k=PDFFindController.selected.matchIdx,l={divIdx:-1,offset:void 0},n=k,p=n+1;if(PDFFindController.state.highlightAll)n=0,p=a.length;else if(!m)return;for(;n<p;n++){var q=a[n],r=q.begin,q=q.end,s=m&&n===k,t=s?" selected":"";s&&scrollIntoView(h[r.divIdx],
{top:-50});!g||r.divIdx!==g.divIdx?(null!==g&&c(g,l),b(r)):c(g,r);if(r.divIdx===q.divIdx)c(r,q,"highlight"+t);else{c(r,l,"highlight begin"+t);for(g=r.divIdx+1;g<q.divIdx;g++)h[g].className="highlight middle"+t;b(q,"highlight end"+t)}g=q}g&&c(g,l)}};this.updateMatches=function(){if(this.renderingDone){for(var a=this.matches,b=this.textDivs,c=this.textContent.bidiTexts,f=-1,h=0;h<a.length;h++){for(var g=a[h],f=Math.max(f,g.begin.divIdx);f<=g.end.divIdx;f++){var m=b[f];m.textContent=c[f].str;m.className=
""}f=g.end.divIdx+1}PDFFindController.active&&(this.matches=this.convertMatches(PDFFindController.pageMatches[this.pageIdx]||[]),this.renderMatches(this.matches))}}};
document.addEventListener("DOMContentLoaded",function(){PDFView.initialize();var a=PDFView.parseQueryString(document.location.search.substring(1)).file||DEFAULT_URL;window.File&&(window.FileReader&&window.FileList&&window.Blob)&&(document.getElementById("fileInput").value=null);var b=document.location.hash.substring(1),b=PDFView.parseQueryString(b);"disableWorker"in b&&(PDFJS.disableWorker="true"===b.disableWorker);var c=navigator.language;"locale"in b&&(c=b.locale);mozL10n.setLanguage(c);if("textLayer"in
b)switch(b.textLayer){case "off":PDFJS.disableTextLayer=!0;break;case "visible":case "shadow":case "hover":document.getElementById("viewer").classList.add("textLayer-"+b.textLayer)}"pdfBug"in b&&(PDFJS.pdfBug=!0,b=b.pdfBug.split(","),PDFBug.enable(b),PDFBug.init());PDFView.supportsPrinting||document.getElementById("print").classList.add("hidden");PDFView.supportsFullscreen||document.getElementById("fullscreen").classList.add("hidden");PDFView.supportsIntegratedFind&&document.querySelector("#viewFind").classList.add("hidden");
PDFJS.LogManager.addLogger({warn:function(){PDFView.fallback()}});var d=document.getElementById("mainContainer"),e=document.getElementById("outerContainer");d.addEventListener("transitionend",function(a){a.target==d&&(a=document.createEvent("UIEvents"),a.initUIEvent("resize",!1,!1,window,0),window.dispatchEvent(a),e.classList.remove("sidebarMoving"))},!0);document.getElementById("sidebarToggle").addEventListener("click",function(){this.classList.toggle("toggled");e.classList.add("sidebarMoving");
e.classList.toggle("sidebarOpen");PDFView.sidebarOpen=e.classList.contains("sidebarOpen");PDFView.renderHighestPriority()});document.getElementById("viewThumbnail").addEventListener("click",function(){PDFView.switchSidebarView("thumbs")});document.getElementById("viewOutline").addEventListener("click",function(){PDFView.switchSidebarView("outline")});document.getElementById("previous").addEventListener("click",function(){PDFView.page--});document.getElementById("next").addEventListener("click",function(){PDFView.page++});
document.querySelector(".zoomIn").addEventListener("click",function(){PDFView.zoomIn()});document.querySelector(".zoomOut").addEventListener("click",function(){PDFView.zoomOut()});document.getElementById("fullscreen").addEventListener("click",function(){PDFView.fullscreen()});document.getElementById("print").addEventListener("click",function(){window.print()});document.getElementById("pageNumber").addEventListener("change",function(){PDFView.page=this.value});document.getElementById("scaleSelect").addEventListener("change",
function(){PDFView.parseScale(this.value)});document.getElementById("first_page").addEventListener("click",function(){PDFView.page=1});document.getElementById("last_page").addEventListener("click",function(){PDFView.page=PDFView.pdfDocument.numPages});document.getElementById("page_rotate_ccw").addEventListener("click",function(){PDFView.rotatePages(-90)});document.getElementById("page_rotate_cw").addEventListener("click",function(){PDFView.rotatePages(90)});PDFView.open(a,0)},!0);
function updateViewarea(){if(PDFView.initialized){var a=PDFView.getVisiblePages(),b=a.views;if(0!==b.length){PDFView.renderHighestPriority();for(var c=PDFView.page,a=a.first,d=0,e=b.length,j=!1;d<e;++d){var f=b[d];if(100>f.percent)break;if(f.id===PDFView.page){j=!0;break}}j||(c=b[0].id);PDFView.isFullscreen||(updateViewarea.inProgress=!0,PDFView.page=c,updateViewarea.inProgress=!1);var b=PDFView.currentScale,c=PDFView.currentScaleValue,h=c==b?100*b:c,g=a.id,b="#page="+g+("&zoom="+h),m=PDFView.pages[g-
1].getPagePoint(PDFView.container.scrollLeft,PDFView.container.scrollTop-a.y),b=b+(","+Math.round(m[0])+","+Math.round(m[1])),k=PDFView.store;k.initializedPromise.then(function(){k.set("exists",!0);k.set("page",g);k.set("zoom",h);k.set("scrollLeft",Math.round(m[0]));k.set("scrollTop",Math.round(m[1]))});PDFView.getAnchorUrl(b)}}}
window.addEventListener("resize",function(){PDFView.initialized&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageFitOption").selected||document.getElementById("pageAutoOption").selected)&&PDFView.parseScale(document.getElementById("scaleSelect").value);updateViewarea()});window.addEventListener("hashchange",function(){PDFView.setHash(document.location.hash.substring(1))});
window.addEventListener("change",function(a){var b=a.target.files;b&&0!=b.length&&(a=new FileReader,a.onload=function(a){a=new Uint8Array(a.target.result);PDFView.open(a,0)},b=b[0],a.readAsArrayBuffer(b),PDFView.setTitleUsingUrl(b.name))},!0);function selectScaleOption(a){for(var b=document.getElementById("scaleSelect").options,c=!1,d=0;d<b.length;d++){var e=b[d];e.value!=a?e.selected=!1:c=e.selected=!0}return c}
window.addEventListener("localized",function(){document.getElementsByTagName("html")[0].dir=mozL10n.getDirection()},!0);
window.addEventListener("scalechange",function(a){var b=document.getElementById("customScaleOption");b.selected=!1;if((a.resetAutoSettings||!document.getElementById("pageWidthOption").selected&&!document.getElementById("pageFitOption").selected&&!document.getElementById("pageAutoOption").selected)&&!selectScaleOption(""+a.scale))b.textContent=Math.round(1E4*a.scale)/100+"%",b.selected=!0;updateViewarea()},!0);
window.addEventListener("pagechange",function(a){a=a.pageNumber;if(PDFView.previousPageNumber!==a){document.getElementById("pageNumber").value=a;var b=document.querySelector(".thumbnail.selected");b&&b.classList.remove("selected");b=document.getElementById("thumbnailContainer"+a);b.classList.add("selected");var c=PDFView.getVisibleThumbs(),d=c.views.length;if(0<d){var e=c.first.id,c=1<d?c.last.id:e;(a<=e||a>=c)&&scrollIntoView(b)}}document.getElementById("previous").disabled=1>=a;document.getElementById("next").disabled=
a>=PDFView.pages.length},!0);window.addEventListener("DOMMouseScroll",function(a){if(a.ctrlKey){a.preventDefault();var b=a.detail;a=0<b?"zoomOut":"zoomIn";for(var c=0,b=Math.abs(b);c<b;c++)PDFView[a]()}else PDFView.isFullscreen&&PDFView.mouseScroll(-40*a.detail)},!1);window.addEventListener("mousemove",function(){PDFView.isFullscreen&&PDFView.showPresentationControls()},!1);window.addEventListener("mousedown",function(a){PDFView.isFullscreen&&0===a.button&&(a.preventDefault(),PDFView.page++)},!1);
window.addEventListener("keydown",function(a){var b=!1,c=(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0);if(1==c||8==c)switch(a.keyCode){case 70:PDFView.supportsIntegratedFind||(PDFFindBar.toggle(),b=!0);break;case 61:case 107:case 187:case 171:PDFView.zoomIn();b=!0;break;case 173:case 109:case 189:PDFView.zoomOut();b=!0;break;case 48:case 96:PDFView.parseScale(DEFAULT_SCALE,!0),b=!0}if(1==c||8==c||5==c||12==c)switch(a.keyCode){case 71:PDFView.supportsIntegratedFind||(PDFFindBar.dispatchEvent("again",
5==c||12==c),b=!0)}if(b)a.preventDefault();else{var d=document.activeElement;if(!d||!("INPUT"==d.tagName||"SELECT"==d.tagName)){for(var e=document.getElementById("toolbar");d;){if(d===e&&!PDFView.isFullscreen)return;d=d.parentNode}if(0==c)switch(a.keyCode){case 38:case 33:case 8:if(!PDFView.isFullscreen&&"page-fit"!==PDFView.currentScaleValue)break;case 37:if(PDFView.isHorizontalScrollbarEnabled)break;case 75:case 80:PDFView.page--;b=!0;break;case 40:case 34:case 32:if(!PDFView.isFullscreen&&"page-fit"!==
PDFView.currentScaleValue)break;case 39:if(PDFView.isHorizontalScrollbarEnabled)break;case 74:case 78:PDFView.page++;b=!0;break;case 36:PDFView.isFullscreen&&(PDFView.page=1,b=!0);break;case 35:PDFView.isFullscreen&&(PDFView.page=PDFView.pdfDocument.numPages,b=!0);break;case 82:PDFView.rotatePages(90)}if(4==c)switch(a.keyCode){case 82:PDFView.rotatePages(-90)}b&&(a.preventDefault(),PDFView.clearMouseScrollState())}}});window.addEventListener("beforeprint",function(){PDFView.beforePrint()});
window.addEventListener("afterprint",function(){PDFView.afterPrint()});(function(){function a(){!document.fullscreenElement&&(!document.mozFullScreen&&!document.webkitIsFullScreen)&&PDFView.exitFullscreen()}window.addEventListener("fullscreenchange",a,!1);window.addEventListener("mozfullscreenchange",a,!1);window.addEventListener("webkitfullscreenchange",a,!1)})();