first
This commit is contained in:
+661
@@ -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/>.
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# MuPDF.js
|
||||
|
||||
Welcome to the official MuPDF.js library from [Artifex](https://artifex.com).
|
||||
|
||||
Use [MuPDF](https://mupdf.com) in your JavaScript and TypeScript projects!
|
||||
|
||||
This library is powered by WebAssembly and can be used in all the usual
|
||||
JavaScript environments: Node, Bun, Firefox, Safari, Chrome, etc.
|
||||
|
||||
## License
|
||||
|
||||
MuPDF.js is available under Open Source
|
||||
[AGPL](https://www.gnu.org/licenses/agpl-3.0.html) and commercial license
|
||||
agreements.
|
||||
|
||||
> If you cannot meet the requirements of the AGPL, please contact
|
||||
> [Artifex](https://artifex.com/contact/mupdf-js) regarding a
|
||||
> commercial license.
|
||||
|
||||
## Installation
|
||||
|
||||
npm install mupdf
|
||||
|
||||
## Usage
|
||||
|
||||
The module is only available as an ESM module!
|
||||
|
||||
import mupdf from "mupdf"
|
||||
|
||||
var doc = mupdf.Document.openDocument("test.pdf")
|
||||
console.log(doc.countPages())
|
||||
|
||||
Check out the example projects to help you get started:
|
||||
|
||||
- [github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples](https://github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples)
|
||||
- [github.com/ArtifexSoftware/mupdf.js/tree/master/examples](https://github.com/ArtifexSoftware/mupdf.js/tree/master/examples)
|
||||
|
||||
## Documentation
|
||||
|
||||
- [MuPDF.js Reference](https://mupdf.readthedocs.io/en/latest/reference/javascript/)
|
||||
- [Getting Started & Examples](https://mupdfjs.readthedocs.io/en/latest/)
|
||||
|
||||
## Contact
|
||||
|
||||
Join the Discord at [#mupdf.js](https://discord.gg/zpyAHM7XtF) to chat with the
|
||||
developers directly.
|
||||
+572
@@ -0,0 +1,572 @@
|
||||
export default libmupdf_wasm
|
||||
declare function libmupdf_wasm(Module: any): Promise<Libmupdf>
|
||||
declare const _brand: unique symbol
|
||||
export type Pointer<B> = number & { readonly [_brand]: B }
|
||||
export { libmupdf_wasm }
|
||||
interface Libmupdf {
|
||||
UTF8ToString(ptr: Pointer<"char">): string,
|
||||
stringToUTF8(str: string, outPtr: Pointer<"char">, maxBytesToWrite: number): number,
|
||||
lengthBytesUTF8(str: string): number,
|
||||
HEAP8: Int8Array,
|
||||
HEAP16: Int16Array,
|
||||
HEAPU8: Uint8Array,
|
||||
HEAPU16: Uint16Array,
|
||||
HEAP32: Int32Array,
|
||||
HEAPU32: Uint32Array,
|
||||
HEAPF32: Float32Array,
|
||||
HEAPF64: Float64Array,
|
||||
|
||||
_wasm_init_context(): void,
|
||||
_wasm_malloc(size: number): Pointer<"void">,
|
||||
_wasm_free(p: Pointer<"void">): void,
|
||||
_wasm_enable_icc(): void,
|
||||
_wasm_disable_icc(): void,
|
||||
_wasm_set_user_css(text: Pointer<"char">): void,
|
||||
_wasm_empty_store(): void,
|
||||
_wasm_shrink_store(percent: number): boolean,
|
||||
_wasm_Memento_checkAllMemory(): void,
|
||||
_wasm_Memento_listBlocks(): void,
|
||||
_wasm_keep_buffer(p: Pointer<"fz_buffer">): Pointer<"fz_buffer">,
|
||||
_wasm_drop_buffer(p: Pointer<"fz_buffer">): void,
|
||||
_wasm_keep_stream(p: Pointer<"fz_stream">): Pointer<"fz_stream">,
|
||||
_wasm_drop_stream(p: Pointer<"fz_stream">): void,
|
||||
_wasm_keep_colorspace(p: Pointer<"fz_colorspace">): Pointer<"fz_colorspace">,
|
||||
_wasm_drop_colorspace(p: Pointer<"fz_colorspace">): void,
|
||||
_wasm_keep_pixmap(p: Pointer<"fz_pixmap">): Pointer<"fz_pixmap">,
|
||||
_wasm_drop_pixmap(p: Pointer<"fz_pixmap">): void,
|
||||
_wasm_keep_font(p: Pointer<"fz_font">): Pointer<"fz_font">,
|
||||
_wasm_drop_font(p: Pointer<"fz_font">): void,
|
||||
_wasm_keep_stroke_state(p: Pointer<"fz_stroke_state">): Pointer<"fz_stroke_state">,
|
||||
_wasm_drop_stroke_state(p: Pointer<"fz_stroke_state">): void,
|
||||
_wasm_keep_image(p: Pointer<"fz_image">): Pointer<"fz_image">,
|
||||
_wasm_drop_image(p: Pointer<"fz_image">): void,
|
||||
_wasm_keep_shade(p: Pointer<"fz_shade">): Pointer<"fz_shade">,
|
||||
_wasm_drop_shade(p: Pointer<"fz_shade">): void,
|
||||
_wasm_keep_path(p: Pointer<"fz_path">): Pointer<"fz_path">,
|
||||
_wasm_drop_path(p: Pointer<"fz_path">): void,
|
||||
_wasm_keep_text(p: Pointer<"fz_text">): Pointer<"fz_text">,
|
||||
_wasm_drop_text(p: Pointer<"fz_text">): void,
|
||||
_wasm_keep_device(p: Pointer<"fz_device">): Pointer<"fz_device">,
|
||||
_wasm_drop_device(p: Pointer<"fz_device">): void,
|
||||
_wasm_keep_display_list(p: Pointer<"fz_display_list">): Pointer<"fz_display_list">,
|
||||
_wasm_drop_display_list(p: Pointer<"fz_display_list">): void,
|
||||
_wasm_drop_stext_page(p: Pointer<"fz_stext_page">): void,
|
||||
_wasm_drop_document_writer(p: Pointer<"fz_document_writer">): void,
|
||||
_wasm_drop_outline_iterator(p: Pointer<"fz_outline_iterator">): void,
|
||||
_wasm_keep_document(p: Pointer<"any_document">): Pointer<"any_document">,
|
||||
_wasm_drop_document(p: Pointer<"any_document">): void,
|
||||
_wasm_keep_page(p: Pointer<"any_page">): Pointer<"any_page">,
|
||||
_wasm_drop_page(p: Pointer<"any_page">): void,
|
||||
_wasm_keep_link(p: Pointer<"fz_link">): Pointer<"fz_link">,
|
||||
_wasm_drop_link(p: Pointer<"fz_link">): void,
|
||||
_wasm_keep_outline(p: Pointer<"fz_outline">): Pointer<"fz_outline">,
|
||||
_wasm_drop_outline(p: Pointer<"fz_outline">): void,
|
||||
_wasm_pdf_keep_annot(p: Pointer<"pdf_annot">): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_drop_annot(p: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_keep_obj(p: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_drop_obj(p: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_keep_graft_map(p: Pointer<"pdf_graft_map">): Pointer<"pdf_graft_map">,
|
||||
_wasm_pdf_drop_graft_map(p: Pointer<"pdf_graft_map">): void,
|
||||
_wasm_buffer_get_data(p: Pointer<"fz_buffer">): Pointer<"void">,
|
||||
_wasm_buffer_get_len(p: Pointer<"fz_buffer">): number,
|
||||
_wasm_colorspace_get_type(p: Pointer<"fz_colorspace">): number,
|
||||
_wasm_colorspace_get_n(p: Pointer<"fz_colorspace">): number,
|
||||
_wasm_colorspace_get_name(p: Pointer<"fz_colorspace">): Pointer<"char">,
|
||||
_wasm_pixmap_get_w(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_h(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_x(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_y(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_n(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_stride(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_alpha(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_xres(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_yres(p: Pointer<"fz_pixmap">): number,
|
||||
_wasm_pixmap_get_colorspace(p: Pointer<"fz_pixmap">): Pointer<"fz_colorspace">,
|
||||
_wasm_pixmap_get_samples(p: Pointer<"fz_pixmap">): Pointer<"char">,
|
||||
_wasm_pixmap_set_xres(p: Pointer<"fz_pixmap">, v: number): void,
|
||||
_wasm_pixmap_set_yres(p: Pointer<"fz_pixmap">, v: number): void,
|
||||
_wasm_font_get_name(p: Pointer<"fz_font">): Pointer<"char">,
|
||||
_wasm_stroke_state_get_start_cap(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_start_cap(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_dash_cap(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_dash_cap(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_end_cap(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_end_cap(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_linejoin(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_linejoin(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_linewidth(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_linewidth(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_miterlimit(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_miterlimit(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_dash_phase(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_stroke_state_set_dash_phase(p: Pointer<"fz_stroke_state">, v: number): void,
|
||||
_wasm_stroke_state_get_dash_len(p: Pointer<"fz_stroke_state">): number,
|
||||
_wasm_image_get_w(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_h(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_n(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_bpc(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_xres(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_yres(p: Pointer<"fz_image">): number,
|
||||
_wasm_image_get_imagemask(p: Pointer<"fz_image">): boolean,
|
||||
_wasm_image_get_colorspace(p: Pointer<"fz_image">): Pointer<"fz_colorspace">,
|
||||
_wasm_image_get_mask(p: Pointer<"fz_image">): Pointer<"fz_image">,
|
||||
_wasm_outline_get_title(p: Pointer<"fz_outline">): Pointer<"char">,
|
||||
_wasm_outline_get_uri(p: Pointer<"fz_outline">): Pointer<"char">,
|
||||
_wasm_outline_get_next(p: Pointer<"fz_outline">): Pointer<"fz_outline">,
|
||||
_wasm_outline_get_down(p: Pointer<"fz_outline">): Pointer<"fz_outline">,
|
||||
_wasm_outline_get_is_open(p: Pointer<"fz_outline">): boolean,
|
||||
_wasm_outline_item_get_title(p: Pointer<"fz_outline_item">): Pointer<"char">,
|
||||
_wasm_outline_item_get_uri(p: Pointer<"fz_outline_item">): Pointer<"char">,
|
||||
_wasm_outline_item_get_is_open(p: Pointer<"fz_outline_item">): boolean,
|
||||
_wasm_link_get_rect(p: Pointer<"fz_link">): Pointer<"fz_rect">,
|
||||
_wasm_link_get_uri(p: Pointer<"fz_link">): Pointer<"char">,
|
||||
_wasm_link_get_next(p: Pointer<"fz_link">): Pointer<"fz_link">,
|
||||
_wasm_stext_page_get_mediabox(p: Pointer<"fz_stext_page">): Pointer<"fz_rect">,
|
||||
_wasm_stext_page_get_first_block(p: Pointer<"fz_stext_page">): Pointer<"fz_stext_block">,
|
||||
_wasm_stext_block_get_next(p: Pointer<"fz_stext_block">): Pointer<"fz_stext_block">,
|
||||
_wasm_stext_block_get_type(p: Pointer<"fz_stext_block">): number,
|
||||
_wasm_stext_block_get_bbox(p: Pointer<"fz_stext_block">): Pointer<"fz_rect">,
|
||||
_wasm_stext_block_get_first_line(p: Pointer<"fz_stext_block">): Pointer<"fz_stext_line">,
|
||||
_wasm_stext_block_get_transform(p: Pointer<"fz_stext_block">): Pointer<"fz_matrix">,
|
||||
_wasm_stext_block_get_image(p: Pointer<"fz_stext_block">): Pointer<"fz_image">,
|
||||
_wasm_stext_block_get_v_flags(p: Pointer<"fz_stext_block">): number,
|
||||
_wasm_stext_block_get_v_argb(p: Pointer<"fz_stext_block">): number,
|
||||
_wasm_stext_line_get_next(p: Pointer<"fz_stext_line">): Pointer<"fz_stext_line">,
|
||||
_wasm_stext_line_get_wmode(p: Pointer<"fz_stext_line">): number,
|
||||
_wasm_stext_line_get_dir(p: Pointer<"fz_stext_line">): Pointer<"fz_point">,
|
||||
_wasm_stext_line_get_bbox(p: Pointer<"fz_stext_line">): Pointer<"fz_rect">,
|
||||
_wasm_stext_line_get_first_char(p: Pointer<"fz_stext_line">): Pointer<"fz_stext_char">,
|
||||
_wasm_stext_char_get_next(p: Pointer<"fz_stext_char">): Pointer<"fz_stext_char">,
|
||||
_wasm_stext_char_get_c(p: Pointer<"fz_stext_char">): number,
|
||||
_wasm_stext_char_get_origin(p: Pointer<"fz_stext_char">): Pointer<"fz_point">,
|
||||
_wasm_stext_char_get_quad(p: Pointer<"fz_stext_char">): Pointer<"fz_quad">,
|
||||
_wasm_stext_char_get_size(p: Pointer<"fz_stext_char">): number,
|
||||
_wasm_stext_char_get_font(p: Pointer<"fz_stext_char">): Pointer<"fz_font">,
|
||||
_wasm_stext_char_get_argb(p: Pointer<"fz_stext_char">): number,
|
||||
_wasm_stext_char_get_bidi(p: Pointer<"fz_stext_char">): number,
|
||||
_wasm_link_dest_get_chapter(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_page(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_type(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_x(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_y(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_w(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_h(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_link_dest_get_zoom(p: Pointer<"fz_link_dest">): number,
|
||||
_wasm_pdf_layer_config_ui_get_text(p: Pointer<"pdf_layer_config_ui">): Pointer<"char">,
|
||||
_wasm_pdf_layer_config_ui_get_depth(p: Pointer<"pdf_layer_config_ui">): number,
|
||||
_wasm_pdf_layer_config_ui_get_type(p: Pointer<"pdf_layer_config_ui">): number,
|
||||
_wasm_pdf_layer_config_ui_get_selected(p: Pointer<"pdf_layer_config_ui">): number,
|
||||
_wasm_pdf_layer_config_ui_get_locked(p: Pointer<"pdf_layer_config_ui">): number,
|
||||
_wasm_pdf_filespec_params_get_filename(p: Pointer<"pdf_filespec_params">): Pointer<"char">,
|
||||
_wasm_pdf_filespec_params_get_mimetype(p: Pointer<"pdf_filespec_params">): Pointer<"char">,
|
||||
_wasm_pdf_filespec_params_get_size(p: Pointer<"pdf_filespec_params">): number,
|
||||
_wasm_pdf_filespec_params_get_created(p: Pointer<"pdf_filespec_params">): number,
|
||||
_wasm_pdf_filespec_params_get_modified(p: Pointer<"pdf_filespec_params">): number,
|
||||
_wasm_pdf_page_get_obj(p: Pointer<"any_page">): Pointer<"pdf_obj">,
|
||||
_wasm_new_buffer(capacity: number): Pointer<"fz_buffer">,
|
||||
_wasm_new_buffer_from_data(data: Pointer<"char">, size: number): Pointer<"fz_buffer">,
|
||||
_wasm_append_string(buf: Pointer<"fz_buffer">, str: Pointer<"char">): void,
|
||||
_wasm_append_byte(buf: Pointer<"fz_buffer">, c: number): void,
|
||||
_wasm_append_buffer(buf: Pointer<"fz_buffer">, src: Pointer<"fz_buffer">): void,
|
||||
_wasm_slice_buffer(buf: Pointer<"fz_buffer">, start: number, end: number): Pointer<"fz_buffer">,
|
||||
_wasm_string_from_buffer(buf: Pointer<"fz_buffer">): Pointer<"char">,
|
||||
_wasm_device_gray(): Pointer<"fz_colorspace">,
|
||||
_wasm_device_rgb(): Pointer<"fz_colorspace">,
|
||||
_wasm_device_bgr(): Pointer<"fz_colorspace">,
|
||||
_wasm_device_cmyk(): Pointer<"fz_colorspace">,
|
||||
_wasm_device_lab(): Pointer<"fz_colorspace">,
|
||||
_wasm_new_icc_colorspace(name: Pointer<"char">, buffer: Pointer<"fz_buffer">): Pointer<"fz_colorspace">,
|
||||
_wasm_new_stroke_state(dash_len: number): Pointer<"fz_stroke_state">,
|
||||
_wasm_stroke_state_get_dash_item(stroke: Pointer<"fz_stroke_state">, i: number): number,
|
||||
_wasm_stroke_state_set_dash_item(stroke: Pointer<"fz_stroke_state">, i: number, x: number): void,
|
||||
_wasm_new_base14_font(name: Pointer<"char">): Pointer<"fz_font">,
|
||||
_wasm_new_cjk_font(ordering: number): Pointer<"fz_font">,
|
||||
_wasm_new_font_from_buffer(name: Pointer<"char">, buf: Pointer<"fz_buffer">, subfont: number): Pointer<"fz_font">,
|
||||
_wasm_encode_character(font: Pointer<"fz_font">, unicode: number): number,
|
||||
_wasm_advance_glyph(font: Pointer<"fz_font">, glyph: number, wmode: number): number,
|
||||
_wasm_font_is_monospaced(font: Pointer<"fz_font">): number,
|
||||
_wasm_font_is_serif(font: Pointer<"fz_font">): number,
|
||||
_wasm_font_is_bold(font: Pointer<"fz_font">): number,
|
||||
_wasm_font_is_italic(font: Pointer<"fz_font">): number,
|
||||
_wasm_new_image_from_pixmap(pix: Pointer<"fz_pixmap">, mask: Pointer<"fz_image">): Pointer<"fz_image">,
|
||||
_wasm_new_image_from_buffer(buf: Pointer<"fz_buffer">): Pointer<"fz_image">,
|
||||
_wasm_get_pixmap_from_image(image: Pointer<"fz_image">): Pointer<"fz_pixmap">,
|
||||
_wasm_new_pixmap_from_page(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_new_pixmap_from_page_contents(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_pdf_new_pixmap_from_page_with_usage(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean, usage: Pointer<"char">, box: number): Pointer<"fz_pixmap">,
|
||||
_wasm_pdf_new_pixmap_from_page_contents_with_usage(page: Pointer<"any_page">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean, usage: Pointer<"char">, box: number): Pointer<"fz_pixmap">,
|
||||
_wasm_new_pixmap_with_bbox(colorspace: Pointer<"fz_colorspace">, bbox: Pointer<"fz_rect">, alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_clear_pixmap(pix: Pointer<"fz_pixmap">): void,
|
||||
_wasm_clear_pixmap_with_value(pix: Pointer<"fz_pixmap">, value: number): void,
|
||||
_wasm_invert_pixmap(pix: Pointer<"fz_pixmap">): void,
|
||||
_wasm_invert_pixmap_luminance(pix: Pointer<"fz_pixmap">): void,
|
||||
_wasm_gamma_pixmap(pix: Pointer<"fz_pixmap">, gamma: number): void,
|
||||
_wasm_tint_pixmap(pix: Pointer<"fz_pixmap">, black_hex_color: number, white_hex_color: number): void,
|
||||
_wasm_new_buffer_from_pixmap_as_png(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">,
|
||||
_wasm_new_buffer_from_pixmap_as_pam(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">,
|
||||
_wasm_new_buffer_from_pixmap_as_psd(pix: Pointer<"fz_pixmap">): Pointer<"fz_buffer">,
|
||||
_wasm_new_buffer_from_pixmap_as_jpeg(pix: Pointer<"fz_pixmap">, quality: number, invert_cmyk: boolean): Pointer<"fz_buffer">,
|
||||
_wasm_convert_pixmap(pixmap: Pointer<"fz_pixmap">, colorspace: Pointer<"fz_colorspace">, keep_alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_warp_pixmap(pixmap: Pointer<"fz_pixmap">, q: Pointer<"fz_quad">, w: number, h: number): Pointer<"fz_pixmap">,
|
||||
_wasm_bound_shade(shade: Pointer<"fz_shade">): Pointer<"fz_rect">,
|
||||
_wasm_new_display_list(mediabox: Pointer<"fz_rect">): Pointer<"fz_display_list">,
|
||||
_wasm_bound_display_list(list: Pointer<"fz_display_list">): Pointer<"fz_rect">,
|
||||
_wasm_run_display_list(display_list: Pointer<"fz_display_list">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_new_pixmap_from_display_list(display_list: Pointer<"fz_display_list">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_new_stext_page_from_display_list(display_list: Pointer<"fz_display_list">, option_string: Pointer<"char">): Pointer<"fz_stext_page">,
|
||||
_wasm_search_display_list(display_list: Pointer<"fz_display_list">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number,
|
||||
_wasm_new_path(): Pointer<"fz_path">,
|
||||
_wasm_moveto(path: Pointer<"fz_path">, x: number, y: number): void,
|
||||
_wasm_lineto(path: Pointer<"fz_path">, x: number, y: number): void,
|
||||
_wasm_curveto(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void,
|
||||
_wasm_curvetov(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void,
|
||||
_wasm_curvetoy(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void,
|
||||
_wasm_closepath(path: Pointer<"fz_path">): void,
|
||||
_wasm_rectto(path: Pointer<"fz_path">, x1: number, y1: number, x2: number, y2: number): void,
|
||||
_wasm_transform_path(path: Pointer<"fz_path">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_bound_path(path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): Pointer<"fz_rect">,
|
||||
_wasm_new_text(): Pointer<"fz_text">,
|
||||
_wasm_bound_text(text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): Pointer<"fz_rect">,
|
||||
_wasm_show_glyph(text: Pointer<"fz_text">, font: Pointer<"fz_font">, trm: Pointer<"fz_matrix">, gid: number, ucs: number, wmode: number): void,
|
||||
_wasm_show_string(text: Pointer<"fz_text">, font: Pointer<"fz_font">, trm: Pointer<"fz_matrix">, string: Pointer<"char">, wmode: number): Pointer<"fz_matrix">,
|
||||
_wasm_new_draw_device(ctm: Pointer<"fz_matrix">, dest: Pointer<"fz_pixmap">): Pointer<"fz_device">,
|
||||
_wasm_new_display_list_device(list: Pointer<"fz_display_list">): Pointer<"fz_device">,
|
||||
_wasm_close_device(dev: Pointer<"fz_device">): void,
|
||||
_wasm_fill_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, evenOdd: boolean, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void,
|
||||
_wasm_stroke_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void,
|
||||
_wasm_clip_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, evenOdd: boolean, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_clip_stroke_path(dev: Pointer<"fz_device">, path: Pointer<"fz_path">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_fill_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void,
|
||||
_wasm_stroke_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void,
|
||||
_wasm_clip_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_clip_stroke_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, stroke: Pointer<"fz_stroke_state">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_ignore_text(dev: Pointer<"fz_device">, text: Pointer<"fz_text">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_fill_shade(dev: Pointer<"fz_device">, shade: Pointer<"fz_shade">, ctm: Pointer<"fz_matrix">, alpha: number): void,
|
||||
_wasm_fill_image(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">, alpha: number): void,
|
||||
_wasm_fill_image_mask(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">, alpha: number): void,
|
||||
_wasm_clip_image_mask(dev: Pointer<"fz_device">, image: Pointer<"fz_image">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_pop_clip(dev: Pointer<"fz_device">): void,
|
||||
_wasm_begin_mask(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, luminosity: boolean, colorspace: Pointer<"fz_colorspace">, color: Pointer<"float">): void,
|
||||
_wasm_end_mask(dev: Pointer<"fz_device">): void,
|
||||
_wasm_begin_group(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, colorspace: Pointer<"fz_colorspace">, isolated: boolean, knockout: boolean, blendmode: number, alpha: number): void,
|
||||
_wasm_end_group(dev: Pointer<"fz_device">): void,
|
||||
_wasm_begin_tile(dev: Pointer<"fz_device">, area: Pointer<"fz_rect">, view: Pointer<"fz_rect">, xstep: number, ystep: number, ctm: Pointer<"fz_matrix">, id: number, doc_id: number): number,
|
||||
_wasm_end_tile(dev: Pointer<"fz_device">): void,
|
||||
_wasm_begin_layer(dev: Pointer<"fz_device">, name: Pointer<"char">): void,
|
||||
_wasm_end_layer(dev: Pointer<"fz_device">): void,
|
||||
_wasm_new_document_writer_with_buffer(buf: Pointer<"fz_buffer">, format: Pointer<"char">, options: Pointer<"char">): Pointer<"fz_document_writer">,
|
||||
_wasm_begin_page(wri: Pointer<"fz_document_writer">, mediabox: Pointer<"fz_rect">): Pointer<"fz_device">,
|
||||
_wasm_end_page(wri: Pointer<"fz_document_writer">): void,
|
||||
_wasm_close_document_writer(wri: Pointer<"fz_document_writer">): void,
|
||||
_wasm_print_stext_page_as_json(page: Pointer<"fz_stext_page">, scale: number): Pointer<"char">,
|
||||
_wasm_search_stext_page(text: Pointer<"fz_stext_page">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number,
|
||||
_wasm_snap_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">, mode: number): Pointer<"fz_quad">,
|
||||
_wasm_copy_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">): Pointer<"char">,
|
||||
_wasm_highlight_selection(text: Pointer<"fz_stext_page">, a: Pointer<"fz_point">, b: Pointer<"fz_point">, hits: Pointer<"fz_quad">, n: number): number,
|
||||
_wasm_print_stext_page_as_html(page: Pointer<"fz_stext_page">, id: number): Pointer<"char">,
|
||||
_wasm_print_stext_page_as_text(page: Pointer<"fz_stext_page">): Pointer<"char">,
|
||||
_wasm_open_document_with_buffer(magic: Pointer<"char">, buffer: Pointer<"fz_buffer">): Pointer<"any_document">,
|
||||
_wasm_open_document_with_stream(magic: Pointer<"char">, stream: Pointer<"fz_stream">): Pointer<"any_document">,
|
||||
_wasm_format_link_uri(doc: Pointer<"any_document">, ch: number, pg: number, ty: number, x: number, y: number, w: number, h: number, z: number): Pointer<"char">,
|
||||
_wasm_needs_password(doc: Pointer<"any_document">): number,
|
||||
_wasm_authenticate_password(doc: Pointer<"any_document">, password: Pointer<"char">): number,
|
||||
_wasm_has_permission(doc: Pointer<"any_document">, perm: number): number,
|
||||
_wasm_count_pages(doc: Pointer<"any_document">): number,
|
||||
_wasm_load_page(doc: Pointer<"any_document">, number: number): Pointer<"any_page">,
|
||||
_wasm_lookup_metadata(doc: Pointer<"any_document">, key: Pointer<"char">): Pointer<"char">,
|
||||
_wasm_set_metadata(doc: Pointer<"any_document">, key: Pointer<"char">, value: Pointer<"char">): void,
|
||||
_wasm_resolve_link(doc: Pointer<"any_document">, uri: Pointer<"char">): number,
|
||||
_wasm_resolve_link_dest(doc: Pointer<"any_document">, uri: Pointer<"char">): Pointer<"fz_link_dest">,
|
||||
_wasm_load_outline(doc: Pointer<"any_document">): Pointer<"fz_outline">,
|
||||
_wasm_outline_get_page(doc: Pointer<"any_document">, outline: Pointer<"fz_outline">): number,
|
||||
_wasm_style_document(doc: Pointer<"any_document">, publisher_css: boolean, user_css: Pointer<"char">): void,
|
||||
_wasm_layout_document(doc: Pointer<"any_document">, w: number, h: number, em: number): void,
|
||||
_wasm_is_document_reflowable(doc: Pointer<"any_document">): boolean,
|
||||
_wasm_link_set_rect(link: Pointer<"fz_link">, rect: Pointer<"fz_rect">): void,
|
||||
_wasm_link_set_uri(link: Pointer<"fz_link">, uri: Pointer<"char">): void,
|
||||
_wasm_bound_page(page: Pointer<"any_page">, box_type: number): Pointer<"fz_rect">,
|
||||
_wasm_load_links(page: Pointer<"any_page">): Pointer<"fz_link">,
|
||||
_wasm_create_link(page: Pointer<"any_page">, bbox: Pointer<"fz_rect">, uri: Pointer<"char">): Pointer<"fz_link">,
|
||||
_wasm_delete_link(page: Pointer<"any_page">, link: Pointer<"fz_link">): void,
|
||||
_wasm_run_page(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_run_page_contents(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_run_page_annots(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_run_page_widgets(page: Pointer<"any_page">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_new_stext_page_from_page(page: Pointer<"any_page">, option_string: Pointer<"char">): Pointer<"fz_stext_page">,
|
||||
_wasm_new_display_list_from_page(page: Pointer<"any_page">): Pointer<"fz_display_list">,
|
||||
_wasm_new_display_list_from_page_contents(page: Pointer<"any_page">): Pointer<"fz_display_list">,
|
||||
_wasm_page_label(page: Pointer<"any_page">): Pointer<"char">,
|
||||
_wasm_search_page(page: Pointer<"any_page">, needle: Pointer<"char">, marks: Pointer<"int">, hits: Pointer<"fz_quad">, hit_max: number, options: Pointer<"char">): number,
|
||||
_wasm_new_outline_iterator(doc: Pointer<"any_document">): Pointer<"fz_outline_iterator">,
|
||||
_wasm_outline_iterator_next(iter: Pointer<"fz_outline_iterator">): number,
|
||||
_wasm_outline_iterator_prev(iter: Pointer<"fz_outline_iterator">): number,
|
||||
_wasm_outline_iterator_up(iter: Pointer<"fz_outline_iterator">): number,
|
||||
_wasm_outline_iterator_down(iter: Pointer<"fz_outline_iterator">): number,
|
||||
_wasm_outline_iterator_delete(iter: Pointer<"fz_outline_iterator">): number,
|
||||
_wasm_outline_iterator_item(iter: Pointer<"fz_outline_iterator">): Pointer<"fz_outline_item">,
|
||||
_wasm_outline_iterator_insert(iter: Pointer<"fz_outline_iterator">, title: Pointer<"char">, uri: Pointer<"char">, is_open: boolean): number,
|
||||
_wasm_outline_iterator_update(iter: Pointer<"fz_outline_iterator">, title: Pointer<"char">, uri: Pointer<"char">, is_open: boolean): void,
|
||||
_wasm_pdf_document_from_fz_document(document: Pointer<"any_document">): Pointer<"any_document">,
|
||||
_wasm_pdf_page_from_fz_page(page: Pointer<"any_page">): Pointer<"any_page">,
|
||||
_wasm_pdf_create_document(): Pointer<"any_document">,
|
||||
_wasm_pdf_version(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_was_repaired(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_has_unsaved_changes(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_can_be_saved_incrementally(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_count_versions(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_count_unsaved_versions(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_validate_change_history(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_enable_journal(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_undoredo_state_position(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_undoredo_state_count(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_undoredo_step(doc: Pointer<"any_document">, step: number): Pointer<"char">,
|
||||
_wasm_pdf_begin_operation(doc: Pointer<"any_document">, op: Pointer<"char">): void,
|
||||
_wasm_pdf_begin_implicit_operation(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_end_operation(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_abandon_operation(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_undo(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_redo(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_can_undo(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_can_redo(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_document_language(doc: Pointer<"any_document">): Pointer<"char">,
|
||||
_wasm_pdf_set_document_language(doc: Pointer<"any_document">, str: Pointer<"char">): void,
|
||||
_wasm_pdf_trailer(doc: Pointer<"any_document">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_xref_len(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_lookup_page_obj(doc: Pointer<"any_document">, index: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_add_object(doc: Pointer<"any_document">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_create_object(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_delete_object(doc: Pointer<"any_document">, num: number): void,
|
||||
_wasm_pdf_add_stream(doc: Pointer<"any_document">, buf: Pointer<"fz_buffer">, obj: Pointer<"pdf_obj">, compress: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_add_simple_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">, encoding: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_add_cjk_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">, ordering: number, wmode: number, serif: boolean): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_add_cid_font(doc: Pointer<"any_document">, font: Pointer<"fz_font">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_add_image(doc: Pointer<"any_document">, image: Pointer<"fz_image">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_load_image(doc: Pointer<"any_document">, ref: Pointer<"pdf_obj">): Pointer<"fz_image">,
|
||||
_wasm_pdf_set_page_tree_cache(doc: Pointer<"any_document">, enabled: boolean): void,
|
||||
_wasm_pdf_add_page(doc: Pointer<"any_document">, mediabox: Pointer<"fz_rect">, rotate: number, resources: Pointer<"pdf_obj">, contents: Pointer<"fz_buffer">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_insert_page(doc: Pointer<"any_document">, index: number, obj: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_delete_page(doc: Pointer<"any_document">, index: number): void,
|
||||
_wasm_pdf_set_page_labels(doc: Pointer<"any_document">, index: number, style: number, prefix: Pointer<"char">, start: number): void,
|
||||
_wasm_pdf_delete_page_labels(doc: Pointer<"any_document">, index: number): void,
|
||||
_wasm_pdf_is_embedded_file(ref: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_get_filespec_params(ref: Pointer<"pdf_obj">): Pointer<"pdf_filespec_params">,
|
||||
_wasm_pdf_add_embedded_file(doc: Pointer<"any_document">, filename: Pointer<"char">, mimetype: Pointer<"char">, contents: Pointer<"fz_buffer">, created: number, modified: number, checksum: boolean): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_load_embedded_file_contents(fs: Pointer<"pdf_obj">): Pointer<"fz_buffer">,
|
||||
_wasm_pdf_write_document_buffer(doc: Pointer<"any_document">, options: Pointer<"char">): Pointer<"fz_buffer">,
|
||||
_wasm_pdf_js_supported(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_enable_js(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_disable_js(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_rearrange_pages(doc: Pointer<"any_document">, n: number, pages: Pointer<"int">): void,
|
||||
_wasm_pdf_subset_fonts(doc: Pointer<"any_document">): void,
|
||||
_wasm_pdf_bake_document(doc: Pointer<"any_document">, bake_annots: boolean, bake_widgets: boolean): void,
|
||||
_wasm_pdf_count_layer_configs(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_layer_config_creator(doc: Pointer<"any_document">, config: number): Pointer<"char">,
|
||||
_wasm_pdf_layer_config_name(doc: Pointer<"any_document">, config: number): Pointer<"char">,
|
||||
_wasm_pdf_select_layer_config(doc: Pointer<"any_document">, config: number): void,
|
||||
_wasm_pdf_count_layer_config_uis(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_layer_config_ui_info(doc: Pointer<"any_document">, configui: number): Pointer<"pdf_layer_config_ui">,
|
||||
_wasm_pdf_count_layers(doc: Pointer<"any_document">): number,
|
||||
_wasm_pdf_layer_name(doc: Pointer<"any_document">, layer: number): Pointer<"char">,
|
||||
_wasm_pdf_layer_is_enabled(doc: Pointer<"any_document">, layer: number): number,
|
||||
_wasm_pdf_enable_layer(doc: Pointer<"any_document">, layer: number, state: number): void,
|
||||
_wasm_pdf_page_transform(page: Pointer<"any_page">): Pointer<"fz_matrix">,
|
||||
_wasm_pdf_set_page_box(page: Pointer<"any_page">, which: number, rect: Pointer<"fz_rect">): void,
|
||||
_wasm_pdf_first_annot(page: Pointer<"any_page">): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_next_annot(annot: Pointer<"pdf_annot">): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_first_widget(page: Pointer<"any_page">): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_next_widget(annot: Pointer<"pdf_annot">): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_create_annot(page: Pointer<"any_page">, type: number): Pointer<"pdf_annot">,
|
||||
_wasm_pdf_delete_annot(page: Pointer<"any_page">, annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_update_page(page: Pointer<"any_page">): number,
|
||||
_wasm_pdf_redact_page(page: Pointer<"any_page">, black_boxes: number, image_method: number, line_art_method: number, text_method: number): void,
|
||||
_wasm_pdf_new_graft_map(doc: Pointer<"any_document">): Pointer<"pdf_graft_map">,
|
||||
_wasm_pdf_graft_mapped_object(map: Pointer<"pdf_graft_map">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_graft_object(dst: Pointer<"any_document">, obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_graft_mapped_page(map: Pointer<"pdf_graft_map">, to: number, src: Pointer<"any_document">, from: number): void,
|
||||
_wasm_pdf_graft_page(dst: Pointer<"any_document">, to: number, src: Pointer<"any_document">, from: number): void,
|
||||
_wasm_pdf_bound_annot(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">,
|
||||
_wasm_pdf_run_annot(annot: Pointer<"pdf_annot">, dev: Pointer<"fz_device">, ctm: Pointer<"fz_matrix">): void,
|
||||
_wasm_pdf_new_pixmap_from_annot(annot: Pointer<"pdf_annot">, ctm: Pointer<"fz_matrix">, colorspace: Pointer<"fz_colorspace">, alpha: boolean): Pointer<"fz_pixmap">,
|
||||
_wasm_pdf_new_display_list_from_annot(annot: Pointer<"pdf_annot">): Pointer<"fz_display_list">,
|
||||
_wasm_pdf_update_annot(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_obj(annot: Pointer<"pdf_annot">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_annot_type(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_flags(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_flags(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_contents(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_contents(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_name(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_name(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_author(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_author(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_subject(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_subject(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_creation_date(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_creation_date(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_modification_date(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_modification_date(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_border_width(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_border_width(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_border_style(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_border_style(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_border_effect(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_border_effect(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_border_effect_intensity(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_border_effect_intensity(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_opacity(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_opacity(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_filespec(annot: Pointer<"pdf_annot">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_set_annot_filespec(annot: Pointer<"pdf_annot">, v: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_annot_quadding(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_quadding(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_is_open(annot: Pointer<"pdf_annot">): boolean,
|
||||
_wasm_pdf_set_annot_is_open(annot: Pointer<"pdf_annot">, v: boolean): void,
|
||||
_wasm_pdf_annot_hidden_for_editing(annot: Pointer<"pdf_annot">): boolean,
|
||||
_wasm_pdf_set_annot_hidden_for_editing(annot: Pointer<"pdf_annot">, v: boolean): void,
|
||||
_wasm_pdf_annot_icon_name(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_icon_name(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_intent(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_intent(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_callout_style(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_callout_style(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_line_leader(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_line_leader(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_line_leader_extension(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_line_leader_extension(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_line_leader_offset(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_line_leader_offset(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_line_caption(annot: Pointer<"pdf_annot">): boolean,
|
||||
_wasm_pdf_set_annot_line_caption(annot: Pointer<"pdf_annot">, v: boolean): void,
|
||||
_wasm_pdf_annot_rich_defaults(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_rich_defaults(annot: Pointer<"pdf_annot">, v: Pointer<"char">): void,
|
||||
_wasm_pdf_annot_callout_point(annot: Pointer<"pdf_annot">): Pointer<"fz_point">,
|
||||
_wasm_pdf_annot_line_caption_offset(annot: Pointer<"pdf_annot">): Pointer<"fz_point">,
|
||||
_wasm_pdf_annot_rect(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">,
|
||||
_wasm_pdf_annot_popup(annot: Pointer<"pdf_annot">): Pointer<"fz_rect">,
|
||||
_wasm_pdf_annot_quad_point_count(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_quad_point(annot: Pointer<"pdf_annot">, idx: number): Pointer<"fz_quad">,
|
||||
_wasm_pdf_annot_vertex_count(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_vertex(annot: Pointer<"pdf_annot">, idx: number): Pointer<"fz_point">,
|
||||
_wasm_pdf_annot_ink_list_count(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_ink_list_stroke_count(annot: Pointer<"pdf_annot">, idx: number): number,
|
||||
_wasm_pdf_annot_ink_list_stroke_vertex(annot: Pointer<"pdf_annot">, a: number, b: number): Pointer<"fz_point">,
|
||||
_wasm_pdf_annot_rich_contents(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_annot_border_dash_count(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_border_dash_item(annot: Pointer<"pdf_annot">, idx: number): number,
|
||||
_wasm_pdf_annot_has_rect(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_ink_list(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_quad_points(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_vertices(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_line(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_interior_color(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_line_ending_styles(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_border(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_border_effect(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_icon_name(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_open(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_author(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_subject(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_filespec(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_callout(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_has_rich_contents(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_language(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_set_annot_language(annot: Pointer<"pdf_annot">, str: Pointer<"char">): void,
|
||||
_wasm_pdf_set_annot_popup(annot: Pointer<"pdf_annot">, rect: Pointer<"fz_rect">): void,
|
||||
_wasm_pdf_set_annot_rect(annot: Pointer<"pdf_annot">, rect: Pointer<"fz_rect">): void,
|
||||
_wasm_pdf_clear_annot_quad_points(annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_clear_annot_vertices(annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_clear_annot_ink_list(annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_clear_annot_border_dash(annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_add_annot_quad_point(annot: Pointer<"pdf_annot">, quad: Pointer<"fz_quad">): void,
|
||||
_wasm_pdf_add_annot_vertex(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_add_annot_ink_list_stroke(annot: Pointer<"pdf_annot">): void,
|
||||
_wasm_pdf_add_annot_ink_list_stroke_vertex(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_add_annot_border_dash_item(annot: Pointer<"pdf_annot">, v: number): void,
|
||||
_wasm_pdf_annot_line_ending_styles_start(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_line_1(annot: Pointer<"pdf_annot">): Pointer<"fz_point">,
|
||||
_wasm_pdf_annot_line_2(annot: Pointer<"pdf_annot">): Pointer<"fz_point">,
|
||||
_wasm_pdf_set_annot_line(annot: Pointer<"pdf_annot">, a: Pointer<"fz_point">, b: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_set_annot_callout_point(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_annot_callout_line(annot: Pointer<"pdf_annot">, line: Pointer<"fz_point">): number,
|
||||
_wasm_pdf_set_annot_callout_line(annot: Pointer<"pdf_annot">, n: number, a: Pointer<"fz_point">, b: Pointer<"fz_point">, c: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_set_annot_line_caption_offset(annot: Pointer<"pdf_annot">, point: Pointer<"fz_point">): void,
|
||||
_wasm_pdf_annot_line_ending_styles_end(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_line_ending_styles(annot: Pointer<"pdf_annot">, start: number, end: number): void,
|
||||
_wasm_pdf_annot_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number,
|
||||
_wasm_pdf_annot_interior_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number,
|
||||
_wasm_pdf_set_annot_color(annot: Pointer<"pdf_annot">, n: number, color: Pointer<"float">): void,
|
||||
_wasm_pdf_set_annot_interior_color(annot: Pointer<"pdf_annot">, n: number, color: Pointer<"float">): void,
|
||||
_wasm_pdf_set_annot_default_appearance(annot: Pointer<"pdf_annot">, font: Pointer<"char">, size: number, ncolor: number, color: Pointer<"float">): void,
|
||||
_wasm_pdf_annot_default_appearance_font(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_annot_default_appearance_size(annot: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_default_appearance_color(annot: Pointer<"pdf_annot">, color: Pointer<"float">): number,
|
||||
_wasm_pdf_set_annot_rich_contents(annot: Pointer<"pdf_annot">, plain: Pointer<"char">, rich: Pointer<"char">): void,
|
||||
_wasm_pdf_set_annot_stamp_image(annot: Pointer<"pdf_annot">, img: Pointer<"fz_image">): void,
|
||||
_wasm_pdf_set_annot_appearance_from_display_list(annot: Pointer<"pdf_annot">, appearance: Pointer<"char">, state: Pointer<"char">, ctm: Pointer<"fz_matrix">, list: Pointer<"fz_display_list">): void,
|
||||
_wasm_pdf_set_annot_appearance(annot: Pointer<"pdf_annot">, appearance: Pointer<"char">, state: Pointer<"char">, ctm: Pointer<"fz_matrix">, bbox: Pointer<"fz_rect">, resources: Pointer<"pdf_obj">, contents: Pointer<"fz_buffer">): void,
|
||||
_wasm_pdf_apply_redaction(annot: Pointer<"pdf_annot">, black_boxes: number, image_method: number, line_art_method: number, text_method: number): void,
|
||||
_wasm_pdf_reset_form(doc: Pointer<"any_document">, fields: Pointer<"pdf_obj">, exclude: number): void,
|
||||
_wasm_pdf_annot_field_type(widget: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_field_flags(widget: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_field_label(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_annot_field_value(annot: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_load_field_name(widget: Pointer<"pdf_annot">): Pointer<"char">,
|
||||
_wasm_pdf_annot_text_widget_max_len(widget: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_set_annot_text_field_value(widget: Pointer<"pdf_annot">, value: Pointer<"char">): number,
|
||||
_wasm_pdf_set_annot_choice_field_value(widget: Pointer<"pdf_annot">, value: Pointer<"char">): number,
|
||||
_wasm_pdf_annot_choice_field_option_count(widget: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_annot_choice_field_option(widget: Pointer<"pdf_annot">, is_export: boolean, i: number): Pointer<"char">,
|
||||
_wasm_pdf_toggle_widget(widget: Pointer<"pdf_annot">): number,
|
||||
_wasm_pdf_is_indirect(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_bool(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_int(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_real(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_number(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_name(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_string(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_array(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_dict(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_is_stream(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_to_num(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_to_bool(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_to_real(obj: Pointer<"pdf_obj">): number,
|
||||
_wasm_pdf_to_name(obj: Pointer<"pdf_obj">): Pointer<"char">,
|
||||
_wasm_pdf_to_text_string(obj: Pointer<"pdf_obj">): Pointer<"char">,
|
||||
_wasm_pdf_new_indirect(doc: Pointer<"any_document">, num: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_array(doc: Pointer<"any_document">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_dict(doc: Pointer<"any_document">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_bool(v: boolean): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_int(v: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_real(v: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_name(v: Pointer<"char">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_text_string(v: Pointer<"char">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_new_string(ptr: Pointer<"char">, len: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_resolve_indirect(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_array_len(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_array_get(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_get(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_len(obj: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_get_key(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_get_val(obj: Pointer<"pdf_obj">, idx: number): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_get_inheritable(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_gets(obj: Pointer<"pdf_obj">, key: Pointer<"char">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_gets_inheritable(obj: Pointer<"pdf_obj">, key: Pointer<"char">): Pointer<"pdf_obj">,
|
||||
_wasm_pdf_dict_put(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">, val: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_dict_puts(obj: Pointer<"pdf_obj">, key: Pointer<"char">, val: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_dict_del(obj: Pointer<"pdf_obj">, key: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_dict_dels(obj: Pointer<"pdf_obj">, key: Pointer<"char">): void,
|
||||
_wasm_pdf_array_put(obj: Pointer<"pdf_obj">, key: number, val: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_array_push(obj: Pointer<"pdf_obj">, val: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_array_delete(obj: Pointer<"pdf_obj">, key: number): void,
|
||||
_wasm_pdf_sprint_obj(obj: Pointer<"pdf_obj">, tight: boolean, ascii: boolean): Pointer<"char">,
|
||||
_wasm_pdf_load_stream(obj: Pointer<"pdf_obj">): Pointer<"fz_buffer">,
|
||||
_wasm_pdf_load_raw_stream(obj: Pointer<"pdf_obj">): Pointer<"fz_buffer">,
|
||||
_wasm_pdf_update_object(doc: Pointer<"any_document">, num: number, obj: Pointer<"pdf_obj">): void,
|
||||
_wasm_pdf_update_stream(doc: Pointer<"any_document">, ref: Pointer<"pdf_obj">, buf: Pointer<"fz_buffer">, raw: number): void,
|
||||
_wasm_pdf_to_string(obj: Pointer<"pdf_obj">, size: Pointer<"int">): Pointer<"char">,
|
||||
_wasm_new_stream(id: number): Pointer<"fz_stream">,
|
||||
_wasm_walk_path(path: Pointer<"fz_path">, walk_id: number): void,
|
||||
_wasm_walk_text(text: Pointer<"fz_text">, walk_id: number): void,
|
||||
_wasm_enable_log_callback(enable: boolean): void,
|
||||
_wasm_new_js_device(id: number): Pointer<"fz_device">,
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+940
@@ -0,0 +1,940 @@
|
||||
import { Pointer } from "./mupdf-wasm.js";
|
||||
declare global {
|
||||
var $libmupdf_wasm_Module: any;
|
||||
}
|
||||
export declare const memento: {
|
||||
listBlocks(): void;
|
||||
checkAllMemory(): void;
|
||||
};
|
||||
export type Matrix = [number, number, number, number, number, number];
|
||||
export type Rect = [number, number, number, number];
|
||||
export type Quad = [number, number, number, number, number, number, number, number];
|
||||
export type Point = [number, number];
|
||||
export type Color = [number] | [number, number, number] | [number, number, number, number];
|
||||
export type AnnotColor = [] | Color;
|
||||
export type Rotate = 0 | 90 | 180 | 270;
|
||||
export declare const Matrix: {
|
||||
identity: Matrix;
|
||||
scale(sx: number, sy: number): Matrix;
|
||||
translate(tx: number, ty: number): Matrix;
|
||||
rotate(d: number): Matrix;
|
||||
invert(m: Matrix): Matrix;
|
||||
concat(one: Matrix, two: Matrix): Matrix;
|
||||
};
|
||||
export declare const Rect: {
|
||||
MIN_INF_RECT: number;
|
||||
MAX_INF_RECT: number;
|
||||
empty: number[];
|
||||
invalid: number[];
|
||||
infinite: number[];
|
||||
isEmpty: (rect: Rect) => boolean;
|
||||
isValid: (rect: Rect) => boolean;
|
||||
isInfinite: (rect: Rect) => boolean;
|
||||
transform: (rect: Rect, matrix: Matrix) => Rect;
|
||||
};
|
||||
export declare function enableICC(): void;
|
||||
export declare function disableICC(): void;
|
||||
export declare function setUserCSS(text: string): void;
|
||||
export declare function emptyStore(): void;
|
||||
export declare function shrinkStore(percent: number): boolean;
|
||||
export declare function installLoadFontFunction(f: (name: string, script: string, bold: boolean, italic: boolean) => Font | null): void;
|
||||
interface Log {
|
||||
error?(message: string): void;
|
||||
warning?(message: string): void;
|
||||
}
|
||||
declare global {
|
||||
function $libmupdf_log_error(message: Pointer<"char">): void;
|
||||
function $libmupdf_log_warning(message: Pointer<"char">): void;
|
||||
}
|
||||
export declare function setLog(log: Log | ((message: string) => void) | null): void;
|
||||
/** The types that can be automatically converted into a Buffer object */
|
||||
type AnyBuffer = Buffer | ArrayBuffer | Uint8Array | string;
|
||||
declare abstract class Userdata<B> {
|
||||
private static _finalizer;
|
||||
static readonly _drop: (pointer: any) => void;
|
||||
pointer: Pointer<B>;
|
||||
constructor(pointer: Pointer<B>);
|
||||
destroy(): void;
|
||||
toString(): string;
|
||||
valueOf(): void;
|
||||
}
|
||||
export declare class Buffer extends Userdata<"fz_buffer"> {
|
||||
static readonly _drop: (p: Pointer<"fz_buffer">) => void;
|
||||
/** New empty Buffer. */
|
||||
constructor();
|
||||
/** New Buffer initialized with string contents as UTF-8. */
|
||||
constructor(data: string);
|
||||
/** New Buffer initialized with typed array contents. */
|
||||
constructor(data: ArrayBuffer | Uint8Array);
|
||||
/** PRIVATE */
|
||||
constructor(pointer: Pointer<"fz_buffer">);
|
||||
get length(): number;
|
||||
set length(_: number);
|
||||
getLength(): number;
|
||||
readByte(at: number): number;
|
||||
write(s: string): void;
|
||||
writeByte(b: number): void;
|
||||
writeLine(s: string): void;
|
||||
writeBuffer(other: AnyBuffer): void;
|
||||
asUint8Array(): Uint8Array<ArrayBufferLike>;
|
||||
slice(start: number, end?: number): Buffer;
|
||||
asString(): string;
|
||||
save(filename: string): void;
|
||||
}
|
||||
export type ColorSpaceType = "None" | "Gray" | "RGB" | "BGR" | "CMYK" | "Lab" | "Indexed" | "Separation";
|
||||
export declare class ColorSpace extends Userdata<"fz_colorspace"> {
|
||||
static readonly _drop: (p: Pointer<"fz_colorspace">) => void;
|
||||
static readonly COLORSPACE_TYPES: ColorSpaceType[];
|
||||
constructor(profile: AnyBuffer, name: string);
|
||||
constructor(pointer: Pointer<"fz_colorspace">);
|
||||
getName(): string;
|
||||
getType(): ColorSpaceType;
|
||||
getNumberOfComponents(): number;
|
||||
isGray(): boolean;
|
||||
isRGB(): boolean;
|
||||
isCMYK(): boolean;
|
||||
isIndexed(): boolean;
|
||||
isLab(): boolean;
|
||||
isDeviceN(): boolean;
|
||||
isSubtractive(): boolean;
|
||||
toString(): string;
|
||||
static readonly DeviceGray: ColorSpace;
|
||||
static readonly DeviceRGB: ColorSpace;
|
||||
static readonly DeviceBGR: ColorSpace;
|
||||
static readonly DeviceCMYK: ColorSpace;
|
||||
static readonly Lab: ColorSpace;
|
||||
}
|
||||
export type FontSimpleEncoding = "Latin" | "Greek" | "Cyrillic";
|
||||
export type FontCJKOrdering = 0 | 1 | 2 | 3;
|
||||
export type FontCJKLanguage = "Adobe-CNS1" | "Adobe-GB1" | "Adobe-Japan1" | "Adobe-Korea1" | "zh-Hant" | "zh-TW" | "zh-HK" | "zh-Hans" | "zh-CN" | "ja" | "ko";
|
||||
export declare class Font extends Userdata<"fz_font"> {
|
||||
static readonly _drop: (p: Pointer<"fz_font">) => void;
|
||||
static readonly SIMPLE_ENCODING: FontSimpleEncoding[];
|
||||
static readonly SIMPLE_ENCODING_LATIN = "Latin";
|
||||
static readonly SIMPLE_ENCODING_GREEK = "Greek";
|
||||
static readonly SIMPLE_ENCODING_CYRILLIC = "Cyrillic";
|
||||
static readonly ADOBE_CNS = 0;
|
||||
static readonly ADOBE_GB = 1;
|
||||
static readonly ADOBE_JAPAN = 2;
|
||||
static readonly ADOBE_KOREA = 3;
|
||||
static readonly CJK_ORDERING_BY_LANG: Record<FontCJKLanguage, FontCJKOrdering>;
|
||||
constructor(name: string);
|
||||
constructor(name: string, filename: string, subfont?: number);
|
||||
constructor(name: string, data: AnyBuffer, subfont?: number);
|
||||
constructor(pointer: Pointer<"fz_font">);
|
||||
getName(): string;
|
||||
encodeCharacter(uni: number | string): number;
|
||||
advanceGlyph(gid: number, wmode?: number): number;
|
||||
isMono(): boolean;
|
||||
isSerif(): boolean;
|
||||
isBold(): boolean;
|
||||
isItalic(): boolean;
|
||||
}
|
||||
export declare class Image extends Userdata<"fz_image"> {
|
||||
static readonly _drop: (p: Pointer<"fz_image">) => void;
|
||||
constructor(pointer: Pointer<"fz_image">);
|
||||
constructor(filename: string);
|
||||
constructor(data: AnyBuffer);
|
||||
constructor(pixmap: Pixmap, mask?: Image);
|
||||
getWidth(): number;
|
||||
getHeight(): number;
|
||||
getNumberOfComponents(): number;
|
||||
getBitsPerComponent(): number;
|
||||
getXResolution(): number;
|
||||
getYResolution(): number;
|
||||
getImageMask(): boolean;
|
||||
getColorSpace(): ColorSpace | null;
|
||||
getMask(): Image | null;
|
||||
toPixmap(): Pixmap;
|
||||
}
|
||||
export type LineCap = "Butt" | "Round" | "Square" | "Triangle";
|
||||
export type LineJoin = "Miter" | "Round" | "Bevel" | "MiterXPS";
|
||||
export type StrokeStateData = {
|
||||
lineCap: LineCap;
|
||||
lineJoin: LineJoin;
|
||||
lineWidth: number;
|
||||
miterLimit: number;
|
||||
dashPhase?: number;
|
||||
dashes?: number[];
|
||||
};
|
||||
export declare class StrokeState extends Userdata<"fz_stroke_state"> {
|
||||
static readonly _drop: (p: Pointer<"fz_stroke_state">) => void;
|
||||
static readonly LINE_CAP: LineCap[];
|
||||
static readonly LINE_JOIN: LineJoin[];
|
||||
constructor(data: Pointer<"fz_stroke_state"> | StrokeStateData);
|
||||
getLineCap(): number;
|
||||
getLineJoin(): number;
|
||||
getLineWidth(): number;
|
||||
getMiterLimit(): number;
|
||||
getDashPhase(): number;
|
||||
getDashes(): number[] | null;
|
||||
}
|
||||
interface PathWalker {
|
||||
moveTo?(x: number, y: number): void;
|
||||
lineTo?(x: number, y: number): void;
|
||||
curveTo?(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
|
||||
closePath?(): void;
|
||||
}
|
||||
export declare class Path extends Userdata<"fz_path"> {
|
||||
static readonly _drop: (p: Pointer<"fz_path">) => void;
|
||||
constructor(pointer?: Pointer<"fz_path">);
|
||||
getBounds(strokeState: StrokeState, transform: Matrix): Rect;
|
||||
moveTo(x: number, y: number): void;
|
||||
lineTo(x: number, y: number): void;
|
||||
curveTo(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number): void;
|
||||
curveToV(cx: number, cy: number, ex: number, ey: number): void;
|
||||
curveToY(cx: number, cy: number, ex: number, ey: number): void;
|
||||
closePath(): void;
|
||||
rect(x1: number, y1: number, x2: number, y2: number): void;
|
||||
transform(matrix: Matrix): void;
|
||||
walk(walker: PathWalker): void;
|
||||
}
|
||||
interface TextWalker {
|
||||
beginSpan?(font: Font, trm: Matrix, wmode: number, bidi: number, markupDirection: number, language: string): void;
|
||||
showGlyph?(font: Font, trm: Matrix, glyph: number, unicode: number, wmode: number, bidi: number): void;
|
||||
endSpan?(): void;
|
||||
}
|
||||
export declare class Text extends Userdata<"fz_text"> {
|
||||
static readonly _drop: (p: Pointer<"fz_text">) => void;
|
||||
constructor(pointer?: Pointer<"fz_text">);
|
||||
getBounds(strokeState: StrokeState, transform: Matrix): Rect;
|
||||
showGlyph(font: Font, trm: Matrix, gid: number, uni: number, wmode?: number): void;
|
||||
showString(font: Font, trm: Matrix, str: string, wmode?: number): Matrix;
|
||||
walk(walker: TextWalker): void;
|
||||
}
|
||||
export declare class DisplayList extends Userdata<"fz_display_list"> {
|
||||
static readonly _drop: (p: Pointer<"fz_display_list">) => void;
|
||||
constructor(pointer: Pointer<"fz_display_list">);
|
||||
constructor(mediabox: Rect);
|
||||
getBounds(): Rect;
|
||||
toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean): Pixmap;
|
||||
toStructuredText(options: any): StructuredText;
|
||||
run(device: Device, matrix: Matrix): void;
|
||||
search(needle: string, options: any): Quad[][];
|
||||
}
|
||||
export declare class Pixmap extends Userdata<"fz_pixmap"> {
|
||||
static readonly _drop: (p: Pointer<"fz_pixmap">) => void;
|
||||
constructor(pointer: Pointer<"fz_pixmap">);
|
||||
constructor(colorspace: ColorSpace, bbox: Rect, alpha: boolean);
|
||||
getBounds(): number[];
|
||||
clear(value?: number): void;
|
||||
getWidth(): number;
|
||||
getHeight(): number;
|
||||
getX(): number;
|
||||
getY(): number;
|
||||
getStride(): number;
|
||||
getNumberOfComponents(): number;
|
||||
getAlpha(): number;
|
||||
getXResolution(): number;
|
||||
getYResolution(): number;
|
||||
setResolution(x: number, y: number): void;
|
||||
getColorSpace(): ColorSpace | null;
|
||||
getPixels(): Uint8ClampedArray<ArrayBufferLike>;
|
||||
asPNG(): Uint8Array<ArrayBufferLike>;
|
||||
asPSD(): Uint8Array<ArrayBufferLike>;
|
||||
asPAM(): Uint8Array<ArrayBufferLike>;
|
||||
asJPEG(quality: number, invert_cmyk?: boolean): Uint8Array<ArrayBufferLike>;
|
||||
invert(): void;
|
||||
invertLuminance(): void;
|
||||
gamma(p: number): void;
|
||||
tint(black: number | Color, white: number | Color): void;
|
||||
convertToColorSpace(colorspace: ColorSpace, keepAlpha?: boolean): Pixmap;
|
||||
warp(points: Point[], width: number, height: number): Pixmap;
|
||||
}
|
||||
export declare class Shade extends Userdata<"fz_shade"> {
|
||||
static readonly _drop: (p: Pointer<"fz_shade">) => void;
|
||||
getBounds(): Rect;
|
||||
}
|
||||
interface StructuredTextWalker {
|
||||
onImageBlock?(bbox: Rect, transform: Matrix, image: Image): void;
|
||||
beginTextBlock?(bbox: Rect): void;
|
||||
beginLine?(bbox: Rect, wmode: number, direction: Point): void;
|
||||
onChar?(c: string, origin: Point, font: Font, size: number, quad: Quad, color: Color, bidi: number): void;
|
||||
endLine?(): void;
|
||||
endTextBlock?(): void;
|
||||
onVector?(bbox: Rect, flags: any, color: Color): void;
|
||||
}
|
||||
type SelectMode = "chars" | "words" | "lines";
|
||||
export declare class StructuredText extends Userdata<"fz_stext_page"> {
|
||||
static readonly _drop: (p: Pointer<"fz_stext_page">) => void;
|
||||
static readonly SELECT_MODE: SelectMode[];
|
||||
static readonly SELECT_CHARS = "chars";
|
||||
static readonly SELECT_WORDS = "words";
|
||||
static readonly SELECT_LINES = "lines";
|
||||
walk(walker: StructuredTextWalker): void;
|
||||
asJSON(scale?: number): string;
|
||||
asHTML(id: number): string;
|
||||
asText(): string;
|
||||
snap(p: Point, q: Point, mode: SelectMode): Quad;
|
||||
copy(p: Point, q: Point): string;
|
||||
highlight(p: Point, q: Point, max_hits?: number): Quad[];
|
||||
search(needle: string, options: any): Quad[][];
|
||||
}
|
||||
export type BlendMode = "Normal" | "Multiply" | "Screen" | "Overlay" | "Darken" | "Lighten" | "ColorDodge" | "ColorBurn" | "HardLight" | "SoftLight" | "Difference" | "Exclusion" | "Hue" | "Saturation" | "Color" | "Luminosity";
|
||||
export declare class Device extends Userdata<"fz_device"> {
|
||||
static readonly _drop: (p: Pointer<"fz_device">) => void;
|
||||
static readonly BLEND_MODES: BlendMode[];
|
||||
static readonly BLEND_NORMAL = "Normal";
|
||||
static readonly BLEND_MULTIPLY = "Multiply";
|
||||
static readonly BLEND_SCREEN = "Screen";
|
||||
static readonly BLEND_OVERLAY = "Overlay";
|
||||
static readonly BLEND_DARKEN = "Darken";
|
||||
static readonly BLEND_LIGHTEN = "Lighten";
|
||||
static readonly BLEND_COLOR_DODGE = "ColorDodge";
|
||||
static readonly BLEND_COLOR_BURN = "ColorBurn";
|
||||
static readonly BLEND_HARD_LIGHT = "HardLight";
|
||||
static readonly BLEND_SOFT_LIGHT = "SoftLight";
|
||||
static readonly BLEND_DIFFERENCE = "Difference";
|
||||
static readonly BLEND_EXCLUSION = "Exclusion";
|
||||
static readonly BLEND_HUE = "Hue";
|
||||
static readonly BLEND_SATURATION = "Saturation";
|
||||
static readonly BLEND_COLOR = "Color";
|
||||
static readonly BLEND_LUMINOSITY = "Luminosity";
|
||||
constructor(callbacks: DeviceFunctions);
|
||||
constructor(pointer: Pointer<"fz_device">);
|
||||
fillPath(path: Path, evenOdd: boolean, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void;
|
||||
strokePath(path: Path, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void;
|
||||
clipPath(path: Path, evenOdd: boolean, ctm: Matrix): void;
|
||||
clipStrokePath(path: Path, stroke: StrokeState, ctm: Matrix): void;
|
||||
fillText(text: Text, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void;
|
||||
strokeText(text: Text, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void;
|
||||
clipText(text: Text, ctm: Matrix): void;
|
||||
clipStrokeText(text: Text, stroke: StrokeState, ctm: Matrix): void;
|
||||
ignoreText(text: Text, ctm: Matrix): void;
|
||||
fillShade(shade: Shade, ctm: Matrix, alpha: number): void;
|
||||
fillImage(image: Image, ctm: Matrix, alpha: number): void;
|
||||
fillImageMask(image: Image, ctm: Matrix, colorspace: ColorSpace, color: Color, alpha: number): void;
|
||||
clipImageMask(image: Image, ctm: Matrix): void;
|
||||
popClip(): void;
|
||||
beginMask(area: Rect, luminosity: boolean, colorspace: ColorSpace, color: Color): void;
|
||||
endMask(): void;
|
||||
beginGroup(area: Rect, colorspace: ColorSpace, isolated: boolean, knockout: boolean, blendmode: BlendMode, alpha: number): void;
|
||||
endGroup(): void;
|
||||
beginTile(area: Rect, view: Rect, xstep: number, ystep: number, ctm: Matrix, id: number, doc_id: number): number;
|
||||
endTile(): void;
|
||||
beginLayer(name: string): void;
|
||||
endLayer(): void;
|
||||
close(): void;
|
||||
}
|
||||
export declare class DrawDevice extends Device {
|
||||
constructor(matrix: Matrix, pixmap: Pixmap);
|
||||
}
|
||||
export declare class DisplayListDevice extends Device {
|
||||
constructor(displayList: DisplayList);
|
||||
}
|
||||
export declare class DocumentWriter extends Userdata<"fz_document_writer"> {
|
||||
static readonly _drop: (p: Pointer<"fz_document_writer">) => void;
|
||||
constructor(buffer: Buffer, format: string, options: any);
|
||||
beginPage(mediabox: Rect): Device;
|
||||
endPage(): void;
|
||||
close(): void;
|
||||
}
|
||||
export type DocumentPermission = "print" | "copy" | "edit" | "annotate" | "form" | "accessibility" | "assemble" | "print-hq";
|
||||
export declare class LinkDestination {
|
||||
static readonly LINK_DEST: LinkDestType[];
|
||||
static readonly FIT = "Fit";
|
||||
static readonly FIT_B = "FitB";
|
||||
static readonly FIT_H = "FitH";
|
||||
static readonly FIT_BH = "FitBH";
|
||||
static readonly FIT_V = "FitV";
|
||||
static readonly FIT_BV = "FitBV";
|
||||
static readonly FIT_R = "FitR";
|
||||
static readonly XYZ = "XYZ";
|
||||
type: LinkDestType;
|
||||
chapter: number;
|
||||
page: number;
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
zoom: number;
|
||||
constructor(chapter?: number, page?: number, type?: LinkDestType, x?: number, y?: number, width?: number, height?: number, zoom?: number);
|
||||
}
|
||||
export declare class Document extends Userdata<"any_document"> {
|
||||
static readonly _drop: (p: Pointer<"any_document">) => void;
|
||||
static readonly META_FORMAT = "format";
|
||||
static readonly META_ENCRYPTION = "encryption";
|
||||
static readonly META_INFO_AUTHOR = "info:Author";
|
||||
static readonly META_INFO_TITLE = "info:Title";
|
||||
static readonly META_INFO_SUBJECT = "info:Subject";
|
||||
static readonly META_INFO_KEYWORDS = "info:Keywords";
|
||||
static readonly META_INFO_CREATOR = "info:Creator";
|
||||
static readonly META_INFO_PRODUCER = "info:Producer";
|
||||
static readonly META_INFO_CREATIONDATE = "info:CreationDate";
|
||||
static readonly META_INFO_MODIFICATIONDATE = "info:ModDate";
|
||||
static readonly PERMISSION_PRINT = "print";
|
||||
static readonly PERMISSION_COPY = "copy";
|
||||
static readonly PERMISSION_EDIT = "eedit";
|
||||
static readonly PERMISSION_ANNOTATE = "annotate";
|
||||
static readonly PERMISSION_FORM = "form";
|
||||
static readonly PERMISSION_ACCESSIBILITY = "accessibility";
|
||||
static readonly PERMISSION_ASSEMBLE = "assemble";
|
||||
static readonly PERMISSION_PRINT_HQ = "print-hq";
|
||||
static readonly PERMISSION: Record<DocumentPermission, number>;
|
||||
static openDocument(from: Buffer | ArrayBuffer | Uint8Array | Stream | string, magic?: string): Document;
|
||||
formatLinkURI(dest: LinkDest): string;
|
||||
asPDF(): (this & PDFDocument) | null;
|
||||
isPDF(): boolean;
|
||||
needsPassword(): boolean;
|
||||
authenticatePassword(password: string): number;
|
||||
hasPermission(perm: DocumentPermission): boolean;
|
||||
getMetaData(key: string): string | undefined;
|
||||
setMetaData(key: string, value: string): void;
|
||||
countPages(): number;
|
||||
isReflowable(): void;
|
||||
style(publisherCSS: boolean, userCSS: string): void;
|
||||
layout(w: number, h: number, em: number): void;
|
||||
loadPage(index: number): PDFPage | Page;
|
||||
loadOutline(): OutlineItem[] | null;
|
||||
resolveLink(link: string | Link): number;
|
||||
resolveLinkDestination(link: string | Link): LinkDest;
|
||||
outlineIterator(): OutlineIterator;
|
||||
}
|
||||
interface OutlineItem {
|
||||
title: string | undefined;
|
||||
uri: string | undefined;
|
||||
open: boolean;
|
||||
down?: OutlineItem[];
|
||||
page?: number;
|
||||
}
|
||||
export declare class OutlineIterator extends Userdata<"fz_outline_iterator"> {
|
||||
static readonly _drop: (p: Pointer<"fz_outline_iterator">) => void;
|
||||
static readonly ITERATOR_DID_NOT_MOVE = -1;
|
||||
static readonly ITERATOR_AT_ITEM = 0;
|
||||
static readonly ITERATOR_AT_EMPTY = 1;
|
||||
static readonly FLAG_BOLD = 1;
|
||||
static readonly FLAG_ITALIC = 2;
|
||||
item(): OutlineItem | null;
|
||||
next(): number;
|
||||
prev(): number;
|
||||
up(): number;
|
||||
down(): number;
|
||||
delete(): number;
|
||||
insert(item: OutlineItem): number;
|
||||
update(item: OutlineItem): void;
|
||||
}
|
||||
export type LinkDestType = "Fit" | "FitB" | "FitH" | "FitBH" | "FitV" | "FitBV" | "FitR" | "XYZ";
|
||||
interface LinkDest {
|
||||
type: LinkDestType;
|
||||
chapter: number;
|
||||
page: number;
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
zoom: number;
|
||||
}
|
||||
export declare class Link extends Userdata<"fz_link"> {
|
||||
static readonly _drop: (p: Pointer<"fz_link">) => void;
|
||||
getBounds(): Rect;
|
||||
setBounds(rect: Rect): void;
|
||||
getURI(): string;
|
||||
setURI(uri: string): void;
|
||||
isExternal(): boolean;
|
||||
}
|
||||
export type PageBox = "MediaBox" | "CropBox" | "BleedBox" | "TrimBox" | "ArtBox";
|
||||
export declare class Page extends Userdata<"any_page"> {
|
||||
static readonly _drop: (p: Pointer<"any_page">) => void;
|
||||
static readonly BOXES: PageBox[];
|
||||
static readonly MEDIA_BOX = "MediaBox";
|
||||
static readonly CROP_BOX = "CropBox";
|
||||
static readonly BLEED_BOX = "BleedBox";
|
||||
static readonly TRIM_BOX = "TrimBox";
|
||||
static readonly ART_BOX = "ArtBox";
|
||||
isPDF(): boolean;
|
||||
getBounds(box?: PageBox): Rect;
|
||||
getLabel(): string;
|
||||
run(device: Device, matrix: Matrix): void;
|
||||
runPageContents(device: Device, matrix: Matrix): void;
|
||||
runPageAnnots(device: Device, matrix: Matrix): void;
|
||||
runPageWidgets(device: Device, matrix: Matrix): void;
|
||||
toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean, showExtras?: boolean): Pixmap;
|
||||
toDisplayList(showExtras?: boolean): DisplayList;
|
||||
toStructuredText(options: any): StructuredText;
|
||||
getLinks(): Link[];
|
||||
createLink(bbox: Rect, uri: string): Link;
|
||||
deleteLink(link: Link): void;
|
||||
search(needle: string, options: any): Quad[][];
|
||||
}
|
||||
export declare class PDFDocument extends Document {
|
||||
constructor();
|
||||
constructor(filename: string);
|
||||
constructor(data: Buffer | ArrayBuffer | Uint8Array | Stream);
|
||||
constructor(clone: PDFDocument);
|
||||
constructor(pointer: Pointer<"any_document">);
|
||||
loadPage(index: number): PDFPage;
|
||||
_fromPDFObjectNew(ptr: Pointer<"pdf_obj">): PDFObject;
|
||||
_fromPDFObjectKeep(ptr: Pointer<"pdf_obj">): PDFObject;
|
||||
_toPDFObject(obj: any): PDFObject;
|
||||
_PDFOBJ(obj: any): Pointer<"pdf_obj">;
|
||||
getVersion(): number;
|
||||
getLanguage(): string | null;
|
||||
setLanguage(lang: string): void;
|
||||
countObjects(): number;
|
||||
getTrailer(): PDFObject;
|
||||
createObject(): PDFObject;
|
||||
newNull(): PDFObject;
|
||||
newBoolean(v: boolean): PDFObject;
|
||||
newInteger(v: number): PDFObject;
|
||||
newReal(v: number): PDFObject;
|
||||
newName(v: string): PDFObject;
|
||||
newString(v: string): PDFObject;
|
||||
newByteString(v: Uint8Array | number[]): PDFObject;
|
||||
newIndirect(v: number): PDFObject;
|
||||
newArray(): PDFObject;
|
||||
newDictionary(): PDFObject;
|
||||
deleteObject(num: number | PDFObject): void;
|
||||
addObject(obj: any): PDFObject;
|
||||
addStream(buf: AnyBuffer, obj: any): PDFObject;
|
||||
addRawStream(buf: AnyBuffer, obj: any): PDFObject;
|
||||
newGraftMap(): PDFGraftMap;
|
||||
graftObject(obj: PDFObject): PDFObject;
|
||||
graftPage(to: number, srcDoc: PDFDocument, srcPage: number): void;
|
||||
addSimpleFont(font: Font, encoding?: FontSimpleEncoding): PDFObject;
|
||||
addCJKFont(font: Font, lang: FontCJKOrdering | FontCJKLanguage, wmode?: number, serif?: boolean): PDFObject;
|
||||
addFont(font: Font): PDFObject;
|
||||
addImage(image: Image): PDFObject;
|
||||
loadImage(ref: PDFObject): Image;
|
||||
findPage(index: number): PDFObject;
|
||||
setPageTreeCache(enabled: boolean): void;
|
||||
addPage(mediabox: Rect, rotate: Rotate, resources: any, contents: AnyBuffer): PDFObject;
|
||||
insertPage(at: number, obj: PDFObject): void;
|
||||
deletePage(at: number): void;
|
||||
isEmbeddedFile(ref: PDFObject): boolean;
|
||||
addEmbeddedFile(filename: string, mimetype: string, contents: AnyBuffer, created: Date, modified: Date, checksum?: boolean): PDFObject;
|
||||
getFilespecParams(ref: PDFObject): {
|
||||
filename: string;
|
||||
mimetype: string;
|
||||
size: Pointer<"char">;
|
||||
creationDate: Date;
|
||||
modificationDate: Date;
|
||||
};
|
||||
getEmbeddedFileContents(ref: PDFObject): Buffer | null;
|
||||
getEmbeddedFiles(): Record<string, PDFObject>;
|
||||
loadNameTree(treeName: string): Record<string, PDFObject>;
|
||||
insertEmbeddedFile(filename: string, filespec: PDFObject): void;
|
||||
deleteEmbeddedFile(filename: string): void;
|
||||
_rewriteEmbeddedFiles(efs: Record<string, PDFObject>): void;
|
||||
saveToBuffer(options: any): Buffer;
|
||||
save(filename: string, options: any): void;
|
||||
static readonly PAGE_LABEL_NONE = "\0";
|
||||
static readonly PAGE_LABEL_DECIMAL = "D";
|
||||
static readonly PAGE_LABEL_ROMAN_UC = "R";
|
||||
static readonly PAGE_LABEL_ROMAN_LC = "r";
|
||||
static readonly PAGE_LABEL_ALPHA_UC = "A";
|
||||
static readonly PAGE_LABEL_ALPHA_LC = "a";
|
||||
setPageLabels(index: number, style?: string, prefix?: string, start?: number): void;
|
||||
deletePageLabels(index: number): void;
|
||||
wasRepaired(): boolean;
|
||||
hasUnsavedChanges(): boolean;
|
||||
countVersions(): number;
|
||||
countUnsavedVersions(): number;
|
||||
validateChangeHistory(): number;
|
||||
canBeSavedIncrementally(): boolean;
|
||||
enableJournal(): void;
|
||||
getJournal(): {
|
||||
position: number;
|
||||
steps: string[];
|
||||
};
|
||||
beginOperation(op: string): void;
|
||||
beginImplicitOperation(): void;
|
||||
endOperation(): void;
|
||||
abandonOperation(): void;
|
||||
canUndo(): boolean;
|
||||
canRedo(): boolean;
|
||||
undo(): void;
|
||||
redo(): void;
|
||||
isJSSupported(): boolean;
|
||||
enableJS(): void;
|
||||
disableJS(): void;
|
||||
setJSEventListener(_listener: any): void;
|
||||
rearrangePages(pages: number[]): void;
|
||||
subsetFonts(): void;
|
||||
bake(bakeAnnots?: boolean, bakeWidgets?: boolean): void;
|
||||
countLayerConfigs(): number;
|
||||
getLayerConfigCreator(config: number): string;
|
||||
getLayerConfigName(config: number): string;
|
||||
selectLayerConfig(config: number): void;
|
||||
countLayerConfigUIs(): number;
|
||||
getLayerConfigUIInfo(configui: number): Object;
|
||||
countLayers(): number;
|
||||
isLayerVisible(layer: number): boolean;
|
||||
setLayerVisible(layer: number, visible: boolean): void;
|
||||
getLayerName(layer: number): string;
|
||||
resetForm(fields: PDFObject, exclude: boolean): void;
|
||||
}
|
||||
export declare class PDFPage extends Page {
|
||||
_doc: PDFDocument;
|
||||
_annots: PDFAnnotation[] | null;
|
||||
_widgets: PDFWidget[] | null;
|
||||
constructor(doc: PDFDocument, pointer: Pointer<"any_page">);
|
||||
getObject(): PDFObject;
|
||||
getTransform(): Matrix;
|
||||
setPageBox(box: PageBox, rect: Rect): void;
|
||||
toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean, showExtras?: boolean, usage?: string, box?: PageBox): Pixmap;
|
||||
getWidgets(): PDFWidget[];
|
||||
getAnnotations(): PDFAnnotation[];
|
||||
createAnnotation(type: PDFAnnotationType): PDFAnnotation;
|
||||
deleteAnnotation(annot: PDFAnnotation): void;
|
||||
static readonly REDACT_IMAGE_NONE = 0;
|
||||
static readonly REDACT_IMAGE_REMOVE = 1;
|
||||
static readonly REDACT_IMAGE_PIXELS = 2;
|
||||
static readonly REDACT_IMAGE_UNLESS_INVISIBLE = 3;
|
||||
static readonly REDACT_LINE_ART_NONE = 0;
|
||||
static readonly REDACT_LINE_ART_REMOVE_IF_COVERED = 1;
|
||||
static readonly REDACT_LINE_ART_REMOVE_IF_TOUCHED = 2;
|
||||
static readonly REDACT_TEXT_REMOVE = 0;
|
||||
static readonly REDACT_TEXT_NONE = 1;
|
||||
applyRedactions(black_boxes?: boolean, image_method?: number, line_art_method?: number, text_method?: number): void;
|
||||
update(): boolean;
|
||||
}
|
||||
type PDFObjectPath = Array<number | string | PDFObject>;
|
||||
export declare class PDFObject extends Userdata<"pdf_obj"> {
|
||||
static readonly _drop: (p: Pointer<"pdf_obj">) => void;
|
||||
static readonly Null: PDFObject;
|
||||
_doc: PDFDocument;
|
||||
constructor(doc: PDFDocument, pointer: Pointer<"pdf_obj">);
|
||||
isNull(): boolean;
|
||||
isIndirect(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isInteger(): boolean;
|
||||
isReal(): boolean;
|
||||
isNumber(): boolean;
|
||||
isName(): boolean;
|
||||
isString(): boolean;
|
||||
isArray(): boolean;
|
||||
isDictionary(): boolean;
|
||||
isStream(): boolean;
|
||||
asIndirect(): number;
|
||||
asBoolean(): boolean;
|
||||
asNumber(): number;
|
||||
asName(): string;
|
||||
asString(): string;
|
||||
asByteString(): Uint8Array<ArrayBuffer>;
|
||||
readStream(): Buffer;
|
||||
readRawStream(): Buffer;
|
||||
writeObject(obj: any): void;
|
||||
writeStream(buf: AnyBuffer): void;
|
||||
writeRawStream(buf: AnyBuffer): void;
|
||||
resolve(): PDFObject;
|
||||
get length(): number;
|
||||
set length(_: number);
|
||||
_get(path: PDFObjectPath): Pointer<"pdf_obj">;
|
||||
get(...path: PDFObjectPath): PDFObject;
|
||||
getInheritable(key: string | PDFObject): PDFObject;
|
||||
put(key: number | string | PDFObject, value: any): any;
|
||||
push(value: any): any;
|
||||
delete(key: number | string | PDFObject): void;
|
||||
valueOf(): string | number | boolean | this | null;
|
||||
toString(tight?: boolean, ascii?: boolean): string;
|
||||
forEach(fn: (val: PDFObject, key: number | string, self: PDFObject) => void): void;
|
||||
asJS(seen?: Record<number, PDFObject>): any;
|
||||
}
|
||||
export declare class PDFGraftMap extends Userdata<"pdf_graft_map"> {
|
||||
static readonly _drop: (p: Pointer<"pdf_graft_map">) => void;
|
||||
_doc: PDFDocument;
|
||||
constructor(doc: PDFDocument, pointer: Pointer<"pdf_graft_map">);
|
||||
graftObject(obj: PDFObject): PDFObject;
|
||||
graftPage(to: number, srcDoc: PDFDocument, srcPage: number): void;
|
||||
}
|
||||
export type PDFAnnotationType = "Text" | "Link" | "FreeText" | "Line" | "Square" | "Circle" | "Polygon" | "PolyLine" | "Highlight" | "Underline" | "Squiggly" | "StrikeOut" | "Redact" | "Stamp" | "Caret" | "Ink" | "Popup" | "FileAttachment" | "Sound" | "Movie" | "RichMedia" | "Widget" | "Screen" | "PrinterMark" | "TrapNet" | "Watermark" | "3D" | "Projection";
|
||||
export type PDFAnnotationLineEndingStyle = "None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash";
|
||||
export type PDFAnnotationBorderStyle = "Solid" | "Dashed" | "Beveled" | "Inset" | "Underline";
|
||||
export type PDFAnnotationBorderEffect = "None" | "Cloudy";
|
||||
export type PDFAnnotationIntent = null | "FreeTextCallout" | "FreeTextTypeWriter" | "LineArrow" | "LineDimension" | "PloyLine" | "PolygonCloud" | "PolygonDimension" | "StampImage" | "StampSnapshot";
|
||||
export declare class PDFAnnotation extends Userdata<"pdf_annot"> {
|
||||
static readonly _drop: (p: Pointer<"pdf_annot">) => void;
|
||||
_doc: PDFDocument;
|
||||
static readonly ANNOT_TYPES: PDFAnnotationType[];
|
||||
static readonly LINE_ENDING: PDFAnnotationLineEndingStyle[];
|
||||
static readonly BORDER_STYLE: PDFAnnotationBorderStyle[];
|
||||
static readonly BORDER_EFFECT: PDFAnnotationBorderEffect[];
|
||||
static readonly INTENT: PDFAnnotationIntent[];
|
||||
static readonly IS_INVISIBLE: number;
|
||||
static readonly IS_HIDDEN: number;
|
||||
static readonly IS_PRINT: number;
|
||||
static readonly IS_NO_ZOOM: number;
|
||||
static readonly IS_NO_ROTATE: number;
|
||||
static readonly IS_NO_VIEW: number;
|
||||
static readonly IS_READ_ONLY: number;
|
||||
static readonly IS_LOCKED: number;
|
||||
static readonly IS_TOGGLE_NO_VIEW: number;
|
||||
static readonly IS_LOCKED_CONTENTS: number;
|
||||
constructor(doc: PDFDocument, pointer: Pointer<"pdf_annot">);
|
||||
getObject(): PDFObject;
|
||||
getBounds(): Rect;
|
||||
run(device: Device, matrix: Matrix): void;
|
||||
toPixmap(matrix: Matrix, colorspace: ColorSpace, alpha?: boolean): Pixmap;
|
||||
toDisplayList(): DisplayList;
|
||||
update(): boolean;
|
||||
getType(): PDFAnnotationType;
|
||||
getLanguage(): string | null;
|
||||
setLanguage(lang: string): void;
|
||||
getFlags(): number;
|
||||
setFlags(flags: number): void;
|
||||
getContents(): string;
|
||||
setContents(text: string): void;
|
||||
getName(): string;
|
||||
setName(text: string): void;
|
||||
getAuthor(): string;
|
||||
setAuthor(text: string): void;
|
||||
getSubject(): string;
|
||||
setSubject(text: string): void;
|
||||
getCreationDate(): Date;
|
||||
setCreationDate(date: Date): void;
|
||||
getModificationDate(): Date;
|
||||
setModificationDate(date: Date): void;
|
||||
hasRect(): boolean;
|
||||
hasInkList(): boolean;
|
||||
hasQuadPoints(): boolean;
|
||||
hasVertices(): boolean;
|
||||
hasLine(): boolean;
|
||||
hasInteriorColor(): boolean;
|
||||
hasLineEndingStyles(): boolean;
|
||||
hasBorder(): boolean;
|
||||
hasBorderEffect(): boolean;
|
||||
hasIcon(): boolean;
|
||||
hasOpen(): boolean;
|
||||
hasAuthor(): boolean;
|
||||
hasSubject(): boolean;
|
||||
hasFilespec(): boolean;
|
||||
hasCallout(): boolean;
|
||||
hasRichContents(): boolean;
|
||||
getRect(): Rect;
|
||||
setRect(rect: Rect): void;
|
||||
getPopup(): Rect;
|
||||
setPopup(rect: Rect): void;
|
||||
getIsOpen(): boolean;
|
||||
setIsOpen(isOpen: boolean): void;
|
||||
getHiddenForEditing(): boolean;
|
||||
setHiddenForEditing(isHidden: boolean): void;
|
||||
getIcon(): string;
|
||||
setIcon(text: string): void;
|
||||
getOpacity(): number;
|
||||
setOpacity(opacity: number): void;
|
||||
getQuadding(): number;
|
||||
setQuadding(quadding: number): void;
|
||||
getLine(): Point[];
|
||||
setLine(a: Point, b: Point): void;
|
||||
getLineEndingStyles(): {
|
||||
start: PDFAnnotationLineEndingStyle;
|
||||
end: PDFAnnotationLineEndingStyle;
|
||||
};
|
||||
setLineEndingStyles(start: PDFAnnotationLineEndingStyle, end: PDFAnnotationLineEndingStyle): void;
|
||||
getLineCaption(): boolean;
|
||||
setLineCaption(on: boolean): void;
|
||||
getLineCaptionOffset(): Point;
|
||||
setLineCaptionOffset(p: Point): void;
|
||||
getLineLeader(): number;
|
||||
getLineLeaderExtension(): number;
|
||||
getLineLeaderOffset(): number;
|
||||
setLineLeader(v: number): void;
|
||||
setLineLeaderExtension(v: number): void;
|
||||
setLineLeaderOffset(v: number): void;
|
||||
getCalloutStyle(): PDFAnnotationLineEndingStyle;
|
||||
setCalloutStyle(style: PDFAnnotationLineEndingStyle): void;
|
||||
getCalloutLine(): Point[] | null;
|
||||
setCalloutLine(line: Point[]): void;
|
||||
getCalloutPoint(): Point | undefined;
|
||||
setCalloutPoint(p: Point): void;
|
||||
getColor(): AnnotColor;
|
||||
getInteriorColor(): AnnotColor;
|
||||
setColor(color: AnnotColor): void;
|
||||
setInteriorColor(color: AnnotColor): void;
|
||||
getBorderWidth(): number;
|
||||
setBorderWidth(value: number): void;
|
||||
getBorderStyle(): PDFAnnotationBorderStyle;
|
||||
setBorderStyle(value: PDFAnnotationBorderStyle): void;
|
||||
getBorderEffect(): PDFAnnotationBorderEffect;
|
||||
setBorderEffect(value: PDFAnnotationBorderEffect): void;
|
||||
getBorderEffectIntensity(): number;
|
||||
setBorderEffectIntensity(value: number): void;
|
||||
getBorderDashCount(): number;
|
||||
getBorderDashItem(idx: number): number;
|
||||
clearBorderDash(): void;
|
||||
addBorderDashItem(v: number): void;
|
||||
getBorderDashPattern(): any[];
|
||||
setBorderDashPattern(list: number[]): void;
|
||||
getIntent(): PDFAnnotationIntent;
|
||||
setIntent(value: PDFAnnotationIntent): void;
|
||||
setDefaultAppearance(fontName: string, size: number, color: AnnotColor): void;
|
||||
getDefaultAppearance(): {
|
||||
font: string;
|
||||
size: number;
|
||||
color: AnnotColor;
|
||||
};
|
||||
getFileSpec(): PDFObject;
|
||||
setFileSpec(fs: PDFObject): void;
|
||||
getQuadPoints(): Quad[];
|
||||
clearQuadPoints(): void;
|
||||
addQuadPoint(quad: Quad): void;
|
||||
setQuadPoints(quadlist: Quad[]): void;
|
||||
getVertices(): Point[];
|
||||
clearVertices(): void;
|
||||
addVertex(vertex: Point): void;
|
||||
setVertices(vertexlist: Point[]): void;
|
||||
getInkList(): Point[][];
|
||||
clearInkList(): void;
|
||||
addInkListStroke(): void;
|
||||
addInkListStrokeVertex(v: Point): void;
|
||||
setInkList(inklist: Point[][]): void;
|
||||
getRichContents(): string;
|
||||
setRichContents(plain: string, html: string): void;
|
||||
getRichDefaults(): string;
|
||||
setRichDefaults(style: string): void;
|
||||
setStampImage(image: Image): void;
|
||||
setAppearanceFromDisplayList(appearance: string | null, state: string | null, transform: Matrix, list: DisplayList): void;
|
||||
setAppearance(appearance: string | null, state: string | null, transform: Matrix, bbox: Rect, resources: any, contents: AnyBuffer): void;
|
||||
applyRedaction(black_boxes?: number, image_method?: number, line_art_method?: number, text_method?: number): void;
|
||||
}
|
||||
export declare class PDFWidget extends PDFAnnotation {
|
||||
static readonly WIDGET_TYPES: string[];
|
||||
static readonly FIELD_IS_READ_ONLY = 1;
|
||||
static readonly FIELD_IS_REQUIRED: number;
|
||||
static readonly FIELD_IS_NO_EXPORT: number;
|
||||
static readonly TX_FIELD_IS_MULTILINE: number;
|
||||
static readonly TX_FIELD_IS_PASSWORD: number;
|
||||
static readonly TX_FIELD_IS_FILE_SELECT: number;
|
||||
static readonly TX_FIELD_IS_DO_NOT_SPELL_CHECK: number;
|
||||
static readonly TX_FIELD_IS_DO_NOT_SCROLL: number;
|
||||
static readonly TX_FIELD_IS_COMB: number;
|
||||
static readonly TX_FIELD_IS_RICH_TEXT: number;
|
||||
static readonly BTN_FIELD_IS_NO_TOGGLE_TO_OFF: number;
|
||||
static readonly BTN_FIELD_IS_RADIO: number;
|
||||
static readonly BTN_FIELD_IS_PUSHBUTTON: number;
|
||||
static readonly BTN_FIELD_IS_RADIOS_IN_UNISON: number;
|
||||
static readonly CH_FIELD_IS_COMBO: number;
|
||||
static readonly CH_FIELD_IS_EDIT: number;
|
||||
static readonly CH_FIELD_IS_SORT: number;
|
||||
static readonly CH_FIELD_IS_MULTI_SELECT: number;
|
||||
static readonly CH_FIELD_IS_DO_NOT_SPELL_CHECK: number;
|
||||
static readonly CH_FIELD_IS_COMMIT_ON_SEL_CHANGE: number;
|
||||
getFieldType(): string;
|
||||
isButton(): boolean;
|
||||
isPushButton(): boolean;
|
||||
isCheckbox(): boolean;
|
||||
isRadioButton(): boolean;
|
||||
isText(): boolean;
|
||||
isChoice(): boolean;
|
||||
isListBox(): boolean;
|
||||
isComboBox(): boolean;
|
||||
getFieldFlags(): number;
|
||||
isMultiline(): boolean;
|
||||
isPassword(): boolean;
|
||||
isComb(): boolean;
|
||||
isReadOnly(): boolean;
|
||||
getLabel(): string;
|
||||
getName(): string;
|
||||
setName(): void;
|
||||
getValue(): string;
|
||||
setTextValue(value: string): number;
|
||||
getMaxLen(): number;
|
||||
setChoiceValue(value: string): number;
|
||||
getOptions(isExport?: boolean): string[];
|
||||
toggle(): number;
|
||||
}
|
||||
declare global {
|
||||
function $libmupdf_stm_close(ptr: number): void;
|
||||
function $libmupdf_stm_seek(ptr: number, pos: number, offset: number, whence: number): number;
|
||||
function $libmupdf_stm_read(ptr: number, pos: number, addr: number, size: number): number;
|
||||
}
|
||||
interface StreamHandle {
|
||||
fileSize(): number;
|
||||
read(memory: Uint8Array, offset: number, length: number, position: number): number;
|
||||
close(): void;
|
||||
}
|
||||
export declare class Stream extends Userdata<"fz_stream"> {
|
||||
static readonly _drop: (p: Pointer<"fz_stream">) => void;
|
||||
constructor(handle: StreamHandle);
|
||||
}
|
||||
declare global {
|
||||
function $libmupdf_load_font_file(name: Pointer<"char">, script: Pointer<"char">, bold: boolean, italic: boolean): Pointer<"fz_font">;
|
||||
}
|
||||
interface DeviceFunctions {
|
||||
drop?(): void;
|
||||
close?(): void;
|
||||
fillPath?(path: Path, evenOdd: boolean, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void;
|
||||
strokePath?(path: Path, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void;
|
||||
clipPath?(path: Path, evenOdd: boolean, ctm: Matrix): void;
|
||||
clipStrokePath?(path: Path, stroke: StrokeState, ctm: Matrix): void;
|
||||
fillText?(text: Text, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void;
|
||||
strokeText?(text: Text, stroke: StrokeState, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void;
|
||||
clipText?(text: Text, ctm: Matrix): void;
|
||||
clipStrokeText?(text: Text, stroke: StrokeState, ctm: Matrix): void;
|
||||
ignoreText?(text: Text, ctm: Matrix): void;
|
||||
fillShade?(shade: Shade, ctm: Matrix, alpha: number): void;
|
||||
fillImage?(image: Image, ctm: Matrix, alpha: number): void;
|
||||
fillImageMask?(image: Image, ctm: Matrix, colorspace: ColorSpace, color: number[], alpha: number): void;
|
||||
clipImageMask?(image: Image, ctm: Matrix): void;
|
||||
popClip?(): void;
|
||||
beginMask?(bbox: Rect, luminosity: boolean, colorspace: ColorSpace, color: number[]): void;
|
||||
endMask?(): void;
|
||||
beginGroup?(bbox: Rect, colorspace: ColorSpace, isolated: boolean, knockout: boolean, blendmode: BlendMode, alpha: number): void;
|
||||
endGroup?(): void;
|
||||
beginTile?(area: Rect, view: Rect, xstep: number, ystep: number, ctm: Matrix, id: number, doc_id: number): number;
|
||||
endTile?(): void;
|
||||
beginLayer?(name: string): void;
|
||||
endLayer?(): void;
|
||||
}
|
||||
declare global {
|
||||
var $libmupdf_path_walk: any;
|
||||
var $libmupdf_text_walk: any;
|
||||
var $libmupdf_device: any;
|
||||
}
|
||||
declare const _default: {
|
||||
Matrix: {
|
||||
identity: Matrix;
|
||||
scale(sx: number, sy: number): Matrix;
|
||||
translate(tx: number, ty: number): Matrix;
|
||||
rotate(d: number): Matrix;
|
||||
invert(m: Matrix): Matrix;
|
||||
concat(one: Matrix, two: Matrix): Matrix;
|
||||
};
|
||||
Rect: {
|
||||
MIN_INF_RECT: number;
|
||||
MAX_INF_RECT: number;
|
||||
empty: number[];
|
||||
invalid: number[];
|
||||
infinite: number[];
|
||||
isEmpty: (rect: Rect) => boolean;
|
||||
isValid: (rect: Rect) => boolean;
|
||||
isInfinite: (rect: Rect) => boolean;
|
||||
transform: (rect: Rect, matrix: Matrix) => Rect;
|
||||
};
|
||||
enableICC: typeof enableICC;
|
||||
disableICC: typeof disableICC;
|
||||
setUserCSS: typeof setUserCSS;
|
||||
installLoadFontFunction: typeof installLoadFontFunction;
|
||||
setLog: typeof setLog;
|
||||
Buffer: typeof Buffer;
|
||||
ColorSpace: typeof ColorSpace;
|
||||
Font: typeof Font;
|
||||
Image: typeof Image;
|
||||
StrokeState: typeof StrokeState;
|
||||
Path: typeof Path;
|
||||
Text: typeof Text;
|
||||
DisplayList: typeof DisplayList;
|
||||
Pixmap: typeof Pixmap;
|
||||
Shade: typeof Shade;
|
||||
StructuredText: typeof StructuredText;
|
||||
Device: typeof Device;
|
||||
DrawDevice: typeof DrawDevice;
|
||||
DisplayListDevice: typeof DisplayListDevice;
|
||||
DocumentWriter: typeof DocumentWriter;
|
||||
Document: typeof Document;
|
||||
OutlineIterator: typeof OutlineIterator;
|
||||
Link: typeof Link;
|
||||
Page: typeof Page;
|
||||
PDFDocument: typeof PDFDocument;
|
||||
PDFPage: typeof PDFPage;
|
||||
PDFObject: typeof PDFObject;
|
||||
PDFGraftMap: typeof PDFGraftMap;
|
||||
PDFAnnotation: typeof PDFAnnotation;
|
||||
PDFWidget: typeof PDFWidget;
|
||||
Stream: typeof Stream;
|
||||
memento: {
|
||||
listBlocks(): void;
|
||||
checkAllMemory(): void;
|
||||
};
|
||||
};
|
||||
export default _default;
|
||||
+3317
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
+37
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "mupdf",
|
||||
"version": "1.28.1",
|
||||
"description": "MuPDF.js",
|
||||
"author": "Artifex Software, Inc.",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"keywords": [
|
||||
"mupdf",
|
||||
"pdf"
|
||||
],
|
||||
"homepage": "https://mupdf.readthedocs.io/en/latest/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://cgit.ghostscript.com/mupdf.git/"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/mupdf.d.ts",
|
||||
"default": "./dist/mupdf.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"prepack": "bash tools/build.sh && bash tools/compress.sh",
|
||||
"simple-viewer": "npx http-server -c -1 -b -o examples/simple-viewer",
|
||||
"super-simple-viewer": "npx http-server -c -1 -b -o examples/super-simple-viewer"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "latest",
|
||||
"http-server": "latest",
|
||||
"terser": "^5.39.2",
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user