diff --git a/gnu-agpl-v3.0.md b/gnu-agpl-v3.0.md
new file mode 100644
index 0000000000..4ef32f0833
--- /dev/null
+++ b/gnu-agpl-v3.0.md
@@ -0,0 +1,651 @@
+GNU Affero General Public License
+=================================
+
+_Version 3, 19 November 2007_
+_Copyright © 2007 Free Software Foundation, Inc. <>_
+
+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.
+
+
+ Copyright (C)
+
+ 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 .
+
+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
+<>.
diff --git a/itext/pom.xml b/itext/pom.xml
index d8fac2cef7..8b11fd9c43 100644
--- a/itext/pom.xml
+++ b/itext/pom.xml
@@ -1,20 +1,19 @@
-
+
4.0.0
com.itextpdf
itext-parent
1.0.0
-
+
itextpdf
- 5.5.9
+ 5.5.10
jar
- iText
+ iText Core
A Free Java-PDF library
http://itextpdf.com
@@ -304,7 +303,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.8
+ 2.10.3
attach-sources
@@ -345,6 +344,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
+ 2.10.3
-Xdoclint:none
diff --git a/itext/src/main/java/com/itextpdf/awt/AsianFontMapper.java b/itext/src/main/java/com/itextpdf/awt/AsianFontMapper.java
index 196c45c299..6df0eb1ffc 100644
--- a/itext/src/main/java/com/itextpdf/awt/AsianFontMapper.java
+++ b/itext/src/main/java/com/itextpdf/awt/AsianFontMapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/DefaultFontMapper.java b/itext/src/main/java/com/itextpdf/awt/DefaultFontMapper.java
index 8ca97bc7e2..f322835b44 100644
--- a/itext/src/main/java/com/itextpdf/awt/DefaultFontMapper.java
+++ b/itext/src/main/java/com/itextpdf/awt/DefaultFontMapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/FontMapper.java b/itext/src/main/java/com/itextpdf/awt/FontMapper.java
index 69ade2d539..dd92b8ad94 100644
--- a/itext/src/main/java/com/itextpdf/awt/FontMapper.java
+++ b/itext/src/main/java/com/itextpdf/awt/FontMapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/PdfGraphics2D.java b/itext/src/main/java/com/itextpdf/awt/PdfGraphics2D.java
index e9677d0bf2..a299b24bd6 100644
--- a/itext/src/main/java/com/itextpdf/awt/PdfGraphics2D.java
+++ b/itext/src/main/java/com/itextpdf/awt/PdfGraphics2D.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/PdfPrinterGraphics2D.java b/itext/src/main/java/com/itextpdf/awt/PdfPrinterGraphics2D.java
index 88c3cefe33..7781b42663 100644
--- a/itext/src/main/java/com/itextpdf/awt/PdfPrinterGraphics2D.java
+++ b/itext/src/main/java/com/itextpdf/awt/PdfPrinterGraphics2D.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/geom/PolylineShape.java b/itext/src/main/java/com/itextpdf/awt/geom/PolylineShape.java
index 7421089fb2..354418c3f6 100644
--- a/itext/src/main/java/com/itextpdf/awt/geom/PolylineShape.java
+++ b/itext/src/main/java/com/itextpdf/awt/geom/PolylineShape.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/awt/geom/PolylineShapeIterator.java b/itext/src/main/java/com/itextpdf/awt/geom/PolylineShapeIterator.java
index eb5043e99d..f345b9b0a3 100644
--- a/itext/src/main/java/com/itextpdf/awt/geom/PolylineShapeIterator.java
+++ b/itext/src/main/java/com/itextpdf/awt/geom/PolylineShapeIterator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/testutils/CompareTool.java b/itext/src/main/java/com/itextpdf/testutils/CompareTool.java
index d920441d78..0815bdf7b1 100644
--- a/itext/src/main/java/com/itextpdf/testutils/CompareTool.java
+++ b/itext/src/main/java/com/itextpdf/testutils/CompareTool.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -418,7 +417,13 @@ public void writeReportToXml(OutputStream stream) throws ParserConfigurationExce
public CompareTool() {
gsExec = System.getProperty("gsExec");
+ if (gsExec == null) {
+ gsExec = System.getenv("gsExec");
+ }
compareExec = System.getProperty("compareExec");
+ if (compareExec == null) {
+ compareExec = System.getenv("compareExec");
+ }
}
private String compare(String outPath, String differenceImagePrefix, Map> ignoredAreas) throws IOException, InterruptedException, DocumentException {
diff --git a/itext/src/main/java/com/itextpdf/testutils/ITextTest.java b/itext/src/main/java/com/itextpdf/testutils/ITextTest.java
index ad973d27fc..5464821e6f 100644
--- a/itext/src/main/java/com/itextpdf/testutils/ITextTest.java
+++ b/itext/src/main/java/com/itextpdf/testutils/ITextTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/AccessibleElementId.java b/itext/src/main/java/com/itextpdf/text/AccessibleElementId.java
index e74fb48def..2566c621f9 100644
--- a/itext/src/main/java/com/itextpdf/text/AccessibleElementId.java
+++ b/itext/src/main/java/com/itextpdf/text/AccessibleElementId.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Anchor.java b/itext/src/main/java/com/itextpdf/text/Anchor.java
index 3ffab3cc45..d77c2ebb7e 100644
--- a/itext/src/main/java/com/itextpdf/text/Anchor.java
+++ b/itext/src/main/java/com/itextpdf/text/Anchor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Annotation.java b/itext/src/main/java/com/itextpdf/text/Annotation.java
index 19eb6d5e8a..c4aa7f3039 100644
--- a/itext/src/main/java/com/itextpdf/text/Annotation.java
+++ b/itext/src/main/java/com/itextpdf/text/Annotation.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/BadElementException.java b/itext/src/main/java/com/itextpdf/text/BadElementException.java
index 07fcc8c789..d208563da5 100644
--- a/itext/src/main/java/com/itextpdf/text/BadElementException.java
+++ b/itext/src/main/java/com/itextpdf/text/BadElementException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/BaseColor.java b/itext/src/main/java/com/itextpdf/text/BaseColor.java
index 0554329475..7a42db1796 100644
--- a/itext/src/main/java/com/itextpdf/text/BaseColor.java
+++ b/itext/src/main/java/com/itextpdf/text/BaseColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Chapter.java b/itext/src/main/java/com/itextpdf/text/Chapter.java
index c14f5a086b..529f86655b 100644
--- a/itext/src/main/java/com/itextpdf/text/Chapter.java
+++ b/itext/src/main/java/com/itextpdf/text/Chapter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ChapterAutoNumber.java b/itext/src/main/java/com/itextpdf/text/ChapterAutoNumber.java
index fafca9095e..15be982091 100644
--- a/itext/src/main/java/com/itextpdf/text/ChapterAutoNumber.java
+++ b/itext/src/main/java/com/itextpdf/text/ChapterAutoNumber.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Chunk.java b/itext/src/main/java/com/itextpdf/text/Chunk.java
index 5caf3ceb3b..de3d3f33b3 100644
--- a/itext/src/main/java/com/itextpdf/text/Chunk.java
+++ b/itext/src/main/java/com/itextpdf/text/Chunk.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/DocListener.java b/itext/src/main/java/com/itextpdf/text/DocListener.java
index d5dcb05c22..31ef194d67 100644
--- a/itext/src/main/java/com/itextpdf/text/DocListener.java
+++ b/itext/src/main/java/com/itextpdf/text/DocListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/DocWriter.java b/itext/src/main/java/com/itextpdf/text/DocWriter.java
index 01af9aa4df..e67b38c73a 100644
--- a/itext/src/main/java/com/itextpdf/text/DocWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/DocWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Document.java b/itext/src/main/java/com/itextpdf/text/Document.java
index f3e5da04b2..a07a3ea7cf 100644
--- a/itext/src/main/java/com/itextpdf/text/Document.java
+++ b/itext/src/main/java/com/itextpdf/text/Document.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/DocumentException.java b/itext/src/main/java/com/itextpdf/text/DocumentException.java
index 02748d0c73..67910eda6b 100644
--- a/itext/src/main/java/com/itextpdf/text/DocumentException.java
+++ b/itext/src/main/java/com/itextpdf/text/DocumentException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Element.java b/itext/src/main/java/com/itextpdf/text/Element.java
index 2f6451703e..06c7938fe3 100644
--- a/itext/src/main/java/com/itextpdf/text/Element.java
+++ b/itext/src/main/java/com/itextpdf/text/Element.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ElementListener.java b/itext/src/main/java/com/itextpdf/text/ElementListener.java
index 40b88e40e2..0f712e1cb9 100644
--- a/itext/src/main/java/com/itextpdf/text/ElementListener.java
+++ b/itext/src/main/java/com/itextpdf/text/ElementListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ExceptionConverter.java b/itext/src/main/java/com/itextpdf/text/ExceptionConverter.java
index 0dbc7cffb9..0bff5b3ac0 100644
--- a/itext/src/main/java/com/itextpdf/text/ExceptionConverter.java
+++ b/itext/src/main/java/com/itextpdf/text/ExceptionConverter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Font.java b/itext/src/main/java/com/itextpdf/text/Font.java
index 4d21454441..8be9b89904 100644
--- a/itext/src/main/java/com/itextpdf/text/Font.java
+++ b/itext/src/main/java/com/itextpdf/text/Font.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/FontFactory.java b/itext/src/main/java/com/itextpdf/text/FontFactory.java
index 3981a0968c..f624c5afcc 100644
--- a/itext/src/main/java/com/itextpdf/text/FontFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/FontFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/FontFactoryImp.java b/itext/src/main/java/com/itextpdf/text/FontFactoryImp.java
index 6de09f08fa..d41a4a1061 100644
--- a/itext/src/main/java/com/itextpdf/text/FontFactoryImp.java
+++ b/itext/src/main/java/com/itextpdf/text/FontFactoryImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/FontProvider.java b/itext/src/main/java/com/itextpdf/text/FontProvider.java
index 01bd33740c..58642280a8 100644
--- a/itext/src/main/java/com/itextpdf/text/FontProvider.java
+++ b/itext/src/main/java/com/itextpdf/text/FontProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/GreekList.java b/itext/src/main/java/com/itextpdf/text/GreekList.java
index 5d3a692452..15323bfe41 100644
--- a/itext/src/main/java/com/itextpdf/text/GreekList.java
+++ b/itext/src/main/java/com/itextpdf/text/GreekList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Header.java b/itext/src/main/java/com/itextpdf/text/Header.java
index 795bd3ba15..2bc87a15c6 100644
--- a/itext/src/main/java/com/itextpdf/text/Header.java
+++ b/itext/src/main/java/com/itextpdf/text/Header.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Image.java b/itext/src/main/java/com/itextpdf/text/Image.java
index 2b2cffd3b2..e8eefea5b5 100644
--- a/itext/src/main/java/com/itextpdf/text/Image.java
+++ b/itext/src/main/java/com/itextpdf/text/Image.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -2123,8 +2122,25 @@ public static Image getInstance(final java.awt.Image image, final java.awt.Color
transparency[0] = transparency[1] = transparentPixel >> 16 & 0xff;
transparency[2] = transparency[3] = transparentPixel >> 8 & 0xff;
transparency[4] = transparency[5] = transparentPixel & 0xff;
+ // Added by Michael Klink
+ // Check whether this value for transparent pixels
+ // has already been used for a non-transparent one
+ // before this position
+ for (int prevPixel = 0; prevPixel < j; prevPixel++) {
+ if ((pixels[prevPixel] & 0xffffff) == transparentPixel) {
+ // found a prior use of the transparentPixel color
+ // and, therefore, cannot make use of this color
+ // for transparency; we could still use an image
+ // mask but for simplicity let's use a soft mask
+ // which already is implemented here
+ shades = true;
+ break;
+ }
+ }
}
- } else if ((pixels[j] & 0xffffff) != transparentPixel) {
+ } else if (((pixels[j] & 0xffffff) != transparentPixel) && (alpha == 0)) {
+ shades = true;
+ } else if (((pixels[j] & 0xffffff) == transparentPixel) && (alpha != 0)) {
shades = true;
}
}
diff --git a/itext/src/main/java/com/itextpdf/text/ImgCCITT.java b/itext/src/main/java/com/itextpdf/text/ImgCCITT.java
index 5a87ae713a..dd555a9ec7 100644
--- a/itext/src/main/java/com/itextpdf/text/ImgCCITT.java
+++ b/itext/src/main/java/com/itextpdf/text/ImgCCITT.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ImgJBIG2.java b/itext/src/main/java/com/itextpdf/text/ImgJBIG2.java
index 3810ef9011..d4215821d7 100644
--- a/itext/src/main/java/com/itextpdf/text/ImgJBIG2.java
+++ b/itext/src/main/java/com/itextpdf/text/ImgJBIG2.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ImgRaw.java b/itext/src/main/java/com/itextpdf/text/ImgRaw.java
index 2185d2cbb3..e531b6ca8b 100644
--- a/itext/src/main/java/com/itextpdf/text/ImgRaw.java
+++ b/itext/src/main/java/com/itextpdf/text/ImgRaw.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ImgTemplate.java b/itext/src/main/java/com/itextpdf/text/ImgTemplate.java
index 177ec69d81..a33a3f3af3 100644
--- a/itext/src/main/java/com/itextpdf/text/ImgTemplate.java
+++ b/itext/src/main/java/com/itextpdf/text/ImgTemplate.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ImgWMF.java b/itext/src/main/java/com/itextpdf/text/ImgWMF.java
index 18d4e8035e..974387faf1 100644
--- a/itext/src/main/java/com/itextpdf/text/ImgWMF.java
+++ b/itext/src/main/java/com/itextpdf/text/ImgWMF.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Jpeg.java b/itext/src/main/java/com/itextpdf/text/Jpeg.java
index efb6a9e3f2..5526c138c6 100644
--- a/itext/src/main/java/com/itextpdf/text/Jpeg.java
+++ b/itext/src/main/java/com/itextpdf/text/Jpeg.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Jpeg2000.java b/itext/src/main/java/com/itextpdf/text/Jpeg2000.java
index e5603f990a..40a274bde6 100644
--- a/itext/src/main/java/com/itextpdf/text/Jpeg2000.java
+++ b/itext/src/main/java/com/itextpdf/text/Jpeg2000.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/LargeElement.java b/itext/src/main/java/com/itextpdf/text/LargeElement.java
index 66a6403d06..309a117b97 100644
--- a/itext/src/main/java/com/itextpdf/text/LargeElement.java
+++ b/itext/src/main/java/com/itextpdf/text/LargeElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/List.java b/itext/src/main/java/com/itextpdf/text/List.java
index 070b3ee323..8fb560a69d 100644
--- a/itext/src/main/java/com/itextpdf/text/List.java
+++ b/itext/src/main/java/com/itextpdf/text/List.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ListBody.java b/itext/src/main/java/com/itextpdf/text/ListBody.java
index 669e20c10c..024a569f23 100644
--- a/itext/src/main/java/com/itextpdf/text/ListBody.java
+++ b/itext/src/main/java/com/itextpdf/text/ListBody.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ListItem.java b/itext/src/main/java/com/itextpdf/text/ListItem.java
index 29b08e9bc5..275061210f 100644
--- a/itext/src/main/java/com/itextpdf/text/ListItem.java
+++ b/itext/src/main/java/com/itextpdf/text/ListItem.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ListLabel.java b/itext/src/main/java/com/itextpdf/text/ListLabel.java
index 2d9507f0b5..7714f1fe73 100644
--- a/itext/src/main/java/com/itextpdf/text/ListLabel.java
+++ b/itext/src/main/java/com/itextpdf/text/ListLabel.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/MarkedObject.java b/itext/src/main/java/com/itextpdf/text/MarkedObject.java
index bd7f8e4eea..3ba92e01b3 100644
--- a/itext/src/main/java/com/itextpdf/text/MarkedObject.java
+++ b/itext/src/main/java/com/itextpdf/text/MarkedObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/MarkedSection.java b/itext/src/main/java/com/itextpdf/text/MarkedSection.java
index 9b14ac14c5..492301c0ef 100644
--- a/itext/src/main/java/com/itextpdf/text/MarkedSection.java
+++ b/itext/src/main/java/com/itextpdf/text/MarkedSection.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Meta.java b/itext/src/main/java/com/itextpdf/text/Meta.java
index ac7125fb17..9883922d91 100644
--- a/itext/src/main/java/com/itextpdf/text/Meta.java
+++ b/itext/src/main/java/com/itextpdf/text/Meta.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/PageSize.java b/itext/src/main/java/com/itextpdf/text/PageSize.java
index 62b80dcf70..ca34960676 100644
--- a/itext/src/main/java/com/itextpdf/text/PageSize.java
+++ b/itext/src/main/java/com/itextpdf/text/PageSize.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Paragraph.java b/itext/src/main/java/com/itextpdf/text/Paragraph.java
index 2e881f7b93..1b3ea9d7b1 100644
--- a/itext/src/main/java/com/itextpdf/text/Paragraph.java
+++ b/itext/src/main/java/com/itextpdf/text/Paragraph.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Phrase.java b/itext/src/main/java/com/itextpdf/text/Phrase.java
index f086721900..ff6dc2cb0d 100644
--- a/itext/src/main/java/com/itextpdf/text/Phrase.java
+++ b/itext/src/main/java/com/itextpdf/text/Phrase.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Rectangle.java b/itext/src/main/java/com/itextpdf/text/Rectangle.java
index 4a8f033551..9a643c4d0f 100644
--- a/itext/src/main/java/com/itextpdf/text/Rectangle.java
+++ b/itext/src/main/java/com/itextpdf/text/Rectangle.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/RectangleReadOnly.java b/itext/src/main/java/com/itextpdf/text/RectangleReadOnly.java
index 79e431efac..356ba7997e 100644
--- a/itext/src/main/java/com/itextpdf/text/RectangleReadOnly.java
+++ b/itext/src/main/java/com/itextpdf/text/RectangleReadOnly.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/RomanList.java b/itext/src/main/java/com/itextpdf/text/RomanList.java
index 9efb869bb3..1b249d9eac 100644
--- a/itext/src/main/java/com/itextpdf/text/RomanList.java
+++ b/itext/src/main/java/com/itextpdf/text/RomanList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Section.java b/itext/src/main/java/com/itextpdf/text/Section.java
index 256864e55b..2d78518018 100644
--- a/itext/src/main/java/com/itextpdf/text/Section.java
+++ b/itext/src/main/java/com/itextpdf/text/Section.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/SpecialSymbol.java b/itext/src/main/java/com/itextpdf/text/SpecialSymbol.java
index d9f4a90744..d61c08fe6d 100644
--- a/itext/src/main/java/com/itextpdf/text/SpecialSymbol.java
+++ b/itext/src/main/java/com/itextpdf/text/SpecialSymbol.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/SplitCharacter.java b/itext/src/main/java/com/itextpdf/text/SplitCharacter.java
index 02d4ef2009..d5510022f0 100644
--- a/itext/src/main/java/com/itextpdf/text/SplitCharacter.java
+++ b/itext/src/main/java/com/itextpdf/text/SplitCharacter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/TabSettings.java b/itext/src/main/java/com/itextpdf/text/TabSettings.java
index 71be3d82c6..55f32e49aa 100644
--- a/itext/src/main/java/com/itextpdf/text/TabSettings.java
+++ b/itext/src/main/java/com/itextpdf/text/TabSettings.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/TabSplitCharacter.java b/itext/src/main/java/com/itextpdf/text/TabSplitCharacter.java
index aa1eca3235..8baa3710a0 100644
--- a/itext/src/main/java/com/itextpdf/text/TabSplitCharacter.java
+++ b/itext/src/main/java/com/itextpdf/text/TabSplitCharacter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/TabStop.java b/itext/src/main/java/com/itextpdf/text/TabStop.java
index 38b0898486..3379747d7d 100644
--- a/itext/src/main/java/com/itextpdf/text/TabStop.java
+++ b/itext/src/main/java/com/itextpdf/text/TabStop.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/TextElementArray.java b/itext/src/main/java/com/itextpdf/text/TextElementArray.java
index c7c92b2efd..7fb31f7552 100644
--- a/itext/src/main/java/com/itextpdf/text/TextElementArray.java
+++ b/itext/src/main/java/com/itextpdf/text/TextElementArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Utilities.java b/itext/src/main/java/com/itextpdf/text/Utilities.java
index db5d2076ca..776af8d03f 100644
--- a/itext/src/main/java/com/itextpdf/text/Utilities.java
+++ b/itext/src/main/java/com/itextpdf/text/Utilities.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/Version.java b/itext/src/main/java/com/itextpdf/text/Version.java
index 0bd3526769..f53f90b14c 100644
--- a/itext/src/main/java/com/itextpdf/text/Version.java
+++ b/itext/src/main/java/com/itextpdf/text/Version.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -71,7 +70,7 @@ public final class Version {
* This String contains the version number of this iText release.
* For debugging purposes, we request you NOT to change this constant.
*/
- private String release = "5.5.9";
+ private String release = "5.5.10";
/**
* This String contains the iText version as shown in the producer line.
* iText is a product developed by iText Group NV.
diff --git a/itext/src/main/java/com/itextpdf/text/WritableDirectElement.java b/itext/src/main/java/com/itextpdf/text/WritableDirectElement.java
index 947f0e57bd..2f003fafa5 100644
--- a/itext/src/main/java/com/itextpdf/text/WritableDirectElement.java
+++ b/itext/src/main/java/com/itextpdf/text/WritableDirectElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ZapfDingbatsList.java b/itext/src/main/java/com/itextpdf/text/ZapfDingbatsList.java
index 8b99efb4a2..75d880a9a7 100644
--- a/itext/src/main/java/com/itextpdf/text/ZapfDingbatsList.java
+++ b/itext/src/main/java/com/itextpdf/text/ZapfDingbatsList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/ZapfDingbatsNumberList.java b/itext/src/main/java/com/itextpdf/text/ZapfDingbatsNumberList.java
index 7085bfcff3..7ad895a97e 100644
--- a/itext/src/main/java/com/itextpdf/text/ZapfDingbatsNumberList.java
+++ b/itext/src/main/java/com/itextpdf/text/ZapfDingbatsNumberList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/api/Indentable.java b/itext/src/main/java/com/itextpdf/text/api/Indentable.java
index 2ddd839e67..b19f8491f0 100644
--- a/itext/src/main/java/com/itextpdf/text/api/Indentable.java
+++ b/itext/src/main/java/com/itextpdf/text/api/Indentable.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/api/Spaceable.java b/itext/src/main/java/com/itextpdf/text/api/Spaceable.java
index e199fde5f1..996048d32d 100644
--- a/itext/src/main/java/com/itextpdf/text/api/Spaceable.java
+++ b/itext/src/main/java/com/itextpdf/text/api/Spaceable.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/api/WriterOperation.java b/itext/src/main/java/com/itextpdf/text/api/WriterOperation.java
index f9ed91beb4..8034729b79 100644
--- a/itext/src/main/java/com/itextpdf/text/api/WriterOperation.java
+++ b/itext/src/main/java/com/itextpdf/text/api/WriterOperation.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/api/package-info.java b/itext/src/main/java/com/itextpdf/text/api/package-info.java
index c1569f89d9..3cdb12ea95 100644
--- a/itext/src/main/java/com/itextpdf/text/api/package-info.java
+++ b/itext/src/main/java/com/itextpdf/text/api/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/error_messages/MessageLocalization.java b/itext/src/main/java/com/itextpdf/text/error_messages/MessageLocalization.java
index e585b98acf..ac2058d7ae 100644
--- a/itext/src/main/java/com/itextpdf/text/error_messages/MessageLocalization.java
+++ b/itext/src/main/java/com/itextpdf/text/error_messages/MessageLocalization.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/exceptions/BadPasswordException.java b/itext/src/main/java/com/itextpdf/text/exceptions/BadPasswordException.java
index 915d07fe99..4ad5b3bdfd 100644
--- a/itext/src/main/java/com/itextpdf/text/exceptions/BadPasswordException.java
+++ b/itext/src/main/java/com/itextpdf/text/exceptions/BadPasswordException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/exceptions/IllegalPdfSyntaxException.java b/itext/src/main/java/com/itextpdf/text/exceptions/IllegalPdfSyntaxException.java
index cc53034c39..8b2300876f 100644
--- a/itext/src/main/java/com/itextpdf/text/exceptions/IllegalPdfSyntaxException.java
+++ b/itext/src/main/java/com/itextpdf/text/exceptions/IllegalPdfSyntaxException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/exceptions/InvalidImageException.java b/itext/src/main/java/com/itextpdf/text/exceptions/InvalidImageException.java
index 3e8337c256..0dbbfaae17 100644
--- a/itext/src/main/java/com/itextpdf/text/exceptions/InvalidImageException.java
+++ b/itext/src/main/java/com/itextpdf/text/exceptions/InvalidImageException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/exceptions/InvalidPdfException.java b/itext/src/main/java/com/itextpdf/text/exceptions/InvalidPdfException.java
index 6922a31208..eacda6527b 100644
--- a/itext/src/main/java/com/itextpdf/text/exceptions/InvalidPdfException.java
+++ b/itext/src/main/java/com/itextpdf/text/exceptions/InvalidPdfException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/exceptions/UnsupportedPdfException.java b/itext/src/main/java/com/itextpdf/text/exceptions/UnsupportedPdfException.java
index 7f23e01993..05c5a59e01 100644
--- a/itext/src/main/java/com/itextpdf/text/exceptions/UnsupportedPdfException.java
+++ b/itext/src/main/java/com/itextpdf/text/exceptions/UnsupportedPdfException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/factories/GreekAlphabetFactory.java b/itext/src/main/java/com/itextpdf/text/factories/GreekAlphabetFactory.java
index 08e126676d..df8ab6cb70 100644
--- a/itext/src/main/java/com/itextpdf/text/factories/GreekAlphabetFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/factories/GreekAlphabetFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/factories/RomanAlphabetFactory.java b/itext/src/main/java/com/itextpdf/text/factories/RomanAlphabetFactory.java
index bf406e0690..de451f1a6e 100644
--- a/itext/src/main/java/com/itextpdf/text/factories/RomanAlphabetFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/factories/RomanAlphabetFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/factories/RomanNumberFactory.java b/itext/src/main/java/com/itextpdf/text/factories/RomanNumberFactory.java
index ca67218c42..c9e3bbbb14 100644
--- a/itext/src/main/java/com/itextpdf/text/factories/RomanNumberFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/factories/RomanNumberFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/HtmlEncoder.java b/itext/src/main/java/com/itextpdf/text/html/HtmlEncoder.java
index 096d2ed9bc..9e70f66754 100644
--- a/itext/src/main/java/com/itextpdf/text/html/HtmlEncoder.java
+++ b/itext/src/main/java/com/itextpdf/text/html/HtmlEncoder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/HtmlTags.java b/itext/src/main/java/com/itextpdf/text/html/HtmlTags.java
index e4e094f4b5..6af890fc65 100644
--- a/itext/src/main/java/com/itextpdf/text/html/HtmlTags.java
+++ b/itext/src/main/java/com/itextpdf/text/html/HtmlTags.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/HtmlUtilities.java b/itext/src/main/java/com/itextpdf/text/html/HtmlUtilities.java
index 373be7f431..5b833c16cb 100644
--- a/itext/src/main/java/com/itextpdf/text/html/HtmlUtilities.java
+++ b/itext/src/main/java/com/itextpdf/text/html/HtmlUtilities.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/WebColors.java b/itext/src/main/java/com/itextpdf/text/html/WebColors.java
index 0c1cb644c1..324bf3bac9 100644
--- a/itext/src/main/java/com/itextpdf/text/html/WebColors.java
+++ b/itext/src/main/java/com/itextpdf/text/html/WebColors.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/CellWrapper.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/CellWrapper.java
index fbd7bef239..dbd5bccbe4 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/CellWrapper.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/CellWrapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ChainedProperties.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ChainedProperties.java
index 09e7e4da36..f14a8250aa 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ChainedProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ChainedProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ElementFactory.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ElementFactory.java
index 3cfd72870f..163841621b 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ElementFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ElementFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessor.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessor.java
index 000251586a..221c5e4afe 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessors.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessors.java
index 7904354419..1c09bcfe6d 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessors.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLTagProcessors.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLWorker.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLWorker.java
index cfa0a5d0b7..be103bd5ea 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLWorker.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/HTMLWorker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProcessor.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProcessor.java
index ccaa55872c..4c6c7f32f1 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProvider.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProvider.java
index f35e8be47d..35819e0631 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProvider.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageStore.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageStore.java
index a3f9ff3af7..2e7acf6bf3 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageStore.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/ImageStore.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/LinkProcessor.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/LinkProcessor.java
index fb6d614b2c..040f16af36 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/LinkProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/LinkProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/StyleSheet.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/StyleSheet.java
index af9343d9f0..f17fa43a0f 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/StyleSheet.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/StyleSheet.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/html/simpleparser/TableWrapper.java b/itext/src/main/java/com/itextpdf/text/html/simpleparser/TableWrapper.java
index 491ca3201c..f9eecba90e 100644
--- a/itext/src/main/java/com/itextpdf/text/html/simpleparser/TableWrapper.java
+++ b/itext/src/main/java/com/itextpdf/text/html/simpleparser/TableWrapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/ArrayRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/ArrayRandomAccessSource.java
index e373864ba9..56b8445113 100644
--- a/itext/src/main/java/com/itextpdf/text/io/ArrayRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/ArrayRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/ByteBufferRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/ByteBufferRandomAccessSource.java
index ddff03ec80..6443165d17 100644
--- a/itext/src/main/java/com/itextpdf/text/io/ByteBufferRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/ByteBufferRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/FileChannelRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/FileChannelRandomAccessSource.java
index 94c8363291..d536a466c2 100644
--- a/itext/src/main/java/com/itextpdf/text/io/FileChannelRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/FileChannelRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/GetBufferedRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/GetBufferedRandomAccessSource.java
index 65ea25d483..5e0582286a 100644
--- a/itext/src/main/java/com/itextpdf/text/io/GetBufferedRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/GetBufferedRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/GroupedRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/GroupedRandomAccessSource.java
index a73fcf3bb8..1400b07bf0 100644
--- a/itext/src/main/java/com/itextpdf/text/io/GroupedRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/GroupedRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/IndependentRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/IndependentRandomAccessSource.java
index 5e9a0b9b1f..451fed9e1b 100644
--- a/itext/src/main/java/com/itextpdf/text/io/IndependentRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/IndependentRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/MapFailedException.java b/itext/src/main/java/com/itextpdf/text/io/MapFailedException.java
index 585c5e4877..950addeed4 100644
--- a/itext/src/main/java/com/itextpdf/text/io/MapFailedException.java
+++ b/itext/src/main/java/com/itextpdf/text/io/MapFailedException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/MappedChannelRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/MappedChannelRandomAccessSource.java
index 54d007d8b1..80c9f1144e 100644
--- a/itext/src/main/java/com/itextpdf/text/io/MappedChannelRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/MappedChannelRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/PagedChannelRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/PagedChannelRandomAccessSource.java
index 03f844ad29..852bac3b3b 100644
--- a/itext/src/main/java/com/itextpdf/text/io/PagedChannelRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/PagedChannelRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/RAFRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/RAFRandomAccessSource.java
index 69bff073a1..f2ac8f7eaa 100644
--- a/itext/src/main/java/com/itextpdf/text/io/RAFRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/RAFRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/RASInputStream.java b/itext/src/main/java/com/itextpdf/text/io/RASInputStream.java
index 486f21f643..eb5762694d 100644
--- a/itext/src/main/java/com/itextpdf/text/io/RASInputStream.java
+++ b/itext/src/main/java/com/itextpdf/text/io/RASInputStream.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/RandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/RandomAccessSource.java
index 7aadabc389..5c9fef4b8a 100644
--- a/itext/src/main/java/com/itextpdf/text/io/RandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/RandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/RandomAccessSourceFactory.java b/itext/src/main/java/com/itextpdf/text/io/RandomAccessSourceFactory.java
index 4cb540e2e3..af4fa1ecd7 100644
--- a/itext/src/main/java/com/itextpdf/text/io/RandomAccessSourceFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/io/RandomAccessSourceFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/StreamUtil.java b/itext/src/main/java/com/itextpdf/text/io/StreamUtil.java
index 4d7369764d..233f7747a4 100644
--- a/itext/src/main/java/com/itextpdf/text/io/StreamUtil.java
+++ b/itext/src/main/java/com/itextpdf/text/io/StreamUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/TempFileCache.java b/itext/src/main/java/com/itextpdf/text/io/TempFileCache.java
index 13fbc38bd0..363e556f0c 100644
--- a/itext/src/main/java/com/itextpdf/text/io/TempFileCache.java
+++ b/itext/src/main/java/com/itextpdf/text/io/TempFileCache.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/io/WindowRandomAccessSource.java b/itext/src/main/java/com/itextpdf/text/io/WindowRandomAccessSource.java
index 014ec65914..45769abdee 100644
--- a/itext/src/main/java/com/itextpdf/text/io/WindowRandomAccessSource.java
+++ b/itext/src/main/java/com/itextpdf/text/io/WindowRandomAccessSource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/Counter.java b/itext/src/main/java/com/itextpdf/text/log/Counter.java
index 947dc4d4de..5f92ce3773 100644
--- a/itext/src/main/java/com/itextpdf/text/log/Counter.java
+++ b/itext/src/main/java/com/itextpdf/text/log/Counter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/CounterFactory.java b/itext/src/main/java/com/itextpdf/text/log/CounterFactory.java
index 80d1ea26fc..717bd957d4 100644
--- a/itext/src/main/java/com/itextpdf/text/log/CounterFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/log/CounterFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/DefaultCounter.java b/itext/src/main/java/com/itextpdf/text/log/DefaultCounter.java
index a16c1583bd..48cd525feb 100644
--- a/itext/src/main/java/com/itextpdf/text/log/DefaultCounter.java
+++ b/itext/src/main/java/com/itextpdf/text/log/DefaultCounter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/Level.java b/itext/src/main/java/com/itextpdf/text/log/Level.java
index eb5fa28255..5d5509ec9b 100644
--- a/itext/src/main/java/com/itextpdf/text/log/Level.java
+++ b/itext/src/main/java/com/itextpdf/text/log/Level.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/Logger.java b/itext/src/main/java/com/itextpdf/text/log/Logger.java
index a7d531fc2d..52c1e9401e 100644
--- a/itext/src/main/java/com/itextpdf/text/log/Logger.java
+++ b/itext/src/main/java/com/itextpdf/text/log/Logger.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/LoggerFactory.java b/itext/src/main/java/com/itextpdf/text/log/LoggerFactory.java
index 9b798c2beb..cd8ba81c7a 100644
--- a/itext/src/main/java/com/itextpdf/text/log/LoggerFactory.java
+++ b/itext/src/main/java/com/itextpdf/text/log/LoggerFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/NoOpCounter.java b/itext/src/main/java/com/itextpdf/text/log/NoOpCounter.java
index dc6d11842c..bdf5007322 100644
--- a/itext/src/main/java/com/itextpdf/text/log/NoOpCounter.java
+++ b/itext/src/main/java/com/itextpdf/text/log/NoOpCounter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/NoOpLogger.java b/itext/src/main/java/com/itextpdf/text/log/NoOpLogger.java
index 0ba60522ab..58631ae26a 100644
--- a/itext/src/main/java/com/itextpdf/text/log/NoOpLogger.java
+++ b/itext/src/main/java/com/itextpdf/text/log/NoOpLogger.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/SysoCounter.java b/itext/src/main/java/com/itextpdf/text/log/SysoCounter.java
index 093e2f6ee0..038ea2fc19 100644
--- a/itext/src/main/java/com/itextpdf/text/log/SysoCounter.java
+++ b/itext/src/main/java/com/itextpdf/text/log/SysoCounter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/log/SysoLogger.java b/itext/src/main/java/com/itextpdf/text/log/SysoLogger.java
index eeefd479d0..3498d0058e 100644
--- a/itext/src/main/java/com/itextpdf/text/log/SysoLogger.java
+++ b/itext/src/main/java/com/itextpdf/text/log/SysoLogger.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/AcroFields.java b/itext/src/main/java/com/itextpdf/text/pdf/AcroFields.java
index 82c89dae7e..45610894ed 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/AcroFields.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/AcroFields.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -1810,8 +1809,8 @@ public boolean removeField(String name, int page) {
continue;
PdfIndirectReference ref = item.getWidgetRef(k);
PdfDictionary wd = item.getWidget( k );
- PdfDictionary pageDic = reader.getPageN(pageV);
- PdfArray annots = pageDic.getAsArray(PdfName.ANNOTS);
+ PdfDictionary pageDic = reader.getPageN(pageV); //Returns null for floating, orphaned fields
+ PdfArray annots = pageDic != null ? pageDic.getAsArray(PdfName.ANNOTS): null; //Account for floating, orphaned fields
if (annots != null) {
if (removeRefFromArray(annots, ref) == 0) {
pageDic.remove(PdfName.ANNOTS);
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ArrayBasedStringTokenizer.java b/itext/src/main/java/com/itextpdf/text/pdf/ArrayBasedStringTokenizer.java
index 9922102629..827cde847d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ArrayBasedStringTokenizer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ArrayBasedStringTokenizer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BadPdfFormatException.java b/itext/src/main/java/com/itextpdf/text/pdf/BadPdfFormatException.java
index 427ed23120..b02b41ea3c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BadPdfFormatException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BadPdfFormatException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Barcode.java b/itext/src/main/java/com/itextpdf/text/pdf/Barcode.java
index 93509c44f7..292013f6bc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Barcode.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Barcode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Barcode128.java b/itext/src/main/java/com/itextpdf/text/pdf/Barcode128.java
index 746a493869..8245222fe9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Barcode128.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Barcode128.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Barcode39.java b/itext/src/main/java/com/itextpdf/text/pdf/Barcode39.java
index 9278844e4d..55dbe6b7ba 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Barcode39.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Barcode39.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeCodabar.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeCodabar.java
index fe6883918e..d9ad4d946c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeCodabar.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeCodabar.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeDatamatrix.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeDatamatrix.java
index 31a358f643..3eb732d231 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeDatamatrix.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeDatamatrix.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -156,6 +155,7 @@ public class BarcodeDatamatrix {
private int width;
private int ws;
private int options;
+ private boolean forceSquareSize = false;
/**
* Creates an instance of this class.
@@ -729,7 +729,7 @@ public int generate(byte[] text, int textOffset, int textSize) {
}
e += extCount;
for (k = 0; k < dmSizes.length; ++k) {
- if (dmSizes[k].dataSize >= e)
+ if (dmSizes[k].dataSize >= e && (!forceSquareSize || dmSizes[k].width == dmSizes[k].height))
break;
}
dm = dmSizes[k];
@@ -959,6 +959,10 @@ public void setOptions(int options) {
this.options = options;
}
+ public void setForceSquareSize(boolean forceSquareSize) {
+ this.forceSquareSize = forceSquareSize;
+ }
+
static class Placement {
private int nrow;
private int ncol;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEAN.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEAN.java
index dce847fbc6..7796c23b17 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEAN.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEAN.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEANSUPP.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEANSUPP.java
index 31186532f5..a2b10afcfb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEANSUPP.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeEANSUPP.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeInter25.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeInter25.java
index da03766d37..c92995c6a6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeInter25.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeInter25.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodePDF417.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodePDF417.java
index e6b2f0e27b..f209704620 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodePDF417.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodePDF417.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodePostnet.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodePostnet.java
index 492457d98e..62a361c401 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodePostnet.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodePostnet.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeQRCode.java b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeQRCode.java
index d9f2880da1..4e7cc6b19d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BarcodeQRCode.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BarcodeQRCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BaseField.java b/itext/src/main/java/com/itextpdf/text/pdf/BaseField.java
index 4e10c00e8a..d55999e6d2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BaseField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BaseField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BaseFont.java b/itext/src/main/java/com/itextpdf/text/pdf/BaseFont.java
index dadaf63f95..9ae6a1a8d5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BaseFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BaseFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BidiLine.java b/itext/src/main/java/com/itextpdf/text/pdf/BidiLine.java
index 65a7e8318b..640b7275b8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BidiLine.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BidiLine.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -53,6 +52,7 @@
import com.itextpdf.text.pdf.languages.ArabicLigaturizer;
import java.util.ArrayList;
+import java.util.List;
/** Does all the line bidirectional processing with PdfChunk assembly.
*
@@ -184,13 +184,26 @@ public boolean getParagraph(int runDirection) {
return true;
}
- if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {
+ if (runDirection != PdfWriter.RUN_DIRECTION_NO_BIDI) {
if (orderLevels.length < totalTextLength) {
orderLevels = new byte[pieceSize];
indexChars = new int[pieceSize];
}
ArabicLigaturizer.processNumbers(text, 0, totalTextLength, arabicOptions);
- BidiOrder order = new BidiOrder(text, 0, totalTextLength, (byte)(runDirection == PdfWriter.RUN_DIRECTION_RTL ? 1 : 0));
+ byte paragraphEmbeddingLevel;
+ switch (runDirection) {
+ case PdfWriter.RUN_DIRECTION_LTR:
+ paragraphEmbeddingLevel = 0;
+ break;
+ case PdfWriter.RUN_DIRECTION_RTL:
+ paragraphEmbeddingLevel = 1;
+ break;
+ case PdfWriter.RUN_DIRECTION_DEFAULT:
+ default:
+ paragraphEmbeddingLevel = -1;
+ break;
+ }
+ BidiOrder order = new BidiOrder(text, 0, totalTextLength, paragraphEmbeddingLevel);
byte od[] = order.getLevels();
for (int k = 0; k < totalTextLength; ++k) {
orderLevels[k] = od[k];
@@ -250,7 +263,7 @@ public void save() {
System.arraycopy(text, 0, storedText, 0, totalTextLength);
System.arraycopy(detailChunks, 0, storedDetailChunks, 0, totalTextLength);
}
- if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {
+ if (runDirection != PdfWriter.RUN_DIRECTION_NO_BIDI) {
if (storedOrderLevels.length < totalTextLength) {
storedOrderLevels = new byte[totalTextLength];
storedIndexChars = new int[totalTextLength];
@@ -271,7 +284,7 @@ public void restore() {
System.arraycopy(storedText, 0, text, 0, totalTextLength);
System.arraycopy(storedDetailChunks, 0, detailChunks, 0, totalTextLength);
}
- if (runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL) {
+ if (runDirection != PdfWriter.RUN_DIRECTION_NO_BIDI) {
System.arraycopy(storedOrderLevels, currentChar, orderLevels, currentChar, totalTextLength - currentChar);
System.arraycopy(storedIndexChars, currentChar, indexChars, currentChar, totalTextLength - currentChar);
}
@@ -355,6 +368,7 @@ public PdfLine processLine(float leftX, float width, int alignment, int runDirec
float charWidth = 0;
PdfChunk lastValidChunk = null;
TabStop tabStop = null;
+ List rtlTabsToBeAligned = new ArrayList();
float tabStopAnchorPosition = Float.NaN;
float tabPosition = Float.NaN;
boolean surrogate = false;
@@ -401,13 +415,7 @@ public PdfLine processLine(float leftX, float width, int alignment, int runDirec
if (ck.isAttribute(Chunk.TABSETTINGS)) {
lastSplit = currentChar;
if (tabStop != null) {
- float tabStopPosition = tabStop.getPosition(tabPosition, originalWidth - width, tabStopAnchorPosition);
- width = originalWidth - (tabStopPosition + (originalWidth - width - tabPosition));
- if (width < 0) {
- tabStopPosition += width;
- width = 0;
- }
- tabStop.setPosition(tabStopPosition);
+ width = processTabStop(tabStop, tabPosition, originalWidth, width, tabStopAnchorPosition, isRTL, rtlTabsToBeAligned);
}
tabStop = PdfChunk.getTabStop(ck, originalWidth - width);
@@ -474,16 +482,12 @@ else if (ck.isSeparator()) {
}
if (tabStop != null) {
- float tabStopPosition = tabStop.getPosition(tabPosition, originalWidth - width, tabStopAnchorPosition);
- width -= tabStopPosition - tabPosition;
- if (width < 0) {
- tabStopPosition += width;
- width = 0;
+ width = processTabStop(tabStop, tabPosition, originalWidth, width, tabStopAnchorPosition, isRTL, rtlTabsToBeAligned);
+ }
+ if (rtlTabsToBeAligned != null) {
+ for (TabStop rtlTabStop : rtlTabsToBeAligned) {
+ rtlTabStop.setPosition(originalWidth - width - rtlTabStop.getPosition());
}
- if (!isRTL)
- tabStop.setPosition(tabStopPosition);
- else
- tabStop.setPosition(originalWidth - width - tabPosition);
}
if (currentChar >= totalTextLength) {
@@ -527,6 +531,22 @@ else if (ck.isSeparator()) {
return new PdfLine(0, originalWidth, originalWidth - getWidth(oldCurrentChar, newCurrentChar, originalWidth), alignment, false, createArrayOfPdfChunks(oldCurrentChar, newCurrentChar), isRTL);
}
+ private float processTabStop(TabStop tabStop, float tabPosition, float originalWidth, float width, float tabStopAnchorPosition, boolean isRTL, List rtlTabsToBeAligned) {
+ float tabStopPosition = tabStop.getPosition(tabPosition, originalWidth - width, tabStopAnchorPosition);
+ width -= tabStopPosition - tabPosition;
+ if (width < 0) {
+ tabStopPosition += width;
+ width = 0;
+ }
+ if (!isRTL) {
+ tabStop.setPosition(tabStopPosition);
+ } else {
+ tabStop.setPosition(tabPosition); // This will be mirrored when we know exact line width
+ rtlTabsToBeAligned.add(tabStop);
+ }
+ return width;
+ }
+
/**
* Call this after processLine() to know if any word was split into several lines.
* @return
@@ -610,7 +630,7 @@ public ArrayList createArrayOfPdfChunks(int startIdx, int endIdx) {
}
public ArrayList createArrayOfPdfChunks(int startIdx, int endIdx, PdfChunk extraPdfChunk) {
- boolean bidi = runDirection == PdfWriter.RUN_DIRECTION_LTR || runDirection == PdfWriter.RUN_DIRECTION_RTL;
+ boolean bidi = runDirection != PdfWriter.RUN_DIRECTION_NO_BIDI;
if (bidi)
reorder(startIdx, endIdx);
@@ -659,14 +679,14 @@ public int[] getWord(int startIdx, int idx) {
int first = idx;
// forward
for (; last < totalTextLength; ++last) {
- if (!Character.isLetter(text[last]) && !Character.isDigit(text[last]))
+ if (!Character.isLetter(text[last]) && !Character.isDigit(text[last]) && text[last] != '\u00AD')
break;
}
if (last == idx)
return null;
// backward
for (; first >= startIdx; --first) {
- if (!Character.isLetter(text[first]) && !Character.isDigit(text[first]))
+ if (!Character.isLetter(text[first]) && !Character.isDigit(text[first]) && text[first] != '\u00AD')
break;
}
++first;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/BidiOrder.java b/itext/src/main/java/com/itextpdf/text/pdf/BidiOrder.java
index fa35d43090..9896d67e0c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/BidiOrder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/BidiOrder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ByteBuffer.java b/itext/src/main/java/com/itextpdf/text/pdf/ByteBuffer.java
index 0e30bceaec..ab24aca5cc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ByteBuffer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ByteBuffer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/CFFFont.java b/itext/src/main/java/com/itextpdf/text/pdf/CFFFont.java
index 50c5ec9bde..0975a3723d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/CFFFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/CFFFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/CFFFontSubset.java b/itext/src/main/java/com/itextpdf/text/pdf/CFFFontSubset.java
index c836a5e48f..f230144f61 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/CFFFontSubset.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/CFFFontSubset.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/CJKFont.java b/itext/src/main/java/com/itextpdf/text/pdf/CJKFont.java
index c7a33add4f..faa5c62406 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/CJKFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/CJKFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/CMYKColor.java b/itext/src/main/java/com/itextpdf/text/pdf/CMYKColor.java
index d49f5ce17f..52cb0f9133 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/CMYKColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/CMYKColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/CMapAwareDocumentFont.java b/itext/src/main/java/com/itextpdf/text/pdf/CMapAwareDocumentFont.java
index 0627b24d71..2cd70f8a5f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/CMapAwareDocumentFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/CMapAwareDocumentFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ColorDetails.java b/itext/src/main/java/com/itextpdf/text/pdf/ColorDetails.java
index 0a002e9fc5..d6861ec11d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ColorDetails.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ColorDetails.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ColumnText.java b/itext/src/main/java/com/itextpdf/text/pdf/ColumnText.java
index ce4b9fecdc..64c36f4449 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ColumnText.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ColumnText.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -142,7 +141,7 @@ public class ColumnText {
*/
public static final int DIGIT_TYPE_AN_EXTENDED = ArabicLigaturizer.DIGIT_TYPE_AN_EXTENDED;
- protected int runDirection = PdfWriter.RUN_DIRECTION_DEFAULT;
+ protected int runDirection = PdfWriter.RUN_DIRECTION_NO_BIDI;
/**
* the space char ratio
@@ -1022,10 +1021,7 @@ public int go(final boolean simulate, final IAccessibleElement elementToGo) thro
PdfContentByte graphics = null;
PdfContentByte text = null;
firstLineY = Float.NaN;
- int localRunDirection = PdfWriter.RUN_DIRECTION_NO_BIDI;
- if (runDirection != PdfWriter.RUN_DIRECTION_DEFAULT) {
- localRunDirection = runDirection;
- }
+ int localRunDirection = runDirection;
if (canvas != null) {
graphics = canvas;
pdf = canvas.getPdfDocument();
@@ -1089,6 +1085,7 @@ public int go(final boolean simulate, final IAccessibleElement elementToGo) thro
}
yLine -= currentLeading;
if (!simulate && !dirty) {
+ // TODO this is not quite right. Currently, reversed chars may appear whenever bidi algorithm was applied, which is run direction is not NO_BIDI
if (line.isRTL && canvas.isTagged())
{
canvas.beginMarkedContentSequence(PdfName.REVERSEDCHARS);
@@ -1125,6 +1122,7 @@ public int go(final boolean simulate, final IAccessibleElement elementToGo) thro
}
line = bidiLine.processLine(x1, x2 - x1 - firstIndent - rightIndent, alignment, localRunDirection, arabicOptions, minY, yLine, descender);
if (!simulate && !dirty) {
+ // TODO this is not quite right. Currently, reversed chars may appear whenever bidi algorithm was applied, which is run direction is not NO_BIDI
if (line.isRTL && canvas.isTagged())
{
canvas.beginMarkedContentSequence(PdfName.REVERSEDCHARS);
@@ -1714,6 +1712,10 @@ protected int goComposite(final boolean simulate) throws DocumentException {
// get the PdfPTable element
PdfPTable table = (PdfPTable) element;
+ int backedUpRunDir = runDirection; // storing original run direction just in case
+ runDirection = table.getRunDirection(); // using table run direction
+ isRTL = runDirection == PdfWriter.RUN_DIRECTION_RTL;
+
// tables without a body are dismissed
if (table.size() <= table.getHeaderRows()) {
compositeElements.removeFirst();
@@ -2054,6 +2056,10 @@ else if (table.isExtendLastRow() && minY > PdfPRow.BOTTOM_LIMIT) {
rowIdx = k;
return NO_MORE_COLUMN;
}
+
+ // restoring original run direction
+ runDirection = backedUpRunDir;
+ isRTL = runDirection == PdfWriter.RUN_DIRECTION_RTL;
} else if (element.type() == Element.YMARK) {
if (!simulate) {
DrawInterface zh = (DrawInterface) element;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/DefaultSplitCharacter.java b/itext/src/main/java/com/itextpdf/text/pdf/DefaultSplitCharacter.java
index 9ae46e5fc0..4611635e68 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/DefaultSplitCharacter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/DefaultSplitCharacter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/DeviceNColor.java b/itext/src/main/java/com/itextpdf/text/pdf/DeviceNColor.java
index 7179b8fa10..8a11d7a79a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/DeviceNColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/DeviceNColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/DocumentFont.java b/itext/src/main/java/com/itextpdf/text/pdf/DocumentFont.java
index 196cb501f9..9f48e50513 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/DocumentFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/DocumentFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/EnumerateTTC.java b/itext/src/main/java/com/itextpdf/text/pdf/EnumerateTTC.java
index 40c4f6d31b..f968b1bf30 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/EnumerateTTC.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/EnumerateTTC.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ExtendedColor.java b/itext/src/main/java/com/itextpdf/text/pdf/ExtendedColor.java
index ddf2dbf702..8638dd263d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ExtendedColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ExtendedColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ExtraEncoding.java b/itext/src/main/java/com/itextpdf/text/pdf/ExtraEncoding.java
index 7adc2f5a5c..e601186d62 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ExtraEncoding.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ExtraEncoding.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java b/itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java
index bb4159f060..22c9d41937 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FdfReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FdfWriter.java b/itext/src/main/java/com/itextpdf/text/pdf/FdfWriter.java
index b10229b948..37a764b5a9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FdfWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FdfWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FilterHandlers.java b/itext/src/main/java/com/itextpdf/text/pdf/FilterHandlers.java
index 86657a2d8f..b550c5378c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FilterHandlers.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FilterHandlers.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FloatLayout.java b/itext/src/main/java/com/itextpdf/text/pdf/FloatLayout.java
index 54a80a448e..2cee419f7c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FloatLayout.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FloatLayout.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FontDetails.java b/itext/src/main/java/com/itextpdf/text/pdf/FontDetails.java
index b7672bd487..4fd0038251 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FontDetails.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FontDetails.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/FontSelector.java b/itext/src/main/java/com/itextpdf/text/pdf/FontSelector.java
index fb2146799b..8782d9b48c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/FontSelector.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/FontSelector.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Glyph.java b/itext/src/main/java/com/itextpdf/text/pdf/Glyph.java
index 939f3c8426..9fe6464f8a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Glyph.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Glyph.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/GlyphList.java b/itext/src/main/java/com/itextpdf/text/pdf/GlyphList.java
index 8ee0775d64..2c88d2476a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/GlyphList.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/GlyphList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/GrayColor.java b/itext/src/main/java/com/itextpdf/text/pdf/GrayColor.java
index 3e34689d18..dc4a6ed653 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/GrayColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/GrayColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/HyphenationAuto.java b/itext/src/main/java/com/itextpdf/text/pdf/HyphenationAuto.java
index e8e0067d77..0861f23834 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/HyphenationAuto.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/HyphenationAuto.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/HyphenationEvent.java b/itext/src/main/java/com/itextpdf/text/pdf/HyphenationEvent.java
index d1aad97ecc..e372bdd658 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/HyphenationEvent.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/HyphenationEvent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ICC_Profile.java b/itext/src/main/java/com/itextpdf/text/pdf/ICC_Profile.java
index 5bba78408b..b6de029e60 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ICC_Profile.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ICC_Profile.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ICachedColorSpace.java b/itext/src/main/java/com/itextpdf/text/pdf/ICachedColorSpace.java
index 8930035849..a9a17a5408 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ICachedColorSpace.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ICachedColorSpace.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/IPdfSpecialColorSpace.java b/itext/src/main/java/com/itextpdf/text/pdf/IPdfSpecialColorSpace.java
index 97caf423c2..c25567ea86 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/IPdfSpecialColorSpace.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/IPdfSpecialColorSpace.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/LabColor.java b/itext/src/main/java/com/itextpdf/text/pdf/LabColor.java
index cdc9da2cc7..dd521146c8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/LabColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/LabColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/MappedRandomAccessFile.java b/itext/src/main/java/com/itextpdf/text/pdf/MappedRandomAccessFile.java
index ecb99601d1..a15acbc57c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/MappedRandomAccessFile.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/MappedRandomAccessFile.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/NumberArray.java b/itext/src/main/java/com/itextpdf/text/pdf/NumberArray.java
index 371a8f4a9b..d93c1c9b68 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/NumberArray.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/NumberArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamCounter.java b/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamCounter.java
index 37a8374498..9be7a3843d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamCounter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamCounter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamEncryption.java b/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamEncryption.java
index 15d3d37d35..9e070d54f0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamEncryption.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/OutputStreamEncryption.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PRAcroForm.java b/itext/src/main/java/com/itextpdf/text/pdf/PRAcroForm.java
index b6ad983afb..96f24345b6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PRAcroForm.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PRAcroForm.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PRIndirectReference.java b/itext/src/main/java/com/itextpdf/text/pdf/PRIndirectReference.java
index 79e2896784..3e4f8cd2e7 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PRIndirectReference.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PRIndirectReference.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PRStream.java b/itext/src/main/java/com/itextpdf/text/pdf/PRStream.java
index 1e7daf8781..2e404e765f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PRStream.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PRStream.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PRTokeniser.java b/itext/src/main/java/com/itextpdf/text/pdf/PRTokeniser.java
index 2cbae5fe4b..286d55bae4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PRTokeniser.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PRTokeniser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PageResources.java b/itext/src/main/java/com/itextpdf/text/pdf/PageResources.java
index 1a61efbff8..159a45d2c0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PageResources.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PageResources.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PatternColor.java b/itext/src/main/java/com/itextpdf/text/pdf/PatternColor.java
index fc903eb810..c7a4cc550f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PatternColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PatternColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfAcroForm.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfAcroForm.java
index a50bde9726..d8d9adb576 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfAcroForm.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfAcroForm.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfAction.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfAction.java
index 4e9c7bddfe..11ed6fcdfa 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfAction.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfAction.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfAnnotation.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfAnnotation.java
index 6986e0888b..05635c5dde 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfAnnotation.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfAnnotation.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfAppearance.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfAppearance.java
index ec6686d9ba..d1b494cb4c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfAppearance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfAppearance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfArray.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfArray.java
index e6b9da03a8..381c307355 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfArray.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfArtifact.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfArtifact.java
index c5c47570d9..5fb01047e3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfArtifact.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfArtifact.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfBody.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfBody.java
index d367582234..a252c427b8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfBody.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfBody.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfBoolean.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfBoolean.java
index ccb68e60fc..42eb7c140c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfBoolean.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfBoolean.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderArray.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderArray.java
index 3e461e2acb..2684cf9aec 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderArray.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderDictionary.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderDictionary.java
index 5fc813ff93..94b7cccfac 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderDictionary.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfBorderDictionary.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfChunk.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfChunk.java
index fee2ea52b0..fe27261a42 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfChunk.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfChunk.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -959,9 +958,7 @@ float getCharWidth(int c) {
}
public static boolean noPrint(int c) {
- return c >= 0x200b && c <= 0x200f || c >= 0x202a && c <= 0x202e;
+ return c >= 0x200b && c <= 0x200f || c >= 0x202a && c <= 0x202e || c == '\u00AD';
}
-
-
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfColor.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfColor.java
index dab12a7962..94da08cef1 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfConcatenate.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfConcatenate.java
index 5fd010e417..23a61f4b08 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfConcatenate.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfConcatenate.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfContentByte.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfContentByte.java
index 7cfe9a14fc..f8309cbf54 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfContentByte.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfContentByte.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -225,6 +224,7 @@ void restore(final GraphicState restore) {
private int mcDepth = 0;
private boolean inText = false;
+ private boolean suppressTagging = false;
private static HashMap abrev = new HashMap();
@@ -273,12 +273,31 @@ public String toString() {
return content.toString();
}
+ /**
+ * [SUP-1395] If set, prevents iText from marking content and creating structure tags for items added to this content stream.
+ * (By default, iText automatically marks content using BDC/EMC operators, and adds a structure tag for the new content
+ * at the end of the page.)
+ */
+ public boolean isTaggingSuppressed() {
+ return suppressTagging;
+ }
+
+ /**
+ * [SUP-1395] If set, prevents iText from marking content and creating structure tags for items added to this content stream.
+ * (By default, iText automatically marks content using BDC/EMC operators, and adds a structure tag for the new content
+ * at the end of the page.)
+ */
+ public PdfContentByte setSuppressTagging(boolean suppressTagging) {
+ this.suppressTagging = suppressTagging;
+ return this;
+ }
+
/**
* Checks if the content needs to be tagged.
* @return false if no tags need to be added
*/
public boolean isTagged() {
- return writer != null && writer.isTagged();
+ return writer != null && writer.isTagged() && !isTaggingSuppressed();
}
/**
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfContentParser.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfContentParser.java
index 6f72d6c79e..24c05d4cbd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfContentParser.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfContentParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfContents.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfContents.java
index 00414e203c..c0e4cd4c7f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfContents.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfContents.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopy.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopy.java
index 51dc6461dd..573da52b7a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopy.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFields.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFields.java
index f681cb2f53..9df8c39514 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFields.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFields.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFieldsImp.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFieldsImp.java
index d58c359155..8edf212d86 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFieldsImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFieldsImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyForms.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyForms.java
index 532d4369be..8785c11d10 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyForms.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyForms.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFormsImp.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFormsImp.java
index f054686a3a..e7cc00e447 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFormsImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfCopyFormsImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDashPattern.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDashPattern.java
index 035b986c7b..4cac18493f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDashPattern.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDashPattern.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDate.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDate.java
index d1b699a164..8e6ba65e95 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDate.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDate.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDestination.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDestination.java
index caf48059e2..df775b75c8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDestination.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDestination.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDeveloperExtension.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDeveloperExtension.java
index e068867a0b..df80c24ad8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDeveloperExtension.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDeveloperExtension.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDeviceNColor.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDeviceNColor.java
index fd84e2e721..bd294cac19 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDeviceNColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDeviceNColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDictionary.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDictionary.java
index 4391062917..c5476d2aaf 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDictionary.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDictionary.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDiv.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDiv.java
index 318fb7b577..3e7a455ca8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDiv.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDiv.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -110,7 +109,7 @@ public enum BorderTopStyle {DOTTED, DASHED, SOLID, DOUBLE, GROOVE, RIDGE, INSET,
private float yLine;
- protected int runDirection = PdfWriter.RUN_DIRECTION_DEFAULT;
+ protected int runDirection = PdfWriter.RUN_DIRECTION_NO_BIDI;
/**
* Defines if the div should be kept on one page if possible
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfDocument.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfDocument.java
index 9a6134c93e..ced70d988d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfDocument.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfDocument.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -1728,7 +1727,15 @@ else if (isJustified && separatorCount == 0) {
float matrix[] = image.matrix(chunk.getImageScalePercentage());
matrix[Image.CX] = xMarker + chunk.getImageOffsetX() - matrix[Image.CX];
matrix[Image.CY] = yMarker + chunk.getImageOffsetY() - matrix[Image.CY];
+ boolean wasIntext = false;
+ if ( graphics.getInText() && !(image instanceof ImgTemplate)) {
+ wasIntext = true;
+ graphics.endText();
+ }
graphics.addImage(image, matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], false, isMCBlockOpened);
+ if ( wasIntext ) {
+ graphics.beginText(true);
+ }
text.moveText(xMarker + lastBaseFactor + chunk.getImageWidth() - text.getXTLM(), 0);
}
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfEFStream.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfEFStream.java
index d699c887ea..f529a9e1a5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfEFStream.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfEFStream.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncodings.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncodings.java
index 88f575c256..407b75ed52 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncodings.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncodings.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryption.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryption.java
index 43e517f3a7..e5b4ea8998 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryption.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryption.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -808,21 +807,31 @@ public void addRecipient(Certificate cert, int permission) {
permission));
}
+ /**
+ * Computes user password if standard encryption handler is used with Standard40, Standard128 or AES128 algorithm (Revision 2 - 4).
+ *
+ * @param ownerPassword owner password of the encrypted document.
+ * @return user password, or null if revision 5 (AES256) or greater of standard encryption handler was used.
+ */
public byte[] computeUserPassword(byte[] ownerPassword) {
- byte[] userPad = computeOwnerKey(ownerKey, padPassword(ownerPassword));
- for (int i = 0; i < userPad.length; i++) {
- boolean match = true;
- for (int j = 0; j < userPad.length - i; j++) {
- if (userPad[i + j] != pad[j]) {
- match = false;
- break;
+ byte[] userPad = null;
+ if (publicKeyHandler.getRecipientsSize() == 0 &&
+ STANDARD_ENCRYPTION_40 <= revision && revision <= AES_128) {
+ userPad = computeOwnerKey(ownerKey, padPassword(ownerPassword));
+ for (int i = 0; i < userPad.length; i++) {
+ boolean match = true;
+ for (int j = 0; j < userPad.length - i; j++) {
+ if (userPad[i + j] != pad[j]) {
+ match = false;
+ break;
+ }
}
- }
- if (!match) continue;
- byte[] userPassword = new byte[i];
- System.arraycopy(userPad, 0, userPassword, 0, i);
- return userPassword;
- }
+ if (!match) continue;
+ byte[] userPassword = new byte[i];
+ System.arraycopy(userPad, 0, userPassword, 0, i);
+ return userPassword;
+ }
+ }
return userPad;
}
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryptor.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryptor.java
index 9bd652db05..a4e9d954ef 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryptor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfEncryptor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfException.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfException.java
index c13a1a864d..6335b80603 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfFileSpecification.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfFileSpecification.java
index 7435b4ae90..56eee43966 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfFileSpecification.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfFileSpecification.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfFont.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfFont.java
index 6c6779dafe..a191bae7db 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfFormField.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfFormField.java
index bdeb5b49fa..8af65b728a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfFormField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfFormField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfFormXObject.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfFormXObject.java
index 376c9aa9ee..13370b9b1f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfFormXObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfFormXObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfFunction.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfFunction.java
index 57ce80f55b..1fec01c547 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfFunction.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfFunction.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfGState.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfGState.java
index ac2dcd8a78..2c7f3a0d65 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfGState.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfGState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfICCBased.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfICCBased.java
index de463f38b7..cad777c3bb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfICCBased.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfICCBased.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfImage.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfImage.java
index e570089469..22b202d5be 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfImage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfImage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfImportedPage.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfImportedPage.java
index 0191e19dac..c408e73f54 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfImportedPage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfImportedPage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectObject.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectObject.java
index 73660d1cc1..303f9882c1 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectReference.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectReference.java
index fe9ac95258..a675eff5d7 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectReference.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfIndirectReference.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfIsoConformanceException.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfIsoConformanceException.java
index b84e1b39fd..3816d0b66f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfIsoConformanceException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfIsoConformanceException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLabColor.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLabColor.java
index c48e58ca9a..cc80d87105 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLabColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLabColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLayer.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLayer.java
index fcd98643d0..4850de70f2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLayer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLayer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLayerMembership.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLayerMembership.java
index 056be35316..b3dc03149a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLayerMembership.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLayerMembership.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLine.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLine.java
index 2108832fc1..98584055ff 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLine.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLine.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLister.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLister.java
index 458e2e43fe..de345d96ed 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLister.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLister.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfLiteral.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfLiteral.java
index db2cbbffd8..2556305105 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfLiteral.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfLiteral.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfMediaClipData.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfMediaClipData.java
index 64c565ad4b..1c28a561c0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfMediaClipData.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfMediaClipData.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfName.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfName.java
index aff26a945e..03db4698b2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfName.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfName.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfNameTree.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfNameTree.java
index a00153548a..97a3af8dd0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfNameTree.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfNameTree.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfNull.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfNull.java
index bfb8d2ab33..8365ec5171 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfNull.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfNull.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfNumber.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfNumber.java
index 16d2874b42..7dbec2cc3b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfNumber.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfNumber.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfNumberTree.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfNumberTree.java
index 48d6e326a4..57dca7b9d9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfNumberTree.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfNumberTree.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfOCG.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfOCG.java
index 2f4259d3c8..f5e2c32c3e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfOCG.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfOCG.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfOCProperties.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfOCProperties.java
index 00fae7791a..b198b3abc0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfOCProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfOCProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfObject.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfObject.java
index 2ab8bf5772..1b18d0dc63 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfOutline.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfOutline.java
index 8fabf3fda2..5c931398c0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfOutline.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfOutline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPCell.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPCell.java
index 09268fe777..976395d95b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPCell.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPCell.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPCellEvent.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPCellEvent.java
index 6bab681a56..993e4f154e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPCellEvent.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPCellEvent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPHeaderCell.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPHeaderCell.java
index f6f35a1c37..d071585703 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPHeaderCell.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPHeaderCell.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPRow.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPRow.java
index b85dfe2c29..3a6819a53a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPRow.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPRow.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPSXObject.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPSXObject.java
index 7e89aa3cd8..b3838ea9bc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPSXObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPSXObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTable.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTable.java
index 313a98f789..02ca1971cb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTable.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTable.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -143,7 +142,7 @@ public class PdfPTable implements LargeElement, Spaceable, IAccessibleElement {
protected boolean isColspan = false;
- protected int runDirection = PdfWriter.RUN_DIRECTION_DEFAULT;
+ protected int runDirection = PdfWriter.RUN_DIRECTION_NO_BIDI;
/**
* Holds value of property lockedWidth.
@@ -538,7 +537,7 @@ public PdfPCell addCell(final PdfPCell cell) {
isColspan = true;
}
int rdir = ncell.getRunDirection();
- if (rdir == PdfWriter.RUN_DIRECTION_DEFAULT) {
+ if (rdir == PdfWriter.RUN_DIRECTION_NO_BIDI) {
ncell.setRunDirection(runDirection);
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableBody.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableBody.java
index b40a57019b..4969c81341 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableBody.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableBody.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEvent.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEvent.java
index 43320bdebc..961c09a534 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEvent.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEvent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventAfterSplit.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventAfterSplit.java
index 0d992707fc..3a7151730d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventAfterSplit.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventAfterSplit.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventSplit.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventSplit.java
index 0dd8141e7d..8b92b59ff0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventSplit.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableEventSplit.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableFooter.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableFooter.java
index c93460c942..b3ef8ef7eb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableFooter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableFooter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableHeader.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableHeader.java
index 4ff30af5f7..a33207d3bd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableHeader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPTableHeader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPage.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPage.java
index 294565e317..fb37d160fd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageElement.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageElement.java
index 2497037b8b..e49966e069 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageElement.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEvent.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEvent.java
index 8418686c47..a39b0e4f66 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEvent.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEvent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEventHelper.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEventHelper.java
index 3733e61c02..a62a52ab88 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEventHelper.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageEventHelper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageLabels.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageLabels.java
index 884d6bc67d..ae7b3bedc8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPageLabels.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPageLabels.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPages.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPages.java
index d9f0faf6ea..c2f75504a5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPages.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPages.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPattern.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPattern.java
index bb5f977bd8..5389814958 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPattern.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPattern.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPatternPainter.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPatternPainter.java
index abf349c05a..cbd123d585 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPatternPainter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPatternPainter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeyRecipient.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeyRecipient.java
index dab99467ee..7d4cd1359a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeyRecipient.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeyRecipient.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java
index c8491c63ea..75a6921c50 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfPublicKeySecurityHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfReader.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfReader.java
index 7252cf7ac4..569a35abc8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -55,24 +54,42 @@
import com.itextpdf.text.io.RandomAccessSource;
import com.itextpdf.text.io.RandomAccessSourceFactory;
import com.itextpdf.text.io.WindowRandomAccessSource;
-import com.itextpdf.text.log.*;
+import com.itextpdf.text.log.Counter;
+import com.itextpdf.text.log.CounterFactory;
+import com.itextpdf.text.log.Level;
+import com.itextpdf.text.log.Logger;
+import com.itextpdf.text.log.LoggerFactory;
import com.itextpdf.text.pdf.PRTokeniser.TokenType;
import com.itextpdf.text.pdf.interfaces.PdfViewerPreferences;
import com.itextpdf.text.pdf.internal.PdfViewerPreferencesImp;
import com.itextpdf.text.pdf.security.ExternalDecryptionProcess;
-import org.bouncycastle.cert.X509CertificateHolder;
-import org.bouncycastle.cms.CMSEnvelopedData;
-import org.bouncycastle.cms.RecipientInformation;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import java.security.Key;
import java.security.MessageDigest;
import java.security.PrivateKey;
import java.security.cert.Certificate;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Stack;
import java.util.zip.InflaterInputStream;
+import org.bouncycastle.cert.X509CertificateHolder;
+import org.bouncycastle.cms.CMSEnvelopedData;
+import org.bouncycastle.cms.RecipientInformation;
+
/**
* Reads a PDF document.
* @author Paulo Soares
@@ -515,6 +532,8 @@ protected PdfReaderInstance getPdfReaderInstance(final PdfWriter writer) {
}
/** Gets the number of pages in the document.
+ * Partial mode: return the value stored in the COUNT field of the pageref
+ * Full mode: return the total number of pages found while loading in the entire document.
* @return the number of pages in the document
*/
public int getNumberOfPages() {
@@ -752,6 +771,10 @@ protected void readPdf() throws IOException {
removeUnusedObjects();
}
+ /**
+ * Partially parses the pdf
+ *
+ * */
protected void readPdfPartial() throws IOException {
fileLength = tokens.getFile().length();
@@ -797,7 +820,23 @@ private void readDecryptedDocObj() throws IOException {
byte[] encryptionKey = null;
encrypted = true;
PdfDictionary enc = (PdfDictionary)getPdfObject(encDic);
-
+ //This string of condidions is to determine whether or not the authevent for this PDF is EFOPEN
+ //If it is, we return since the attachments of the PDF are what are encrypted, not the PDF itself.
+ //Without this check we run into a bad password exception when trying to open documents that have an
+ //auth event type of EFOPEN.
+ PdfDictionary cfDict = enc.getAsDict(PdfName.CF);
+ if(cfDict != null){
+ PdfDictionary stdCFDict = cfDict.getAsDict(PdfName.STDCF);
+ if(stdCFDict != null){
+ PdfName authEvent = stdCFDict.getAsName(PdfName.AUTHEVENT);
+ if(authEvent != null){
+ //Return only if the event is EFOPEN and there is no password so that
+ //attachments that are encrypted can still be opened.
+ if(authEvent.compareTo(PdfName.EFOPEN) == 0 && !this.ownerPasswordUsed)
+ return;
+ }
+ }
+ }
String s;
PdfObject o;
@@ -1252,7 +1291,7 @@ protected void readPages() throws IOException {
throw new InvalidPdfException(MessageLocalization.getComposedMessage("the.document.has.no.catalog.object"));
}
rootPages = catalog.getAsDict(PdfName.PAGES);
- if (rootPages == null || !PdfName.PAGES.equals(rootPages.get(PdfName.TYPE))) {
+ if (rootPages == null || (!PdfName.PAGES.equals(rootPages.get(PdfName.TYPE)) && !PdfName.PAGES.equals(rootPages.get(new PdfName("Types"))))) {
if (debugmode) {
if ( LOGGER.isLogging(Level.ERROR) ) {
LOGGER.error(MessageLocalization.getComposedMessage("the.document.has.no.page.root"));
@@ -4082,7 +4121,11 @@ public boolean isMetadataEncrypted() {
}
/**
- * @return byte array of computed user password, or null if not encrypted or no ownerPassword is used.
+ * Computes user password if standard encryption handler is used with Standard40, Standard128 or AES128 encryption algorithm.
+ *
+ * @return user password, or null if not a standard encryption handler was used,
+ * if standard encryption handler was used with AES256 encryption algorithm,
+ * or if ownerPasswordUsed wasn't use to open the document.
*/
public byte[] computeUserPassword() {
if (!encrypted || !ownerPasswordUsed) return null;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfReaderInstance.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfReaderInstance.java
index 8688f60702..7f32fd91e0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfReaderInstance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfReaderInstance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfRectangle.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfRectangle.java
index e994eca2f2..57518c1f97 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfRectangle.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfRectangle.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfRendition.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfRendition.java
index 26ad356d7b..9ca100038f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfRendition.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfRendition.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfResources.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfResources.java
index 22fbad8106..145e3a8283 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfResources.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfResources.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfShading.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfShading.java
index 9ef9d84d0e..2ed42e3c7d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfShading.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfShading.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfShadingPattern.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfShadingPattern.java
index 3d9f1af5ba..b5a851770f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfShadingPattern.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfShadingPattern.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfSigLockDictionary.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfSigLockDictionary.java
index a1d6a387ca..01fce809dd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfSigLockDictionary.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfSigLockDictionary.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfSignature.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfSignature.java
index e0a34cda0b..391948cb9d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfSignature.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfSignature.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfSignatureAppearance.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfSignatureAppearance.java
index 0ef3d88a9b..e8c17810a0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfSignatureAppearance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfSignatureAppearance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfSmartCopy.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfSmartCopy.java
index 0982475d5d..2389f37b03 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfSmartCopy.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfSmartCopy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfSpotColor.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfSpotColor.java
index 9244131336..7640c4dd7b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfSpotColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfSpotColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStamper.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStamper.java
index bab850037f..3ca8561b81 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStamper.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStamper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -44,15 +43,6 @@
*/
package com.itextpdf.text.pdf;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.security.cert.Certificate;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
import com.itextpdf.text.DocWriter;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.ExceptionConverter;
@@ -65,6 +55,15 @@
import com.itextpdf.text.pdf.security.LtvVerification;
import com.itextpdf.text.xml.xmp.XmpWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.security.cert.Certificate;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
/** Applies extra content to the pages of a PDF document.
* This extra content can be all the objects allowed in PdfContentByte
* including pages from other Pdfs. The original PDF will keep
@@ -301,7 +300,7 @@ public void setEncryption(final byte userPassword[], final byte ownerPassword[],
* @param userPassword the user password. Can be null or empty
* @param ownerPassword the owner password. Can be null or empty
* @param permissions the user permissions
- * @param encryptionType the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.
+ * @param encryptionType the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128, ENCRYPTION_AES128 or ENCRYPTION_AES256.
* Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext
* @throws DocumentException if the document is already open
*/
@@ -358,7 +357,7 @@ public void setEncryption(final int encryptionType, final String userPassword, f
* Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext
* @param certs the public certificates to be used for the encryption
* @param permissions the user permissions for each of the certificates
- * @param encryptionType the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.
+ * @param encryptionType the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128, ENCRYPTION_AES128 or ENCRYPTION_AES256.
* @throws DocumentException if the encryption was set too late
*/
public void setEncryption(final Certificate[] certs, final int[] permissions, final int encryptionType) throws DocumentException {
@@ -814,7 +813,14 @@ public static PdfStamper createXmlSignature(final PdfReader reader, final Output
public Map getPdfLayers() {
return stamper.getPdfLayers();
}
-
+
+ /**
+ * Marks the specified object as used or changed. Used objects will be written to a new revision when using PdfStamper
+ * in append mode. The specified PdfObject needs to be an Indirect Reference or its getIndRef() method should not
+ * return null.
+ *
+ * @param obj the used PDF object
+ */
public void markUsed(PdfObject obj) {
stamper.markUsed(obj);
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStamperImp.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStamperImp.java
index 8dd316884a..2309003ae9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStamperImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStamperImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStream.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStream.java
index 4cad7785e8..ed7b743a72 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStream.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStream.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfString.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfString.java
index 177e790c73..7693b0755f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfString.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfString.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructTreeController.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructTreeController.java
index 0689010dd2..48d2006b31 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructTreeController.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructTreeController.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -436,7 +435,7 @@ protected void addRole(PdfName structType) throws BadPdfFormatException {
roleMap.put(structType, object);
} else if ((currentRole = roleMap.get(structType)) != null) {
if (!currentRole.equals(object)) {
- throw new BadPdfFormatException(MessageLocalization.getComposedMessage("conflict.in.rolemap", object));
+ throw new BadPdfFormatException(MessageLocalization.getComposedMessage("conflict.in.rolemap", structType));
}
} else {
roleMap.put(structType, object);
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureElement.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureElement.java
index 7e0508b5e8..1222362d5f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureElement.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureTreeRoot.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureTreeRoot.java
index 56a2df5cf7..33c60b940d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureTreeRoot.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfStructureTreeRoot.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfTemplate.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfTemplate.java
index 0138cfa639..5d84869e70 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfTemplate.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfTemplate.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfTextArray.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfTextArray.java
index 7ed7ecee1e..6e513b0076 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfTextArray.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfTextArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfTransition.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfTransition.java
index 0435affbdd..553c5124bc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfTransition.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfTransition.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfTransparencyGroup.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfTransparencyGroup.java
index b81a98f3fd..ec83c029c9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfTransparencyGroup.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfTransparencyGroup.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfVisibilityExpression.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfVisibilityExpression.java
index 65b3510011..f8e77862d4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfVisibilityExpression.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfVisibilityExpression.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfWriter.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfWriter.java
index 950bbd342c..82c15d557f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -2113,7 +2112,19 @@ PdfEncryption getEncryption() {
return crypto;
}
- /** @see com.itextpdf.text.pdf.interfaces.PdfEncryptionSettings#setEncryption(byte[], byte[], int, int) */
+ /**
+ * Sets the encryption options for this document. The userPassword and the
+ * ownerPassword can be null or have zero length. In this case the ownerPassword
+ * is replaced by a random string. The open permissions for the document can be
+ * AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations,
+ * AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting.
+ * The permissions can be combined by ORing them.
+ * @param userPassword the user password. Can be null or empty
+ * @param ownerPassword the owner password. Can be null or empty
+ * @param permissions the user permissions
+ * @param encryptionType can be any of the following: PdfWriter#STANDARD_ENCRYPTION_40, PdfWriter#STANDARD_ENCRYPTION_128, PdfWriter#ENCRYPTION_AES_128 or PdfWriter#ENCRYPTION_AES_256
+ * @throws DocumentException if the document is already open
+ */
public void setEncryption(final byte userPassword[], final byte ownerPassword[], final int permissions, final int encryptionType) throws DocumentException {
if (pdf.isOpen())
throw new DocumentException(MessageLocalization.getComposedMessage("encryption.can.only.be.added.before.opening.the.document"));
@@ -2122,7 +2133,18 @@ public void setEncryption(final byte userPassword[], final byte ownerPassword[],
crypto.setupAllKeys(userPassword, ownerPassword, permissions);
}
- /** @see com.itextpdf.text.pdf.interfaces.PdfEncryptionSettings#setEncryption(java.security.cert.Certificate[], int[], int) */
+ /**
+ * Sets the encryption options for this document. The userPassword and the
+ * ownerPassword can be null or have zero length. In this case the ownerPassword
+ * is replaced by a random string. The open permissions for the document can be
+ * AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations,
+ * AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting.
+ * The permissions can be combined by ORing them.
+ * @param certs Certificates to encrypt the document
+ * @param permissions the user permissions
+ * @param encryptionType can be any of the following: PdfWriter#STANDARD_ENCRYPTION_40, PdfWriter#STANDARD_ENCRYPTION_128, PdfWriter#ENCRYPTION_AES_128 or PdfWriter#ENCRYPTION_AES_256
+ * @throws DocumentException if the document is already open
+ */
public void setEncryption(final Certificate[] certs, final int[] permissions, final int encryptionType) throws DocumentException {
if (pdf.isOpen())
throw new DocumentException(MessageLocalization.getComposedMessage("encryption.can.only.be.added.before.opening.the.document"));
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PdfXConformanceException.java b/itext/src/main/java/com/itextpdf/text/pdf/PdfXConformanceException.java
index 0ed3969e4b..ea20332f82 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PdfXConformanceException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PdfXConformanceException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Pfm2afm.java b/itext/src/main/java/com/itextpdf/text/pdf/Pfm2afm.java
index dcd739d522..d981d34fc2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Pfm2afm.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Pfm2afm.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/PushbuttonField.java b/itext/src/main/java/com/itextpdf/text/pdf/PushbuttonField.java
index 9b292dc199..63f29fc2e5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/PushbuttonField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/PushbuttonField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/RadioCheckField.java b/itext/src/main/java/com/itextpdf/text/pdf/RadioCheckField.java
index e7f4ee7f1e..e4166b34e6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/RadioCheckField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/RadioCheckField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/RandomAccessFileOrArray.java b/itext/src/main/java/com/itextpdf/text/pdf/RandomAccessFileOrArray.java
index c23d87eb80..ac52495136 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/RandomAccessFileOrArray.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/RandomAccessFileOrArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/RefKey.java b/itext/src/main/java/com/itextpdf/text/pdf/RefKey.java
index 6c8d4a8133..61dae5ab37 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/RefKey.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/RefKey.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/SequenceList.java b/itext/src/main/java/com/itextpdf/text/pdf/SequenceList.java
index bfc6b8d089..f59521a6ba 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/SequenceList.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/SequenceList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/ShadingColor.java b/itext/src/main/java/com/itextpdf/text/pdf/ShadingColor.java
index d573c121d2..21eba13410 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/ShadingColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/ShadingColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/SimpleBookmark.java b/itext/src/main/java/com/itextpdf/text/pdf/SimpleBookmark.java
index 90321b6050..19ef59b8aa 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/SimpleBookmark.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/SimpleBookmark.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/SimpleNamedDestination.java b/itext/src/main/java/com/itextpdf/text/pdf/SimpleNamedDestination.java
index 738f783107..5e9796d651 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/SimpleNamedDestination.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/SimpleNamedDestination.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/SpotColor.java b/itext/src/main/java/com/itextpdf/text/pdf/SpotColor.java
index 5da992daf8..617789e390 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/SpotColor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/SpotColor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/StampContent.java b/itext/src/main/java/com/itextpdf/text/pdf/StampContent.java
index 81cdf792c0..e531376e97 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/StampContent.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/StampContent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/StandardDecryption.java b/itext/src/main/java/com/itextpdf/text/pdf/StandardDecryption.java
index 93e636b9ef..38853f7548 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/StandardDecryption.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/StandardDecryption.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -98,7 +97,7 @@ public byte[] update(byte[] b, int off, int len) {
}
public byte[] finish() {
- if (aes) {
+ if (cipher != null && aes) {
return cipher.doFinal();
}
else
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/StringUtils.java b/itext/src/main/java/com/itextpdf/text/pdf/StringUtils.java
index 796bcdef22..0444ffc2ba 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/StringUtils.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/StringUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/TextField.java b/itext/src/main/java/com/itextpdf/text/pdf/TextField.java
index 32bf793eb4..66db8c7dd5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/TextField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/TextField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFont.java b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFont.java
index 1caf4a4b15..a5dd37d75e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontSubSet.java b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontSubSet.java
index 8e0a130c21..5cc7988bd3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontSubSet.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontSubSet.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontUnicode.java b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontUnicode.java
index 17eac58934..89c28ab699 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontUnicode.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/TrueTypeFontUnicode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java b/itext/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java
index 02d55b9fbd..0e3bd6b2b3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/TtfUnicodeWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Type1Font.java b/itext/src/main/java/com/itextpdf/text/pdf/Type1Font.java
index e6ac8771b3..8ba8c0df15 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Type1Font.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Type1Font.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Type3Font.java b/itext/src/main/java/com/itextpdf/text/pdf/Type3Font.java
index e6f61948e5..77af4b5085 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Type3Font.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Type3Font.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/Type3Glyph.java b/itext/src/main/java/com/itextpdf/text/pdf/Type3Glyph.java
index 0a11369e5f..4b25d4d0b5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/Type3Glyph.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/Type3Glyph.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/VerticalText.java b/itext/src/main/java/com/itextpdf/text/pdf/VerticalText.java
index 4600a6d4c0..78bfba5b46 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/VerticalText.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/VerticalText.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/XfaForm.java b/itext/src/main/java/com/itextpdf/text/pdf/XfaForm.java
index 4037b42e71..3498abeeb6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/XfaForm.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/XfaForm.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -44,14 +43,24 @@
*/
package com.itextpdf.text.pdf;
+import com.itextpdf.text.ExceptionConverter;
+import com.itextpdf.text.xml.XmlDomWriter;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.EmptyStackException;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import java.io.*;
-import java.util.*;
-import com.itextpdf.text.ExceptionConverter;
-import com.itextpdf.text.xml.XmlDomWriter;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -149,12 +158,23 @@ private void extractNodes() {
}
if (xfaNodes.containsKey("datasets")) {
datasetsNode = xfaNodes.get("datasets");
- datasetsSom = new Xml2SomDatasets(datasetsNode.getFirstChild());
+ Node dataNode = findDataNode(datasetsNode);
+ datasetsSom = new Xml2SomDatasets(dataNode != null ? dataNode : datasetsNode.getFirstChild());
}
if (datasetsNode == null)
createDatasetsNode(domDocument.getFirstChild());
}
+ private Node findDataNode(Node datasetsNode) {
+ NodeList childNodes = datasetsNode.getChildNodes();
+ for (int i = 0; i < childNodes.getLength(); i++) {
+ if (childNodes.item(i).getNodeName().equals("xfa:data")) {
+ return childNodes.item(i);
+ }
+ }
+ return null;
+ }
+
public static Map extractXFANodes(Document domDocument) {
Map xfaNodes = new HashMap();
Node n = domDocument.getFirstChild();
@@ -274,7 +294,7 @@ public boolean isXfaPresent() {
public org.w3c.dom.Document getDomDocument() {
return domDocument;
}
-
+
/**
* Finds the complete field name contained in the "classic" forms from a partial
* name.
@@ -854,23 +874,19 @@ private void processDatasetsInternal(Node n) {
String s = escapeSom(n2.getLocalName());
Integer i = ss.get(s);
if (i == null)
- i = Integer.valueOf(0);
+ i = 0;
else
- i = Integer.valueOf(i.intValue() + 1);
+ i = i + 1;
ss.put(s, i);
+ stack.push(s + "[" + i.toString() + "]");
if (hasChildren(n2)) {
- stack.push(s + "[" + i.toString() + "]");
processDatasetsInternal(n2);
- stack.pop();
- }
- else {
- stack.push(s + "[" + i.toString() + "]");
- String unstack = printStack();
- order.add(unstack);
- inverseSearchAdd(unstack);
- name2Node.put(unstack, n2);
- stack.pop();
}
+ String unstack = printStack();
+ order.add(unstack);
+ inverseSearchAdd(unstack);
+ name2Node.put(unstack, n2);
+ stack.pop();
}
n2 = n2.getNextSibling();
}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/XfaXmlLocator.java b/itext/src/main/java/com/itextpdf/text/pdf/XfaXmlLocator.java
index 2facfebfb9..886d9287de 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/XfaXmlLocator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/XfaXmlLocator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/XfaXpathConstructor.java b/itext/src/main/java/com/itextpdf/text/pdf/XfaXpathConstructor.java
index 2d45b3cfa5..204efba8ea 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/XfaXpathConstructor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/XfaXpathConstructor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/XfdfReader.java b/itext/src/main/java/com/itextpdf/text/pdf/XfdfReader.java
index 6ee5f602fc..6889e6a4b1 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/XfdfReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/XfdfReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/XmlSignatureAppearance.java b/itext/src/main/java/com/itextpdf/text/pdf/XmlSignatureAppearance.java
index 4fe31bab48..56d45d12a4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/XmlSignatureAppearance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/XmlSignatureAppearance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/Base64.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/Base64.java
index dea5898ba4..0ec57b49dc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/Base64.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/Base64.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/BmpImage.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/BmpImage.java
index b509231b26..6cc15b9c26 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/BmpImage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/BmpImage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/CCITTG4Encoder.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/CCITTG4Encoder.java
index b897b00252..71b8d571bb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/CCITTG4Encoder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/CCITTG4Encoder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/GifImage.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/GifImage.java
index d0b12bc687..4dc3e99150 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/GifImage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/GifImage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2Image.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2Image.java
index d44a88ef9e..564de38478 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2Image.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2Image.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2SegmentReader.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2SegmentReader.java
index bc8bc674f2..58c8286ed7 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2SegmentReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/JBIG2SegmentReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/PngImage.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/PngImage.java
index af5f976075..4582348d6e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/PngImage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/PngImage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/PngWriter.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/PngWriter.java
index 396a766f4d..60155a1668 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/PngWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/PngWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffImage.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffImage.java
index a32d3dab97..252aeff3cf 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffImage.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffImage.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffWriter.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffWriter.java
index 37bdbb7094..4d20992a7e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/TiffWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/InputMeta.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/InputMeta.java
index 0673b6647b..ca10c1fcb6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/InputMeta.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/InputMeta.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaBrush.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaBrush.java
index 7425922bdc..867658ce52 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaBrush.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaBrush.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaDo.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaDo.java
index 8488294d31..2d723bbe34 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaDo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaDo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaFont.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaFont.java
index 41e5d7c97a..69a5f6c83f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaFont.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaFont.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaObject.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaObject.java
index dd65f7be5c..8dbef8664e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaPen.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaPen.java
index ad25abe8ab..bf42dd8807 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaPen.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaPen.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaState.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaState.java
index 5167f28e7b..84b9970840 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaState.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/MetaState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/Point.java b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/Point.java
index 90fc1e6e1b..b3c0ff37c3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/Point.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/codec/wmf/Point.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollection.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollection.java
index e63a7d5fc2..e16f907f49 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollection.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollection.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionField.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionField.java
index 45002eb495..026276d465 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionField.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionItem.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionItem.java
index 04e25beb93..60039fcb93 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionItem.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionItem.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSchema.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSchema.java
index 72287ab7f2..d3cc77321f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSort.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSort.java
index 176bb64b82..1366dc249b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSort.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfCollectionSort.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfTargetDictionary.java b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfTargetDictionary.java
index 656e77e644..5b29dd92a2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfTargetDictionary.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/collection/PdfTargetDictionary.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipher.java b/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipher.java
index 069d8bf5ed..fae8773fcc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipher.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipher.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipherCBCnoPad.java b/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipherCBCnoPad.java
index f3f9387a44..89455e8d85 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipherCBCnoPad.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/crypto/AESCipherCBCnoPad.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/crypto/ARCFOUREncryption.java b/itext/src/main/java/com/itextpdf/text/pdf/crypto/ARCFOUREncryption.java
index 38e7ba5035..c512729f04 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/crypto/ARCFOUREncryption.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/crypto/ARCFOUREncryption.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/crypto/IVGenerator.java b/itext/src/main/java/com/itextpdf/text/pdf/crypto/IVGenerator.java
index 641f7ffdac..0f4a1c810b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/crypto/IVGenerator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/crypto/IVGenerator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/draw/DottedLineSeparator.java b/itext/src/main/java/com/itextpdf/text/pdf/draw/DottedLineSeparator.java
index 6a56cc3b76..125594cc7c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/draw/DottedLineSeparator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/draw/DottedLineSeparator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/draw/DrawInterface.java b/itext/src/main/java/com/itextpdf/text/pdf/draw/DrawInterface.java
index 02e736786e..107856916a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/draw/DrawInterface.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/draw/DrawInterface.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/draw/LineSeparator.java b/itext/src/main/java/com/itextpdf/text/pdf/draw/LineSeparator.java
index 6f592b2046..27d3eda3fb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/draw/LineSeparator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/draw/LineSeparator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/draw/VerticalPositionMark.java b/itext/src/main/java/com/itextpdf/text/pdf/draw/VerticalPositionMark.java
index 78556e565c..10e697ac9d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/draw/VerticalPositionMark.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/draw/VerticalPositionMark.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/events/FieldPositioningEvents.java b/itext/src/main/java/com/itextpdf/text/pdf/events/FieldPositioningEvents.java
index 9c8f68076d..29e93ff421 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/events/FieldPositioningEvents.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/events/FieldPositioningEvents.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/events/IndexEvents.java b/itext/src/main/java/com/itextpdf/text/pdf/events/IndexEvents.java
index d2fa73f4c7..2e2acc6d90 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/events/IndexEvents.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/events/IndexEvents.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPCellEventForwarder.java b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPCellEventForwarder.java
index fdad56e938..712186e57d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPCellEventForwarder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPCellEventForwarder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPTableEventForwarder.java b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPTableEventForwarder.java
index 6162cb07fe..1a05a313b1 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPTableEventForwarder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPTableEventForwarder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPageEventForwarder.java b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPageEventForwarder.java
index 77925d0c56..401cf29b4a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPageEventForwarder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/events/PdfPageEventForwarder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/FontsResourceAnchor.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/FontsResourceAnchor.java
index 84a5c48d98..c1b7f57a3b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/FontsResourceAnchor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/FontsResourceAnchor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/AbstractCMap.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/AbstractCMap.java
index df1a2071ca..7b8835bd96 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/AbstractCMap.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/AbstractCMap.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapByteCid.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapByteCid.java
index a22c97fe40..ff507a96de 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapByteCid.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapByteCid.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCache.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCache.java
index 8c979c9a26..ec3464dd0f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCache.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCache.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidByte.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidByte.java
index 412b263331..10fc092525 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidByte.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidByte.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidUni.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidUni.java
index 227313086a..99cae60c1b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidUni.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapCidUni.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapParserEx.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapParserEx.java
index 839abe0d0e..081a2653cf 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapParserEx.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapParserEx.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapSequence.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapSequence.java
index 32a9e4465e..b1136b802a 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapSequence.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapSequence.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapUniCid.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapUniCid.java
index 9fb79f4fd8..8f9a61a769 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapUniCid.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CMapUniCid.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocation.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocation.java
index 67e9d82098..9c815162d8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocation.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocation.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocationFromByte.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocationFromByte.java
index 51b2230815..1f8b00be6e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocationFromByte.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidLocationFromByte.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidResource.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidResource.java
index b85afaefdd..bd4fb894c5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidResource.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/CidResource.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/IdentityToUnicode.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/IdentityToUnicode.java
index 7b6be18b7b..87a31e0601 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/IdentityToUnicode.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/cmaps/IdentityToUnicode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/FontReadingException.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/FontReadingException.java
index 56df90a489..9635a188a2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/FontReadingException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/FontReadingException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphPositioningTableReader.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphPositioningTableReader.java
index a3f1ec59d7..41d87d437c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphPositioningTableReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphPositioningTableReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphSubstitutionTableReader.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphSubstitutionTableReader.java
index 8d63fe34c8..e6d0704f60 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphSubstitutionTableReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/GlyphSubstitutionTableReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/Language.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/Language.java
index 72c51a6064..3ec96c711d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/Language.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/Language.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/OpenTypeFontTableReader.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/OpenTypeFontTableReader.java
index 2079406261..48429f2e80 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/OpenTypeFontTableReader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/OpenTypeFontTableReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/TableHeader.java b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/TableHeader.java
index 4a6d504eaa..2f052276bb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/TableHeader.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/fonts/otf/TableHeader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/Hyphenation.java b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/Hyphenation.java
index a371ba9958..e1bc1b57a2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/Hyphenation.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/Hyphenation.java
@@ -35,7 +35,7 @@ public class Hyphenation {
* rawWord as made of alternating strings and {@link Hyphen Hyphen}
* instances
*/
- Hyphenation(String word, int[] points) {
+ public Hyphenation(String word, int[] points) {
this.word = word;
hyphenPoints = points;
len = points.length;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/HyphenationTree.java b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/HyphenationTree.java
index 3c6875599c..a0e7dd4410 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/HyphenationTree.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/HyphenationTree.java
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-/* $Id$ */
package com.itextpdf.text.pdf.hyphenation;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/SimplePatternParser.java b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/SimplePatternParser.java
index b0318aebcd..78c4bcf872 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/SimplePatternParser.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/hyphenation/SimplePatternParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAccessibleElement.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAccessibleElement.java
index 61a6b9e77c..74c1faf349 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAccessibleElement.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAccessibleElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAlternateDescription.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAlternateDescription.java
index b3892db7c9..cc27605054 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAlternateDescription.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IAlternateDescription.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IPdfStructureElement.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IPdfStructureElement.java
index 22a193a78d..a2dae7ced4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IPdfStructureElement.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/IPdfStructureElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAnnotations.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAnnotations.java
index 94a9fe66b2..6d500992ca 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAnnotations.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAnnotations.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfDocumentActions.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfDocumentActions.java
index 8378c39235..ee4d3453a8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfDocumentActions.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfDocumentActions.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfEncryptionSettings.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfEncryptionSettings.java
index b9cf48ff38..04437e0dda 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfEncryptionSettings.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfEncryptionSettings.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfIsoConformance.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfIsoConformance.java
index 97fe23f58a..f2038dc449 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfIsoConformance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfIsoConformance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfPageActions.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfPageActions.java
index 974dd861d8..666f2d54c8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfPageActions.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfPageActions.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfRunDirection.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfRunDirection.java
index f45f7821fd..e8738a693e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfRunDirection.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfRunDirection.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfVersion.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfVersion.java
index d1f37c0095..f3fa53c713 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfVersion.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfVersion.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfViewerPreferences.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfViewerPreferences.java
index 36fff9ca2b..640f6afbcd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfViewerPreferences.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfViewerPreferences.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfXConformance.java b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfXConformance.java
index 88efef813b..61fefdc717 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfXConformance.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/interfaces/PdfXConformance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfAnnotationsImp.java b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfAnnotationsImp.java
index a06ab7e1e1..a66139e0af 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfAnnotationsImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfAnnotationsImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfIsoKeys.java b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfIsoKeys.java
index 03ff8e234b..c95a174009 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfIsoKeys.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfIsoKeys.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfVersionImp.java b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfVersionImp.java
index cf3b3006d4..e2b08ed80b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfVersionImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfVersionImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfViewerPreferencesImp.java b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfViewerPreferencesImp.java
index 4b98fbfd79..68ace9962d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfViewerPreferencesImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfViewerPreferencesImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfXConformanceImp.java b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfXConformanceImp.java
index a553937a7d..4eedc3eea2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfXConformanceImp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/internal/PdfXConformanceImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/ArabicLigaturizer.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/ArabicLigaturizer.java
index 320bddea1e..c822bcb553 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/ArabicLigaturizer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/ArabicLigaturizer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -793,6 +792,7 @@ public boolean isRTL() {
reverseLigatureMapTable.put(c[4], c[3]);
case 3:
reverseLigatureMapTable.put(c[2], c[1]);
+ reverseLigatureMapTable.put(c[1], c[0]);
break;
}
if (c[0] == 0x0637 || c[0] == 0x0638) {
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/BanglaGlyphRepositioner.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/BanglaGlyphRepositioner.java
index ee792a779b..a394b51f9d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/BanglaGlyphRepositioner.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/BanglaGlyphRepositioner.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/DevanagariLigaturizer.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/DevanagariLigaturizer.java
index 56cb7bf94c..727d5f5dc3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/DevanagariLigaturizer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/DevanagariLigaturizer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/GlyphRepositioner.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/GlyphRepositioner.java
index 2b3105e8b3..8fc5d07708 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/GlyphRepositioner.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/GlyphRepositioner.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/GujaratiLigaturizer.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/GujaratiLigaturizer.java
index 7a3bbf6aae..debec43bf0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/GujaratiLigaturizer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/GujaratiLigaturizer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/HebrewProcessor.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/HebrewProcessor.java
index 3dab9aa217..889df7acba 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/HebrewProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/HebrewProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicCompositeCharacterComparator.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicCompositeCharacterComparator.java
index 3fa6360e32..7ed5b2b88e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicCompositeCharacterComparator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicCompositeCharacterComparator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicGlyphRepositioner.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicGlyphRepositioner.java
index 9566ce6541..7c412fa387 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicGlyphRepositioner.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicGlyphRepositioner.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicLigaturizer.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicLigaturizer.java
index faa87ad3ea..7a2b9294fc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicLigaturizer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/IndicLigaturizer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/languages/LanguageProcessor.java b/itext/src/main/java/com/itextpdf/text/pdf/languages/LanguageProcessor.java
index 9b84623b4e..08320c8e45 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/languages/LanguageProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/languages/LanguageProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/BezierCurve.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/BezierCurve.java
index f25dd4c4cb..b582d8d9ee 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/BezierCurve.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/BezierCurve.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentByteUtils.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentByteUtils.java
index a3d08b860e..f9ed4f43ac 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentByteUtils.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentByteUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentOperator.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentOperator.java
index 662e0b6881..713a70d089 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentOperator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/ContentOperator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/ExtRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/ExtRenderListener.java
index 014f6a3110..f201b34249 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/ExtRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/ExtRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredRenderListener.java
index 25fc4334fe..9005210528 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListener.java
index 835eb2ebb8..6a28d3cffa 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphRenderListener.java
index 629558dc11..7155cdcc11 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphTextRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphTextRenderListener.java
index 7c0ec53438..3c4df271a4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphTextRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/GlyphTextRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/GraphicsState.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/GraphicsState.java
index 7efcd9f1ac..aa77dea68b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/GraphicsState.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/GraphicsState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/ImageRenderInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/ImageRenderInfo.java
index 3fe2b3b607..dd2bf31653 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/ImageRenderInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/ImageRenderInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageInfo.java
index 3d49cd6b4a..3e86270d00 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageUtils.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageUtils.java
index f90f1818b9..eac433ebf3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageUtils.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/InlineImageUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Line.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Line.java
index 965d2d0150..e01a39b402 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Line.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Line.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/LineDashPattern.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/LineDashPattern.java
index a24c60e63c..db8b48a3d6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/LineDashPattern.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/LineDashPattern.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/LineSegment.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/LineSegment.java
index 737bd25448..ea0e5a1deb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/LineSegment.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/LineSegment.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategy.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategy.java
index 41a7bbb314..74c75e5cd4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategy.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -262,7 +261,7 @@ public static interface TextChunkLocation extends Comparable
boolean isAtWordBoundary(TextChunkLocation previous);
}
- private static class TextChunkLocationDefaultImp implements TextChunkLocation {
+ public static class TextChunkLocationDefaultImp implements TextChunkLocation {
/** the starting location of the chunk */
private final Vector startLocation;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentInfo.java
index 8fb4ea792a..47b0974b85 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentRenderFilter.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentRenderFilter.java
index 65cc4bc858..9955420bc5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentRenderFilter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/MarkedContentRenderFilter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Matrix.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Matrix.java
index 603dec0ade..1bbcf65b3f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Matrix.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Matrix.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/MultiFilteredRenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/MultiFilteredRenderListener.java
index 540c4266a1..ecde10660d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/MultiFilteredRenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/MultiFilteredRenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Path.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Path.java
index fca04a2166..dff691904f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Path.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Path.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PathConstructionRenderInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PathConstructionRenderInfo.java
index a5201e44c6..493677efd5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PathConstructionRenderInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PathConstructionRenderInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PathPaintingRenderInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PathPaintingRenderInfo.java
index 2dc661a26d..ef7ebb4ece 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PathPaintingRenderInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PathPaintingRenderInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentReaderTool.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentReaderTool.java
index 7b3fd6af7f..36aa885a61 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentReaderTool.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentReaderTool.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessor.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessor.java
index 058eeefd39..70b26d08f8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfImageObject.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfImageObject.java
index cf66328380..419e834a3f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfImageObject.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfImageObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfReaderContentParser.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfReaderContentParser.java
index ad4c69485f..a9e8e4798e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfReaderContentParser.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfReaderContentParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfTextExtractor.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfTextExtractor.java
index 5959c09d9b..a0e8d26264 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfTextExtractor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/PdfTextExtractor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/RegionTextRenderFilter.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/RegionTextRenderFilter.java
index 75639eee71..18976fe931 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/RegionTextRenderFilter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/RegionTextRenderFilter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderFilter.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderFilter.java
index 671ca0a454..7dfc11e13f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderFilter.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderFilter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderListener.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderListener.java
index 2d5d7faf40..6adb454539 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderListener.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/RenderListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Shape.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Shape.java
index f3b048e7f3..7975640469 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Shape.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Shape.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategy.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategy.java
index 210cfb78ca..0420d54c39 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategy.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Subpath.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Subpath.java
index 66f4f7ac00..50f37fe63b 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Subpath.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Subpath.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/TaggedPdfReaderTool.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/TaggedPdfReaderTool.java
index 7162beaa60..91ce9ba3d3 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/TaggedPdfReaderTool.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/TaggedPdfReaderTool.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextExtractionStrategy.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextExtractionStrategy.java
index 8210bd1d23..da0fecce49 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextExtractionStrategy.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextExtractionStrategy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextMarginFinder.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextMarginFinder.java
index a8e2a30dcc..0c1413e48c 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextMarginFinder.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextMarginFinder.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextRenderInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextRenderInfo.java
index 8901d3069b..f876b00e73 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/TextRenderInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/TextRenderInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/Vector.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/Vector.java
index 4b39ebcf23..ffe30a45e1 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/Vector.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/Vector.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/XObjectDoHandler.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/XObjectDoHandler.java
index 8b9eecccaa..fe345604f8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/XObjectDoHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/XObjectDoHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Clipper.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Clipper.java
index 33f03c0460..23434e66cc 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Clipper.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Clipper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperBase.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperBase.java
index 3b6230f569..076b1c813f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperBase.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperBase.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperOffset.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperOffset.java
index 7b36d61246..4e40e5e050 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperOffset.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/ClipperOffset.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/DefaultClipper.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/DefaultClipper.java
index a67fd64cca..3516fb21cd 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/DefaultClipper.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/DefaultClipper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Edge.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Edge.java
index dbafd1df04..62786438a9 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Edge.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Edge.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/LongRect.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/LongRect.java
index d75cec0297..af2e06c1b7 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/LongRect.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/LongRect.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Path.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Path.java
index 1f09f7d633..a9b8e1591d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Path.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Path.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Paths.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Paths.java
index ec353af2fb..69b4ce09de 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Paths.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Paths.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Point.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Point.java
index 96a1c0a344..2af3963248 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Point.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/Point.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 2014-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyNode.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyNode.java
index 0739f02bcb..babab29e70 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyNode.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyNode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyTree.java b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyTree.java
index b6bd139399..7954072b41 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyTree.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/parser/clipper/PolyTree.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/BouncyCastleDigest.java b/itext/src/main/java/com/itextpdf/text/pdf/security/BouncyCastleDigest.java
index bbe32b9bb7..3952e88fec 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/BouncyCastleDigest.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/BouncyCastleDigest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CRLVerifier.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CRLVerifier.java
index 4bf30120b8..de29581623 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CRLVerifier.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CRLVerifier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateInfo.java
index a834ca3181..7db7f03d64 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateInfo.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateInfo.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateUtil.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateUtil.java
index 02748dc5a7..b3f952bbbb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateUtil.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerification.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerification.java
index fd966092c3..049f7be272 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerification.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerification.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerifier.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerifier.java
index 8326798939..619be8c862 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerifier.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CertificateVerifier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClient.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClient.java
index 95ad82721e..745c4c6f96 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClient.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClient.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOffline.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOffline.java
index 7e2a4047aa..790c86dd91 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOffline.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOffline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOnline.java b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOnline.java
index 48e7f35eb8..6de7f2b380 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOnline.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/CrlClientOnline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/DigestAlgorithms.java b/itext/src/main/java/com/itextpdf/text/pdf/security/DigestAlgorithms.java
index 840a6099de..36978e87c5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/DigestAlgorithms.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/DigestAlgorithms.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/EncryptionAlgorithms.java b/itext/src/main/java/com/itextpdf/text/pdf/security/EncryptionAlgorithms.java
index ddc1d5f57f..b5ed6cb09e 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/EncryptionAlgorithms.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/EncryptionAlgorithms.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalBlankSignatureContainer.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalBlankSignatureContainer.java
index 18982e690a..438d23b861 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalBlankSignatureContainer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalBlankSignatureContainer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDecryptionProcess.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDecryptionProcess.java
index 7ded463f65..38f37edd3d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDecryptionProcess.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDecryptionProcess.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDigest.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDigest.java
index 370accbc28..99ae021d62 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDigest.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalDigest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignature.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignature.java
index 967520c356..da752a1927 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignature.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignature.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignatureContainer.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignatureContainer.java
index 55733c566e..014ca70f92 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignatureContainer.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ExternalSignatureContainer.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/KeyStoreUtil.java b/itext/src/main/java/com/itextpdf/text/pdf/security/KeyStoreUtil.java
index fe2a275f3c..8d531b0204 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/KeyStoreUtil.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/KeyStoreUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvTimestamp.java b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvTimestamp.java
index 292a64c874..b0fad43183 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvTimestamp.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvTimestamp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerification.java b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerification.java
index 2254fbccd3..27f2a8c831 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerification.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerification.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerifier.java b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerifier.java
index 094d68b771..fc608f9bd4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerifier.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/LtvVerifier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/MakeSignature.java b/itext/src/main/java/com/itextpdf/text/pdf/security/MakeSignature.java
index 6e6f2a26db..890c5bbf28 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/MakeSignature.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/MakeSignature.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -62,6 +61,7 @@
import com.itextpdf.text.pdf.PdfSignature;
import com.itextpdf.text.pdf.PdfSignatureAppearance;
import com.itextpdf.text.pdf.PdfString;
+import org.bouncycastle.asn1.esf.SignaturePolicyIdentifier;
import java.io.IOException;
import java.io.InputStream;
@@ -70,10 +70,7 @@
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.HashMap;
+import java.util.*;
/**
* Class that signs your PDF.
@@ -99,6 +96,52 @@ public enum CryptoStandard {
* @param externalDigest an implementation that provides the digest
* @param estimatedSize the reserved size for the signature. It will be estimated if 0
* @param sigtype Either Signature.CMS or Signature.CADES
+ * @throws DocumentException
+ * @throws IOException
+ * @throws GeneralSecurityException
+ * @throws NoSuchAlgorithmException
+ * @throws Exception
+ */
+ public static void signDetached(PdfSignatureAppearance sap, ExternalDigest externalDigest, ExternalSignature externalSignature, Certificate[] chain, Collection crlList, OcspClient ocspClient,
+ TSAClient tsaClient, int estimatedSize, CryptoStandard sigtype) throws IOException, DocumentException, GeneralSecurityException {
+ signDetached(sap, externalDigest, externalSignature, chain, crlList, ocspClient, tsaClient, estimatedSize, sigtype, (SignaturePolicyIdentifier) null);
+ }
+
+ /**
+ * Signs the document using the detached mode, CMS or CAdES equivalent.
+ * @param sap the PdfSignatureAppearance
+ * @param externalSignature the interface providing the actual signing
+ * @param chain the certificate chain
+ * @param crlList the CRL list
+ * @param ocspClient the OCSP client
+ * @param tsaClient the Timestamp client
+ * @param externalDigest an implementation that provides the digest
+ * @param estimatedSize the reserved size for the signature. It will be estimated if 0
+ * @param sigtype Either Signature.CMS or Signature.CADES
+ * @param signaturePolicy the signature policy (for EPES signatures)
+ * @throws DocumentException
+ * @throws IOException
+ * @throws GeneralSecurityException
+ * @throws NoSuchAlgorithmException
+ * @throws Exception
+ */
+ public static void signDetached(PdfSignatureAppearance sap, ExternalDigest externalDigest, ExternalSignature externalSignature, Certificate[] chain, Collection crlList, OcspClient ocspClient,
+ TSAClient tsaClient, int estimatedSize, CryptoStandard sigtype, SignaturePolicyInfo signaturePolicy) throws IOException, DocumentException, GeneralSecurityException {
+ signDetached(sap, externalDigest, externalSignature, chain, crlList, ocspClient, tsaClient, estimatedSize, sigtype, signaturePolicy.toSignaturePolicyIdentifier());
+ }
+
+ /**
+ * Signs the document using the detached mode, CMS or CAdES equivalent.
+ * @param sap the PdfSignatureAppearance
+ * @param externalSignature the interface providing the actual signing
+ * @param chain the certificate chain
+ * @param crlList the CRL list
+ * @param ocspClient the OCSP client
+ * @param tsaClient the Timestamp client
+ * @param externalDigest an implementation that provides the digest
+ * @param estimatedSize the reserved size for the signature. It will be estimated if 0
+ * @param sigtype Either Signature.CMS or Signature.CADES
+ * @param signaturePolicy the signature policy (for EPES signatures)
* @throws DocumentException
* @throws IOException
* @throws GeneralSecurityException
@@ -106,7 +149,7 @@ public enum CryptoStandard {
* @throws Exception
*/
public static void signDetached(PdfSignatureAppearance sap, ExternalDigest externalDigest, ExternalSignature externalSignature, Certificate[] chain, Collection crlList, OcspClient ocspClient,
- TSAClient tsaClient, int estimatedSize, CryptoStandard sigtype) throws IOException, DocumentException, GeneralSecurityException {
+ TSAClient tsaClient, int estimatedSize, CryptoStandard sigtype, SignaturePolicyIdentifier signaturePolicy) throws IOException, DocumentException, GeneralSecurityException {
Collection crlBytes = null;
int i = 0;
while (crlBytes == null && i < chain.length)
@@ -141,6 +184,9 @@ public static void signDetached(PdfSignatureAppearance sap, ExternalDigest exter
String hashAlgorithm = externalSignature.getHashAlgorithm();
PdfPKCS7 sgn = new PdfPKCS7(null, chain, hashAlgorithm, null, externalDigest, false);
+ if (signaturePolicy != null) {
+ sgn.setSignaturePolicy(signaturePolicy);
+ }
InputStream data = sap.getRangeStream();
byte hash[] = DigestAlgorithms.digest(data, externalDigest.getMessageDigest(hashAlgorithm));
byte[] ocsp = null;
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java b/itext/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java
index cb9c12abc3..0b0c845a06 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/MakeXmlSignature.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/OCSPVerifier.java b/itext/src/main/java/com/itextpdf/text/pdf/security/OCSPVerifier.java
index 4ea0a6e8e6..9722b3606f 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/OCSPVerifier.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/OCSPVerifier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClient.java b/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClient.java
index 72558c4b1e..752e8e4abb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClient.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClient.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClientBouncyCastle.java b/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClientBouncyCastle.java
index edbd398812..35fa98d67d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClientBouncyCastle.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/OcspClientBouncyCastle.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java
index dfe1dc268d..4ebdb478ef 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfPKCS7.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -44,55 +43,15 @@
*/
package com.itextpdf.text.pdf.security;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.math.BigInteger;
-import java.security.GeneralSecurityException;
-import java.security.InvalidKeyException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.Signature;
-import java.security.SignatureException;
-import java.security.cert.CRL;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509CRL;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.bouncycastle.asn1.ASN1EncodableVector;
-import org.bouncycastle.asn1.ASN1Encoding;
-import org.bouncycastle.asn1.ASN1Enumerated;
-import org.bouncycastle.asn1.ASN1InputStream;
-import org.bouncycastle.asn1.ASN1Integer;
-import org.bouncycastle.asn1.ASN1ObjectIdentifier;
-import org.bouncycastle.asn1.ASN1OctetString;
-import org.bouncycastle.asn1.ASN1OutputStream;
-import org.bouncycastle.asn1.ASN1Primitive;
-import org.bouncycastle.asn1.ASN1Sequence;
-import org.bouncycastle.asn1.ASN1Set;
-import org.bouncycastle.asn1.ASN1TaggedObject;
-import org.bouncycastle.asn1.DERNull;
-import org.bouncycastle.asn1.DEROctetString;
-import org.bouncycastle.asn1.DERSequence;
-import org.bouncycastle.asn1.DERSet;
-import org.bouncycastle.asn1.DERTaggedObject;
-import org.bouncycastle.asn1.DERUTCTime;
+import com.itextpdf.text.ExceptionConverter;
+import com.itextpdf.text.error_messages.MessageLocalization;
+import com.itextpdf.text.pdf.PdfName;
+import com.itextpdf.text.pdf.security.MakeSignature.CryptoStandard;
+import org.bouncycastle.asn1.*;
import org.bouncycastle.asn1.cms.Attribute;
import org.bouncycastle.asn1.cms.AttributeTable;
import org.bouncycastle.asn1.cms.ContentInfo;
+import org.bouncycastle.asn1.esf.SignaturePolicyIdentifier;
import org.bouncycastle.asn1.ess.ESSCertID;
import org.bouncycastle.asn1.ess.ESSCertIDv2;
import org.bouncycastle.asn1.ess.SigningCertificate;
@@ -113,10 +72,14 @@
import org.bouncycastle.tsp.TimeStampToken;
import org.bouncycastle.tsp.TimeStampTokenInfo;
-import com.itextpdf.text.ExceptionConverter;
-import com.itextpdf.text.error_messages.MessageLocalization;
-import com.itextpdf.text.pdf.PdfName;
-import com.itextpdf.text.pdf.security.MakeSignature.CryptoStandard;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.*;
+import java.security.cert.*;
+import java.security.cert.Certificate;
+import java.util.*;
/**
* This class does all the processing related to signing
@@ -471,6 +434,8 @@ else if (isCades && idSeq2.equals(SecurityIDs.ID_AA_SIGNING_CERTIFICATE_V2)) {
// Signature info
+ private SignaturePolicyIdentifier signaturePolicyIdentifier;
+
/** Holds value of property signName. */
private String signName;
@@ -483,6 +448,14 @@ else if (isCades && idSeq2.equals(SecurityIDs.ID_AA_SIGNING_CERTIFICATE_V2)) {
/** Holds value of property signDate. */
private Calendar signDate;
+ public void setSignaturePolicy(SignaturePolicyInfo signaturePolicy) {
+ this.signaturePolicyIdentifier = signaturePolicy.toSignaturePolicyIdentifier();
+ }
+
+ public void setSignaturePolicy(SignaturePolicyIdentifier signaturePolicy) {
+ this.signaturePolicyIdentifier = signaturePolicy;
+ }
+
/**
* Getter for property sigName.
* @return Value of property sigName.
@@ -1042,6 +1015,10 @@ private DERSet getAuthenticatedAttributeSet(byte secondDigest[], byte[] ocsp, Co
attribute.add(new DERSequence(v));
}
+ if (signaturePolicyIdentifier != null) {
+ attribute.add(new Attribute(PKCSObjectIdentifiers.id_aa_ets_sigPolicyId, new DERSet(signaturePolicyIdentifier)));
+ }
+
return new DERSet(attribute);
}
catch (Exception e) {
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureAppDictionary.java b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureAppDictionary.java
index c87c220015..29529f24b6 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureAppDictionary.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureAppDictionary.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureBuildProperties.java b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureBuildProperties.java
index 7885f27239..33994dd3b0 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureBuildProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/PdfSignatureBuildProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/PrivateKeySignature.java b/itext/src/main/java/com/itextpdf/text/pdf/security/PrivateKeySignature.java
index 436d5e9a01..ae0307023d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/PrivateKeySignature.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/PrivateKeySignature.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/ProviderDigest.java b/itext/src/main/java/com/itextpdf/text/pdf/security/ProviderDigest.java
index 975430f912..601058d1c5 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/ProviderDigest.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/ProviderDigest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/RootStoreVerifier.java b/itext/src/main/java/com/itextpdf/text/pdf/security/RootStoreVerifier.java
index 2b0c4cd54d..883c862bb2 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/RootStoreVerifier.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/RootStoreVerifier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityConstants.java b/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityConstants.java
index b6a74c3711..603b5e0ab4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityConstants.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityConstants.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityIDs.java b/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityIDs.java
index 5031d5a879..b7da888c26 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityIDs.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/SecurityIDs.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePermissions.java b/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePermissions.java
index e75cc22822..42f5635b54 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePermissions.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePermissions.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePolicyInfo.java b/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePolicyInfo.java
new file mode 100644
index 0000000000..73e21885a5
--- /dev/null
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/SignaturePolicyInfo.java
@@ -0,0 +1,83 @@
+package com.itextpdf.text.pdf.security;
+
+import com.itextpdf.text.pdf.codec.Base64;
+import org.bouncycastle.asn1.DERIA5String;
+import org.bouncycastle.asn1.DERObjectIdentifier;
+import org.bouncycastle.asn1.DEROctetString;
+import org.bouncycastle.asn1.esf.*;
+import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
+import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
+
+/**
+ * Class that encapsulates the signature policy information
+ * @author J. Arturo
+ *
+ * Sample:
+ *
+ * SignaturePolicyInfo spi = new SignaturePolicyInfo("2.16.724.1.3.1.1.2.1.9",
+ * "G7roucf600+f03r/o0bAOQ6WAs0=", "SHA-1", "https://sede.060.gob.es/politica_de_firma_anexo_1.pdf");
+ */
+public class SignaturePolicyInfo {
+ private String policyIdentifier;
+ private byte[] policyHash;
+ private String policyDigestAlgorithm;
+ private String policyUri;
+
+ public SignaturePolicyInfo(String policyIdentifier, byte[] policyHash, String policyDigestAlgorithm, String policyUri) {
+ if (policyIdentifier == null || policyIdentifier.length() == 0) {
+ throw new IllegalArgumentException("Policy identifier cannot be null");
+ }
+ if (policyHash == null) {
+ throw new IllegalArgumentException("Policy hash cannot be null");
+ }
+ if (policyDigestAlgorithm == null || policyDigestAlgorithm.length() == 0) {
+ throw new IllegalArgumentException("Policy digest algorithm cannot be null");
+ }
+
+ this.policyIdentifier = policyIdentifier;
+ this.policyHash = policyHash;
+ this.policyDigestAlgorithm = policyDigestAlgorithm;
+ this.policyUri = policyUri;
+ }
+
+ public SignaturePolicyInfo(String policyIdentifier, String policyHashBase64, String policyDigestAlgorithm, String policyUri) {
+ this(policyIdentifier, policyHashBase64 != null ? Base64.decode(policyHashBase64) : null, policyDigestAlgorithm, policyUri);
+ }
+
+ public String getPolicyIdentifier() {
+ return policyIdentifier;
+ }
+
+ public byte[] getPolicyHash() {
+ return policyHash;
+ }
+
+ public String getPolicyDigestAlgorithm() {
+ return policyDigestAlgorithm;
+ }
+
+ public String getPolicyUri() {
+ return policyUri;
+ }
+
+ SignaturePolicyIdentifier toSignaturePolicyIdentifier() {
+ String algId = DigestAlgorithms.getAllowedDigests(this.policyDigestAlgorithm);
+
+ if (algId == null || algId.length() == 0) {
+ throw new IllegalArgumentException("Invalid policy hash algorithm");
+ }
+
+ SignaturePolicyIdentifier signaturePolicyIdentifier = null;
+ SigPolicyQualifierInfo spqi = null;
+
+ if (this.policyUri != null && this.policyUri.length() > 0) {
+ spqi = new SigPolicyQualifierInfo(PKCSObjectIdentifiers.id_spq_ets_uri, new DERIA5String(this.policyUri));
+ }
+ SigPolicyQualifiers qualifiers = new SigPolicyQualifiers(new SigPolicyQualifierInfo[] {spqi});
+
+ signaturePolicyIdentifier = new SignaturePolicyIdentifier(new SignaturePolicyId(DERObjectIdentifier.getInstance(new DERObjectIdentifier(this.policyIdentifier.replace("urn:oid:", ""))),
+ new OtherHashAlgAndValue(new AlgorithmIdentifier(algId), new DEROctetString(this.policyHash)), qualifiers));
+
+ return signaturePolicyIdentifier;
+ }
+}
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClient.java b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClient.java
index f12dd38cd2..6f901e9824 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClient.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClient.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
index 02606c79d0..1734e33deb 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAClientBouncyCastle.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAInfoBouncyCastle.java b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAInfoBouncyCastle.java
index cdb34b7a4b..a322b50e40 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/TSAInfoBouncyCastle.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/TSAInfoBouncyCastle.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationException.java b/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationException.java
index 05a8daedad..fa84926c78 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationException.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationOK.java b/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationOK.java
index c11e77e616..12fe4603f4 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationOK.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/VerificationOK.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/XmlLocator.java b/itext/src/main/java/com/itextpdf/text/pdf/security/XmlLocator.java
index 241a648153..f9187315d8 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/XmlLocator.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/XmlLocator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/pdf/security/XpathConstructor.java b/itext/src/main/java/com/itextpdf/text/pdf/security/XpathConstructor.java
index 9603b88480..0d5c2ab83d 100644
--- a/itext/src/main/java/com/itextpdf/text/pdf/security/XpathConstructor.java
+++ b/itext/src/main/java/com/itextpdf/text/pdf/security/XpathConstructor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/XMLUtil.java b/itext/src/main/java/com/itextpdf/text/xml/XMLUtil.java
index c252e97234..795348b42c 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/XMLUtil.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/XMLUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/XmlToTxt.java b/itext/src/main/java/com/itextpdf/text/xml/XmlToTxt.java
index fc7d3c3973..83149c3f42 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/XmlToTxt.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/XmlToTxt.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToSymbol.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToSymbol.java
index 45c7b9072f..0eec31bbfd 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToSymbol.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToSymbol.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToUnicode.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToUnicode.java
index a7c037d2f8..0b59e48fcb 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToUnicode.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/EntitiesToUnicode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/IanaEncodings.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/IanaEncodings.java
index 95c5cfbc3a..a6c8624d81 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/IanaEncodings.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/IanaEncodings.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/NewLineHandler.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/NewLineHandler.java
index bf9b4b2eec..2c1a8f8cd6 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/NewLineHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/NewLineHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandler.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandler.java
index 76e20761a9..78a0c6f7d1 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandlerComment.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandlerComment.java
index 9838359f5c..17d70eb7ec 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandlerComment.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLDocHandlerComment.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParser.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParser.java
index efa03372d6..57a5f13188 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParser.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/HTMLNewLineHandler.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/HTMLNewLineHandler.java
index cdea875571..b008cd9ac0 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/HTMLNewLineHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/HTMLNewLineHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/NeverNewLineHandler.java b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/NeverNewLineHandler.java
index 85ac755d38..b170d83072 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/NeverNewLineHandler.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/simpleparser/handler/NeverNewLineHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreProperties.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreProperties.java
index 34e45ed5d5..d1cfe0614a 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreSchema.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreSchema.java
index c796753147..f8070021fd 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/DublinCoreSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/LangAlt.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/LangAlt.java
index fa7b657f43..4a54157797 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/LangAlt.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/LangAlt.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfProperties.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfProperties.java
index 34126781fe..b2956846ce 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfSchema.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfSchema.java
index 5b6d8493c5..4142543051 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/PdfSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpArray.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpArray.java
index ff1ffb062f..4a0e18ad29 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpArray.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpArray.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicProperties.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicProperties.java
index 5b0787d359..1556aa678b 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicSchema.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicSchema.java
index 1e52961ee9..aec744e16a 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpBasicSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMProperties.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMProperties.java
index 2ca75cfc2a..8002b399f2 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMProperties.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMSchema.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMSchema.java
index d89b33ec21..b0ff4e63c5 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpMMSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpReader.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpReader.java
index 58ea330eb4..d3aa746c2f 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpReader.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpSchema.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpSchema.java
index 0c6805fce5..478351defc 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpSchema.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpSchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpWriter.java b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpWriter.java
index a69e4c9666..398e099421 100644
--- a/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpWriter.java
+++ b/itext/src/main/java/com/itextpdf/text/xml/xmp/XmpWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/testutils/ClearOutTempFilesDuringTest.java b/itext/src/test/java/com/itextpdf/testutils/ClearOutTempFilesDuringTest.java
index dd5629b5e6..5e8dc29ad4 100644
--- a/itext/src/test/java/com/itextpdf/testutils/ClearOutTempFilesDuringTest.java
+++ b/itext/src/test/java/com/itextpdf/testutils/ClearOutTempFilesDuringTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/testutils/TestResourceUtils.java b/itext/src/test/java/com/itextpdf/testutils/TestResourceUtils.java
index 9bdd93a4be..765e031ca7 100644
--- a/itext/src/test/java/com/itextpdf/testutils/TestResourceUtils.java
+++ b/itext/src/test/java/com/itextpdf/testutils/TestResourceUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/error_messages/ErrorMessageTest.java b/itext/src/test/java/com/itextpdf/text/error_messages/ErrorMessageTest.java
index 71ed22b9f8..0cb55809bf 100644
--- a/itext/src/test/java/com/itextpdf/text/error_messages/ErrorMessageTest.java
+++ b/itext/src/test/java/com/itextpdf/text/error_messages/ErrorMessageTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/error_messages/MessageLocalizationTest.java b/itext/src/test/java/com/itextpdf/text/error_messages/MessageLocalizationTest.java
index 9a3fabe8a4..de5816923f 100644
--- a/itext/src/test/java/com/itextpdf/text/error_messages/MessageLocalizationTest.java
+++ b/itext/src/test/java/com/itextpdf/text/error_messages/MessageLocalizationTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/html/WebColorTest.java b/itext/src/test/java/com/itextpdf/text/html/WebColorTest.java
index 3bebbfe4ff..4a1643e7b0 100644
--- a/itext/src/test/java/com/itextpdf/text/html/WebColorTest.java
+++ b/itext/src/test/java/com/itextpdf/text/html/WebColorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerLinkTest.java b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerLinkTest.java
index 6d4126752c..4cd2e2430b 100644
--- a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerLinkTest.java
+++ b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerLinkTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerParagraphTest.java b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerParagraphTest.java
index 1ac661bacc..36a66598bb 100644
--- a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerParagraphTest.java
+++ b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerParagraphTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerWhitSpaceTest.java b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerWhitSpaceTest.java
index 613f286f33..bcf47993c8 100644
--- a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerWhitSpaceTest.java
+++ b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlWorkerWhitSpaceTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlXFAWorkerTest.java b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlXFAWorkerTest.java
index 2815373593..5f281d977b 100644
--- a/itext/src/test/java/com/itextpdf/text/html/parser/HtmlXFAWorkerTest.java
+++ b/itext/src/test/java/com/itextpdf/text/html/parser/HtmlXFAWorkerTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/AcroFieldsTest.java b/itext/src/test/java/com/itextpdf/text/pdf/AcroFieldsTest.java
index 47021d1e6f..8b7dbb5b69 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/AcroFieldsTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/AcroFieldsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/BookmarksTest.java b/itext/src/test/java/com/itextpdf/text/pdf/BookmarksTest.java
index 71d9fcc85d..f668ebb205 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/BookmarksTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/BookmarksTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/DocumentFontTest.java b/itext/src/test/java/com/itextpdf/text/pdf/DocumentFontTest.java
index 0c606b261b..b7b6b7f3c5 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/DocumentFontTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/DocumentFontTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/DocumentLayoutTest.java b/itext/src/test/java/com/itextpdf/text/pdf/DocumentLayoutTest.java
index 5bb691fc7a..0856c4b6e6 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/DocumentLayoutTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/DocumentLayoutTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/FlatteningTest.java b/itext/src/test/java/com/itextpdf/text/pdf/FlatteningTest.java
index 487d7432e7..064c129a61 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/FlatteningTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/FlatteningTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/MetaDataTest.java b/itext/src/test/java/com/itextpdf/text/pdf/MetaDataTest.java
index 7a2e2ee586..c87d194bd7 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/MetaDataTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/MetaDataTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/PdfCopyTest.java b/itext/src/test/java/com/itextpdf/text/pdf/PdfCopyTest.java
index 23f1272e63..e6e42e9ddf 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/PdfCopyTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/PdfCopyTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/PdfEncryptionTest.java b/itext/src/test/java/com/itextpdf/text/pdf/PdfEncryptionTest.java
index abd06a4103..2ec6280dde 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/PdfEncryptionTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/PdfEncryptionTest.java
@@ -5,6 +5,7 @@
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Paragraph;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.junit.Before;
@@ -66,4 +67,14 @@ public void unethicalStampAES256() throws IOException, DocumentException, Interr
assertNull(new CompareTool().compareByContent(outPdf, cmpPdf, DEST_FOLDER, "diff_"));
}
+
+ @Test
+ public void computeUserPasswordAES256() throws Exception {
+ String encryptedPdf = SOURCE_FOLDER + "cmp_AES256Encrypted.pdf";
+ PdfReader reader = new PdfReader(encryptedPdf, ownerPassword);
+ byte[] password = reader.computeUserPassword();
+ reader.close();
+
+ assertNull(password);
+ }
}
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/PdfReaderTest.java b/itext/src/test/java/com/itextpdf/text/pdf/PdfReaderTest.java
index 279ece7ee7..396843a682 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/PdfReaderTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/PdfReaderTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/PdfStamperTest.java b/itext/src/test/java/com/itextpdf/text/pdf/PdfStamperTest.java
index 06eb2e06db..1d147cd4c7 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/PdfStamperTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/PdfStamperTest.java
@@ -3,16 +3,20 @@
import com.itextpdf.testutils.CompareTool;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Image;
-import com.itextpdf.text.io.StreamUtil;
-import junit.framework.Assert;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
import org.junit.Before;
import org.junit.Test;
-import java.io.*;
+import junit.framework.Assert;
public class PdfStamperTest {
- public static final String DEST_FOLDER = "./target/com/itextpdf/test/pdf/PdfStamperTest/";
+ private static final String RESOURCE_FOLDER ="./src/test/resources/com/itextpdf/text/pdf/PdfStamperTest/";
+ private static final String DEST_FOLDER = "./target/com/itextpdf/test/pdf/PdfStamperTest/";
@Before
public void setUp() {
@@ -22,7 +26,7 @@ public void setUp() {
@Test
public void setPageContentTest01() throws IOException, DocumentException, InterruptedException {
String outPdf = DEST_FOLDER + "out1.pdf";
- String testFile = getClass().getResource("PdfStamperTest/in.pdf").getFile();
+ String testFile = RESOURCE_FOLDER + "in.pdf";
PdfReader reader = new PdfReader(testFile);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outPdf));
reader.eliminateSharedStreams();
@@ -33,13 +37,13 @@ public void setPageContentTest01() throws IOException, DocumentException, Interr
}
stamper.close();
- Assert.assertNull(new CompareTool().compareByContent(outPdf, getClass().getResource("PdfStamperTest/cmp_out1.pdf").getPath(), DEST_FOLDER, "diff_"));
+ Assert.assertNull(new CompareTool().compareByContent(outPdf, RESOURCE_FOLDER + "cmp_out1.pdf", DEST_FOLDER, "diff_"));
}
@Test
public void setPageContentTest02() throws IOException, DocumentException, InterruptedException {
String outPdf = DEST_FOLDER + "out2.pdf";
- String testFile = getClass().getResource("PdfStamperTest/in.pdf").getFile();
+ String testFile = RESOURCE_FOLDER + "in.pdf";
PdfReader reader = new PdfReader(testFile);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outPdf));
int total = reader.getNumberOfPages() + 1;
@@ -50,13 +54,13 @@ public void setPageContentTest02() throws IOException, DocumentException, Interr
reader.removeUnusedObjects();
stamper.close();
- Assert.assertNull(new CompareTool().compareByContent(outPdf, getClass().getResource("PdfStamperTest/cmp_out2.pdf").getPath(), DEST_FOLDER, "diff_"));
+ Assert.assertNull(new CompareTool().compareByContent(outPdf, RESOURCE_FOLDER + "cmp_out2.pdf", DEST_FOLDER, "diff_"));
}
@Test
public void layerStampingTest() throws IOException, DocumentException, InterruptedException {
String outPdf = DEST_FOLDER + "out3.pdf";
- String testFile = getClass().getResource("PdfStamperTest/House_Plan_Final.pdf").getFile();
+ String testFile = RESOURCE_FOLDER + "House_Plan_Final.pdf";
PdfReader reader = new PdfReader(testFile);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(outPdf));
@@ -64,7 +68,7 @@ public void layerStampingTest() throws IOException, DocumentException, Interrupt
PdfContentByte cb = stamper.getUnderContent(1);
cb.beginLayer(logoLayer);
- Image iImage = Image.getInstance(getClass().getResource("PdfStamperTest/Willi-1.jpg").getPath());
+ Image iImage = Image.getInstance(RESOURCE_FOLDER + "Willi-1.jpg");
iImage.scalePercent(24f);
iImage.setAbsolutePosition(100, 100);
cb.addImage(iImage);
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/StringUtilsTest.java b/itext/src/test/java/com/itextpdf/text/pdf/StringUtilsTest.java
index fa22246a1e..f483a7d444 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/StringUtilsTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/StringUtilsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/TestPdfCopyAndStamp.java b/itext/src/test/java/com/itextpdf/text/pdf/TestPdfCopyAndStamp.java
index 76b272479c..d275d09ca4 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/TestPdfCopyAndStamp.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/TestPdfCopyAndStamp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/UnbalancedOperatorsTest.java b/itext/src/test/java/com/itextpdf/text/pdf/UnbalancedOperatorsTest.java
index 5a2f136398..9ac06c1dd6 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/UnbalancedOperatorsTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/UnbalancedOperatorsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/fonts/cmaps/CMapTest.java b/itext/src/test/java/com/itextpdf/text/pdf/fonts/cmaps/CMapTest.java
index c0afb32555..8992aaaa3b 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/fonts/cmaps/CMapTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/fonts/cmaps/CMapTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListenerTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListenerTest.java
index 6a285f93bc..1494beeb1f 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListenerTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/FilteredTextRenderListenerTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategyTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategyTest.java
index f2bd2429ed..21e1395143 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategyTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/LocationTextExtractionStrategyTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/MatrixTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/MatrixTest.java
index d7120d00df..83b9de65f1 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/MatrixTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/MatrixTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessorTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessorTest.java
index abfa8913ca..5c87eae3f9 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessorTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfContentStreamProcessorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfTextExtractorEncodingsTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfTextExtractorEncodingsTest.java
index cd781e8587..48f7eecf3f 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfTextExtractorEncodingsTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/PdfTextExtractorEncodingsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategyTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategyTest.java
index 112da056ca..704bdd3072 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategyTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/SimpleTextExtractionStrategyTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/TextMarginFinderTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/TextMarginFinderTest.java
index dd251b6fd9..a370a5b87c 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/TextMarginFinderTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/TextMarginFinderTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/pdf/parser/VectorTest.java b/itext/src/test/java/com/itextpdf/text/pdf/parser/VectorTest.java
index a798f0e54d..886d2d4ab0 100644
--- a/itext/src/test/java/com/itextpdf/text/pdf/parser/VectorTest.java
+++ b/itext/src/test/java/com/itextpdf/text/pdf/parser/VectorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/itext/src/test/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParserTest.java b/itext/src/test/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParserTest.java
index cb5062abc3..d070d32c03 100644
--- a/itext/src/test/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParserTest.java
+++ b/itext/src/test/java/com/itextpdf/text/xml/simpleparser/SimpleXMLParserTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/pdfa/pom.xml b/pdfa/pom.xml
index 0df558f7cb..d1fc093fe2 100644
--- a/pdfa/pom.xml
+++ b/pdfa/pom.xml
@@ -1,17 +1,16 @@
-
+
4.0.0
com.itextpdf
itext-parent
1.0.0
-
+
itext-pdfa
- 5.5.9
+ 5.5.10
jar
iText PDF/A
@@ -145,7 +144,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.8
+ 2.10.3
attach-sources
@@ -202,6 +201,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
+ 2.10.3
-Xdoclint:none
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/AFRelationshipValue.java b/pdfa/src/main/java/com/itextpdf/text/pdf/AFRelationshipValue.java
index 19bdc09dbc..8d53473efb 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/AFRelationshipValue.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/AFRelationshipValue.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceException.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceException.java
index 3d7d518be2..3a0141885b 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceException.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceLevel.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceLevel.java
index cde6424bc5..674bb91a55 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceLevel.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAConformanceLevel.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfACopy.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfACopy.java
index ffc4c63539..3631c4c873 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfACopy.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfACopy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfARadioCheckField.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfARadioCheckField.java
index af8da1dea9..98003a9133 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfARadioCheckField.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfARadioCheckField.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfASmartCopy.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfASmartCopy.java
index 6ab487b708..1adc7c0c4a 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfASmartCopy.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfASmartCopy.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamper.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamper.java
index 009b177846..c607c4f61d 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamper.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamperImp.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamperImp.java
index 1e8a894ed8..e233cc3ff3 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamperImp.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAStamperImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfATtfUnicodeWriter.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfATtfUnicodeWriter.java
index d157101c99..4a48c52ca7 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfATtfUnicodeWriter.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfATtfUnicodeWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAWriter.java b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAWriter.java
index fc07b40b65..e70e607e0e 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAWriter.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/PdfAWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAConformance.java b/pdfa/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAConformance.java
index c936a23b3a..61e0e3a510 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAConformance.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/interfaces/PdfAConformance.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA1Checker.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA1Checker.java
index 1c44f9d802..f69b560c8a 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA1Checker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA1Checker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA2Checker.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA2Checker.java
index deb77ce99b..645cbd735b 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA2Checker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA2Checker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA3Checker.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA3Checker.java
index 501ec2c1ea..bed4331a6d 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA3Checker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfA3Checker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAChecker.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAChecker.java
index c50f8dab8c..f16cdd0dc1 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAChecker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAChecker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAConformanceImp.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAConformanceImp.java
index aab9fb9845..86b31340c7 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAConformanceImp.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/PdfAConformanceImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/ZugferdChecker.java b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/ZugferdChecker.java
index 8d2df07978..9ba8764cc6 100644
--- a/pdfa/src/main/java/com/itextpdf/text/pdf/internal/ZugferdChecker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/pdf/internal/ZugferdChecker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAProperties.java b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAProperties.java
index 1d4a40b6d8..9672f95a67 100644
--- a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAProperties.java
+++ b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAProperties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfASchema.java b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfASchema.java
index b43b7ad962..28435e6df2 100644
--- a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfASchema.java
+++ b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfASchema.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAXmpWriter.java b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAXmpWriter.java
index 14d6ca3efb..874e796720 100644
--- a/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAXmpWriter.java
+++ b/pdfa/src/main/java/com/itextpdf/text/xml/xmp/PdfAXmpWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/InvoiceDOM.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/InvoiceDOM.java
index 5c2eb6ec5d..ca5792b88e 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/InvoiceDOM.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/InvoiceDOM.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/CodeValidation.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/CodeValidation.java
index 09d46c3f71..0ad46e0707 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/CodeValidation.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/CodeValidation.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/NumberChecker.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/NumberChecker.java
index 47a4bebee6..c5ab51fd66 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/NumberChecker.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/NumberChecker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CountryCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CountryCode.java
index fc8d766bac..acc2aa3fe4 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CountryCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CountryCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CurrencyCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CurrencyCode.java
index 1df679de49..2249dda15a 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CurrencyCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/CurrencyCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DateFormatCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DateFormatCode.java
index 470708dc58..5ddbae6925 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DateFormatCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DateFormatCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DocumentTypeCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DocumentTypeCode.java
index b9eccaae81..c2c991cb5f 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DocumentTypeCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/DocumentTypeCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/LanguageCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/LanguageCode.java
index 1935c8db3c..b194840940 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/LanguageCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/LanguageCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/MeasurementUnitCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/MeasurementUnitCode.java
index d8a9cf5dd9..c967f3912c 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/MeasurementUnitCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/MeasurementUnitCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxIDTypeCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxIDTypeCode.java
index f8216843db..9e99bd3566 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxIDTypeCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxIDTypeCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxTypeCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxTypeCode.java
index 6379b220c8..12595fdc5b 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxTypeCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/basic/TaxTypeCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/FreeTextSubjectCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/FreeTextSubjectCode.java
index 723cb61736..185cb59394 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/FreeTextSubjectCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/FreeTextSubjectCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/GlobalIdentifierCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/GlobalIdentifierCode.java
index 79ee9ea525..e5acf47b9f 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/GlobalIdentifierCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/GlobalIdentifierCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/PaymentMeansCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/PaymentMeansCode.java
index 48edd382ea..d6dd511953 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/PaymentMeansCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/PaymentMeansCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/TaxCategoryCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/TaxCategoryCode.java
index 8f1eaaa626..a753639ce8 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/TaxCategoryCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/comfort/TaxCategoryCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AdditionalReferencedDocumentsCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AdditionalReferencedDocumentsCode.java
index e8eb57d3ba..a3bf268df6 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AdditionalReferencedDocumentsCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AdditionalReferencedDocumentsCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AllowanceChargeReasonCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AllowanceChargeReasonCode.java
index ad63b4a53f..1c76075e8f 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AllowanceChargeReasonCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/AllowanceChargeReasonCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/IncotermsCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/IncotermsCode.java
index 3861125db2..983d3b0be9 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/IncotermsCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/IncotermsCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/ProductClassificationSystemCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/ProductClassificationSystemCode.java
index c83dedf078..35d83b3ddc 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/ProductClassificationSystemCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/ProductClassificationSystemCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/QuantityCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/QuantityCode.java
index cb4e3c42ac..a586eb7911 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/QuantityCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/QuantityCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportIdentificationCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportIdentificationCode.java
index b42e14184c..a2a4df32d7 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportIdentificationCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportIdentificationCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportMeansCode.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportMeansCode.java
index 00b6454c46..1aa5d44e08 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportMeansCode.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/checkers/extended/TransportMeansCode.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/DataIncompleteException.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/DataIncompleteException.java
index c98944ffaf..86d075d131 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/DataIncompleteException.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/DataIncompleteException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/InvalidCodeException.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/InvalidCodeException.java
index ec539d50ec..9cc309129b 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/InvalidCodeException.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/exceptions/InvalidCodeException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfile.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfile.java
index 97098687d7..7ae2a3ea49 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfile.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfile.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfileImp.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfileImp.java
index 8c5509d73d..5c4343e617 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfileImp.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/BasicProfileImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfile.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfile.java
index 9ea0ff584e..0f88ea81a6 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfile.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfile.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfileImp.java b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfileImp.java
index 5a1d3f69e6..4ca7feb303 100644
--- a/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfileImp.java
+++ b/pdfa/src/main/java/com/itextpdf/text/zugferd/profiles/ComfortProfileImp.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -627,7 +626,7 @@ public void setBillingStartEnd(Date billingStartDateTime, String billingStartDat
this.billingEndDateTimeFormat = billingEndDateTimeFormat;
}
- public void addSpecifiedTradeAllowanceCharge(Boolean indicator, String actualAmount, String actualAmountCurrency,
+ public void addSpecifiedTradeAllowanceCharge(boolean indicator, String actualAmount, String actualAmountCurrency,
String reason, String[] typeCodes, String[] categoryCodes, String[] applicablePercent) {
this.tradeAllowanceChargeIndicator.add(indicator);
this.tradeAllowanceChargeActualAmount.add(actualAmount);
diff --git a/pdfa/src/test/java/com/itextpdf/text/pdf/PdfAWriterTest.java b/pdfa/src/test/java/com/itextpdf/text/pdf/PdfAWriterTest.java
index bbdf36f363..e8b7f14cc5 100644
--- a/pdfa/src/test/java/com/itextpdf/text/pdf/PdfAWriterTest.java
+++ b/pdfa/src/test/java/com/itextpdf/text/pdf/PdfAWriterTest.java
@@ -1,16 +1,25 @@
package com.itextpdf.text.pdf;
import com.itextpdf.testutils.CompareTool;
-import com.itextpdf.text.*;
+import com.itextpdf.text.Document;
+import com.itextpdf.text.DocumentException;
+import com.itextpdf.text.Font;
+import com.itextpdf.text.FontFactory;
+import com.itextpdf.text.Paragraph;
+import com.itextpdf.text.Phrase;
import com.itextpdf.text.io.TempFileCache;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import javax.xml.parsers.ParserConfigurationException;
+
import org.junit.Assert;
-import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.SAXException;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.*;
-
public class PdfAWriterTest {
private static final String outputDir = "./target/test/writer/";
@@ -126,7 +135,6 @@ public void testPdfAStamper3() throws DocumentException, IOException {
Assert.fail("PdfAConformance exception should be thrown");
}
- @Ignore("This test causes an OutOfMemory error on Jenkins. To investigate after 5.5.7 release.")
@Test
public void taggedPdfADocumentUsingExternalCacheTest() throws IOException, DocumentException, InterruptedException, ParserConfigurationException, SAXException {
int NUMBER_OF_ITERATIONS = 1000;
diff --git a/pom.xml b/pom.xml
index ffd5baacc9..32fef2d528 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,5 @@
-
+
4.0.0
@@ -10,9 +9,14 @@
root
- 5.5.9-SNAPSHOT
+ 5.5.10
pom
+ iText
+ A Free Java-PDF library
+ http://itextpdf.com
+ 1998
+
itext
pdfa
@@ -22,6 +26,53 @@
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.3
+
+ true
+
+
+ iText Core
+ com.itextpdf*
+
+
+ iText PDF/A
+ com.itextpdf.text.xml.xmp:com.itextpdf.text.zugferd*
+
+
+ iText Xtra
+ com.itextpdf.text.pdf.mc:com.itextpdf.text.pdf.ocg:com.itextpdf.text.pdf.pdfcleanup:com.itextpdf.text.pdf.richmedia:com.itextpdf.text.pdf.spatial*:com.itextpdf.text.pdf.util
+
+
+ XML Worker
+ com.itextpdf.tool.xml*
+
+
+
+
+
+
+ site-javadoc
+ site
+
+ aggregate
+
+
+
+
external.atlassian.jgitflow
jgitflow-maven-plugin
@@ -43,29 +94,23 @@
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.10.3
-
- ${javadoc.doclint.none}
- true
-
-
-
-
-
java8-disable-strict-javadoc
[1.8,)
-
- -Xdoclint:none
-
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+ -Xdoclint:none
+
+
+
+
diff --git a/xmlworker/pom.xml b/xmlworker/pom.xml
index 261a59bde1..69bea72fe2 100644
--- a/xmlworker/pom.xml
+++ b/xmlworker/pom.xml
@@ -1,18 +1,17 @@
-
+
4.0.0
com.itextpdf
itext-parent
1.0.0
-
+
com.itextpdf.tool
xmlworker
- 5.5.9
+ 5.5.10
jar
iText XML Worker
@@ -210,7 +209,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 2.8
+ 2.10.3
attach-sources
@@ -258,6 +257,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
+ 2.10.3
-Xdoclint:none
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/CustomContext.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/CustomContext.java
index b3bafc57e1..495e7eff5c 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/CustomContext.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/CustomContext.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementHandler.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementHandler.java
index 44f1176bb8..b0ad87b3a8 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementHandler.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementHandler.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementList.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementList.java
index 093b01e504..a66ca7ca0c 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementList.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/ElementList.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/Experimental.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/Experimental.java
index 4f6e447596..ab205fe808 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/Experimental.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/Experimental.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/NoCustomContextException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/NoCustomContextException.java
index ec5c607117..e461f2b712 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/NoCustomContextException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/NoCustomContextException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/Pipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/Pipeline.java
index 78a0a03d49..938f678374 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/Pipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/Pipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/PipelineException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/PipelineException.java
index f971544e6f..354233b4a6 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/PipelineException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/PipelineException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/ProcessObject.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/ProcessObject.java
index 2e3c659e2f..d518d46d9e 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/ProcessObject.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/ProcessObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/Tag.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/Tag.java
index 5ad0c82647..61a4b0980f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/Tag.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/Tag.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/TagUtils.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/TagUtils.java
index 23e79847d4..1c254fccb5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/TagUtils.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/TagUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/WorkerContext.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/WorkerContext.java
index 0049809919..dc11842d27 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/WorkerContext.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/WorkerContext.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/Writable.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/Writable.java
index 3340df73b3..4b454f41f3 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/Writable.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/Writable.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorker.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorker.java
index c88ce90658..2b1031d0d0 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorker.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerFontProvider.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerFontProvider.java
index a4d06e63cc..2ff18b15a4 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerFontProvider.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerFontProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerHelper.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerHelper.java
index 0482677160..22f8876461 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerHelper.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/XMLWorkerHelper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSS.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSS.java
index 90915d67e9..7cea31e0f2 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSS.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSS.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSSFileWrapper.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSSFileWrapper.java
index 9f6d66d00d..8521d7289a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSSFileWrapper.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CSSFileWrapper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFile.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFile.java
index bee4c25608..fec607c7fe 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFile.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFile.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileImpl.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileImpl.java
index 6d188cca5a..b4fa9d5ff6 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileImpl.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileImpl.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileProcessor.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileProcessor.java
index 3bd74bc177..fa883d4845 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileProcessor.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFileProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFiles.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFiles.java
index b0802769da..a35c156eb8 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFiles.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFiles.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFilesImpl.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFilesImpl.java
index 5fa8d53b03..993e6d0bfb 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFilesImpl.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssFilesImpl.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssInheritanceRules.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssInheritanceRules.java
index dd8bcb890f..3d21659d0a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssInheritanceRules.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssInheritanceRules.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssRule.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssRule.java
index d3828ca52f..b10520ffd4 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssRule.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssRule.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelector.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelector.java
index 03a3950773..6834655e30 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelector.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelector.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelectorItem.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelectorItem.java
index 95c1c532e5..36c4f7d3ca 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelectorItem.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssSelectorItem.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssUtils.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssUtils.java
index 063b200f20..a6a7035f97 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssUtils.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/CssUtils.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/DefaultCssInheritanceRules.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/DefaultCssInheritanceRules.java
index 696fcfeda2..105d1d797a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/DefaultCssInheritanceRules.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/DefaultCssInheritanceRules.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/FontSizeTranslator.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/FontSizeTranslator.java
index 18c2744d0b..1a205dc0ba 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/FontSizeTranslator.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/FontSizeTranslator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/HeightCalculator.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/HeightCalculator.java
index 09b32e1e81..fdf89f36bd 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/HeightCalculator.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/HeightCalculator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/StyleAttrCSSResolver.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/StyleAttrCSSResolver.java
index 447c177626..1e5feeed02 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/StyleAttrCSSResolver.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/StyleAttrCSSResolver.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/WidthCalculator.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/WidthCalculator.java
index b48ee5573b..f17e739452 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/WidthCalculator.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/WidthCalculator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplier.java
index 3f29eea9a7..4740a991a8 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -53,6 +52,8 @@
import com.itextpdf.tool.xml.css.CSS;
import com.itextpdf.tool.xml.css.CssUtils;
import com.itextpdf.tool.xml.css.FontSizeTranslator;
+import com.itextpdf.tool.xml.html.CssApplier;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
import java.util.Arrays;
import java.util.List;
@@ -62,7 +63,7 @@
/**
* Applies CSS Rules to Chunks
*/
-public class ChunkCssApplier {
+public class ChunkCssApplier implements CssApplier {
/**
* FF4 and IE8 provide normal text and bold text. All other values are translated to one of these 2 styles
* 100 - 500 and "lighter" = normal.
@@ -83,13 +84,17 @@ public ChunkCssApplier(FontProvider fontProvider) {
this.fontProvider = new FontFactoryImp();
}
}
+
+ public Chunk apply(final Chunk c, final Tag t) {
+ return apply(c, t, null, null, null);
+ }
/**
*
* @param c the Chunk to apply CSS to.
* @param t the tag containing the chunk data
* @return the styled chunk
*/
- public Chunk apply(final Chunk c, final Tag t) {
+ public Chunk apply(final Chunk c, final Tag t, final MarginMemory mm, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
Font f = applyFontStyles(t);
float size = f.getSize();
Map rules = t.getCSS();
@@ -169,7 +174,7 @@ public Chunk apply(final Chunk c, final Tag t) {
public Font applyFontStyles(final Tag t) {
String fontName = null;
String encoding = BaseFont.CP1252;
- float size = new FontSizeTranslator().getFontSize(t);
+ float size = FontSizeTranslator.getInstance().getFontSize(t);
if (size == Font.UNDEFINED)
size = Font.DEFAULTSIZE;
int style = Font.UNDEFINED;
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/DivCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/DivCssApplier.java
index 28c177da32..a756c30298 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/DivCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/DivCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -57,12 +56,13 @@
import com.itextpdf.tool.xml.Tag;
import com.itextpdf.tool.xml.css.*;
import com.itextpdf.tool.xml.exceptions.LocaleMessages;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.HTML;
import com.itextpdf.tool.xml.net.ImageRetrieve;
import com.itextpdf.tool.xml.net.exc.NoImageException;
import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
-public class DivCssApplier {
+public class DivCssApplier implements CssApplier {
private final CssUtils utils = CssUtils.getInstance();
private static final Logger LOG = LoggerFactory.getLogger(ListStyleTypeCssApplier.class);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplier.java
index f0e1296650..9e6b84eb5a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -54,11 +53,13 @@
import com.itextpdf.tool.xml.css.CssUtils;
import com.itextpdf.tool.xml.css.HeightCalculator;
import com.itextpdf.tool.xml.css.WidthCalculator;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.HTML;
import com.itextpdf.tool.xml.html.pdfelement.HtmlCell;
import com.itextpdf.tool.xml.html.table.CellSpacingEvent;
import com.itextpdf.tool.xml.html.table.Table;
import com.itextpdf.tool.xml.html.table.TableStyleValues;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
import java.util.Map;
import java.util.Map.Entry;
@@ -67,7 +68,7 @@
* @author Emiel Ackermann
*
*/
-public class HtmlCellCssApplier {
+public class HtmlCellCssApplier implements CssApplier {
private final CssUtils utils = CssUtils.getInstance();
@@ -81,6 +82,9 @@ public class HtmlCellCssApplier {
* @return a styled HtmlCell
*/
public HtmlCell apply(final HtmlCell cell, final Tag t, final MarginMemory memory, final PageSizeContainable psc) {
+ return apply(cell, t, memory, psc, null);
+ }
+ public HtmlCell apply(final HtmlCell cell, final Tag t, final MarginMemory memory, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
Tag row = t.getParent();
while(row != null && !row.getName().equals(HTML.Tag.TR)){
row = row.getParent();
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ImageCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ImageCssApplier.java
index 9d516de82e..e152912e0a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ImageCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ImageCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -49,7 +48,9 @@
import com.itextpdf.tool.xml.Tag;
import com.itextpdf.tool.xml.css.CSS;
import com.itextpdf.tool.xml.css.CssUtils;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.HTML;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
import java.util.Map;
@@ -58,7 +59,7 @@
*
* @author redlab_b
*/
-public class ImageCssApplier {
+public class ImageCssApplier implements CssApplier {
/**
* Applies CSS to an Image. Currently supported:
@@ -72,6 +73,10 @@ public class ImageCssApplier {
* @return a styled Image
*/
public Image apply(final Image img, final Tag tag) {
+ return apply(img, tag, null, null, null);
+ }
+
+ public Image apply(final Image img, final Tag tag, final MarginMemory mm, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
Map cssMap = tag.getCSS();
String widthValue = cssMap.get(HTML.Attribute.WIDTH);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/LineSeparatorCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/LineSeparatorCssApplier.java
index f435a707b8..1c14740ec5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/LineSeparatorCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/LineSeparatorCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -50,7 +49,9 @@
import com.itextpdf.tool.xml.Tag;
import com.itextpdf.tool.xml.css.CSS;
import com.itextpdf.tool.xml.css.CssUtils;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.HTML;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
import java.util.Map;
@@ -58,7 +59,7 @@
* @author Emiel Ackermann
*
*/
-public class LineSeparatorCssApplier {
+public class LineSeparatorCssApplier implements CssApplier {
/**
* Applies CSS to LineSeparators
@@ -68,7 +69,10 @@ public class LineSeparatorCssApplier {
* @param psc the {@link PageSize} container
* @return the styled {@link LineSeparator}
*/
- public LineSeparator apply(final LineSeparator ls, final Tag t, final PageSizeContainable psc) {
+ public LineSeparator apply(final LineSeparator ls, final Tag t, final PageSizeContainable psc) {
+ return apply(ls, t, null, psc, null);
+ }
+ public LineSeparator apply(final LineSeparator ls, final Tag t, final MarginMemory mm, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
float lineWidth = 1;
Map css = t.getCSS();
if (t.getAttributes().get(HTML.Attribute.SIZE) != null) {
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ListStyleTypeCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ListStyleTypeCssApplier.java
index ff0ac25d57..4ad8e7d436 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ListStyleTypeCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ListStyleTypeCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -65,6 +64,7 @@
import com.itextpdf.tool.xml.css.CssUtils;
import com.itextpdf.tool.xml.css.FontSizeTranslator;
import com.itextpdf.tool.xml.exceptions.LocaleMessages;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.HTML;
import com.itextpdf.tool.xml.net.ImageRetrieve;
import com.itextpdf.tool.xml.net.exc.NoImageException;
@@ -76,7 +76,7 @@
* @author itextpdf.com
*
*/
-public class ListStyleTypeCssApplier {
+public class ListStyleTypeCssApplier implements CssApplier {
private final CssUtils utils = CssUtils.getInstance();
private static final Logger LOG = LoggerFactory.getLogger(ListStyleTypeCssApplier.class);
@@ -98,7 +98,10 @@ public ListStyleTypeCssApplier() {
* @param context the context
* @return the changed {@link List}
*/
- public List apply(final List list, final Tag t, final HtmlPipelineContext context) {
+ public List apply(final List list, final Tag t, final HtmlPipelineContext context) {
+ return apply(list, t, null, null, context);
+ }
+ public List apply(final List list, final Tag t, final MarginMemory memory, final PageSizeContainable psc, final HtmlPipelineContext context) {
// not implemented: list-style-type:armenian, georgian, decimal-leading-zero.
float fontSize = FontSizeTranslator.getInstance().getFontSize(t);
List lst = list;
@@ -242,6 +245,6 @@ private void shrinkSymbol(final List lst, final float fontSize, final BaseColor
* @return styled element
*/
public Element apply(final List e, final Tag t) {
- return apply(e, t, null);
+ return apply(e, t, null, null, null);
}
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MarginMemory.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MarginMemory.java
index 1aca1311eb..83f0174e36 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MarginMemory.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MarginMemory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MaxLeadingAndSize.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MaxLeadingAndSize.java
index b4ef785909..f20f3cc15b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MaxLeadingAndSize.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/MaxLeadingAndSize.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/NoNewLineParagraphCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/NoNewLineParagraphCssApplier.java
index 3854b879ff..3fc1ec763b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/NoNewLineParagraphCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/NoNewLineParagraphCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -52,14 +51,16 @@
import com.itextpdf.tool.xml.css.CSS;
import com.itextpdf.tool.xml.css.CssUtils;
import com.itextpdf.tool.xml.css.FontSizeTranslator;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.pdfelement.NoNewLineParagraph;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
/**
*
* @author itextpdf.com
*
*/
-public class NoNewLineParagraphCssApplier {
+public class NoNewLineParagraphCssApplier implements CssApplier{
private final CssUtils utils = CssUtils.getInstance();
@@ -72,7 +73,10 @@ public class NoNewLineParagraphCssApplier {
* @param configuration the MarginMemory to check margin sizes
* @return a styled NoNewLineParagraph
*/
- public NoNewLineParagraph apply(final NoNewLineParagraph p, final Tag t, final MarginMemory configuration) {
+ public NoNewLineParagraph apply(final NoNewLineParagraph p, final Tag t, final MarginMemory configuration) {
+ return apply(p, t, configuration, null, null);
+ }
+ public NoNewLineParagraph apply(final NoNewLineParagraph p, final Tag t, final MarginMemory configuration, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
/*MaxLeadingAndSize m = new MaxLeadingAndSize();
if (configuration.getRootTags().contains(t.getName())) {
m.setLeading(t);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/PageSizeContainable.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/PageSizeContainable.java
index f3dbf4e21c..869e31315e 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/PageSizeContainable.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/PageSizeContainable.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplier.java
index 20a38fd855..e9947d49bc 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplier.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplier.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -51,8 +50,10 @@
import com.itextpdf.tool.xml.css.CSS;
import com.itextpdf.tool.xml.css.CssUtils;
import com.itextpdf.tool.xml.css.FontSizeTranslator;
+import com.itextpdf.tool.xml.html.CssApplier;
import com.itextpdf.tool.xml.html.CssAppliers;
import com.itextpdf.tool.xml.html.HTML;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
import java.util.Map;
import java.util.Map.Entry;
@@ -62,7 +63,7 @@
*
* @author itextpdf.com
*/
-public class ParagraphCssApplier {
+public class ParagraphCssApplier implements CssApplier {
private final CssAppliers appliers;
@@ -83,7 +84,10 @@ public ParagraphCssApplier(final CssAppliers appliers) {
* @param configuration the MarginMemory
* @return a styled {@link Paragraph}
*/
- public Paragraph apply(final Paragraph p, final Tag t, final MarginMemory configuration) {
+ public Paragraph apply(final Paragraph p, final Tag t, final MarginMemory configuration) {
+ return apply(p, t, configuration, null, null);
+ }
+ public Paragraph apply(final Paragraph p, final Tag t, final MarginMemory configuration, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
/*MaxLeadingAndSize m = new MaxLeadingAndSize();
if (configuration.getRootTags().contains(t.getName())) {
m.setLeading(t);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/package-info.java
index fa586b0c3d..a24f8e594d 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/apply/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/package-info.java
index 3c491c2cf5..88d872d426 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssSelectorParser.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssSelectorParser.java
index f404131d3c..3f59b5ccea 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssSelectorParser.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssSelectorParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssStateController.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssStateController.java
index 0d7fef2ece..383e71ef2e 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssStateController.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/CssStateController.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/State.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/State.java
index c28ed618f2..70183ea03f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/State.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/State.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/package-info.java
index d6ed893247..4d6269323f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentEnd.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentEnd.java
index 787b84c844..5e7a807812 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentEnd.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentEnd.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentInside.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentInside.java
index 29fc81ad2e..3259d1a808 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentInside.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentInside.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentStart.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentStart.java
index 5222008dc5..4382915bba 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentStart.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/CommentStart.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Properties.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Properties.java
index 22c31985e9..d2297b99e5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Properties.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Properties.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Rule.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Rule.java
index 0986106d5e..6eb3a88057 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Rule.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Rule.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Unknown.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Unknown.java
index 3fa7a3e70e..279c8ae3b7 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Unknown.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/Unknown.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/package-info.java
index 44d6a5f68f..10a7a69232 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/css/parser/state/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/CssResolverException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/CssResolverException.java
index 1dbb0fdacd..f30692ec08 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/CssResolverException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/CssResolverException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/LocaleMessages.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/LocaleMessages.java
index 8f10e8d05e..cf02345ef7 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/LocaleMessages.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/LocaleMessages.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoDataException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoDataException.java
index 04d535fe84..213125bae7 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoDataException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoDataException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoSiblingException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoSiblingException.java
index ca631a6241..9b5cd9a9c1 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoSiblingException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoSiblingException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoTagProcessorException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoTagProcessorException.java
index cffec1bab0..e1083595c0 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoTagProcessorException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NoTagProcessorException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NotImplementedException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NotImplementedException.java
index 64cf8d54fc..4cbbc68396 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NotImplementedException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/NotImplementedException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/RuntimeWorkerException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/RuntimeWorkerException.java
index 59b482bdfc..cf1f8eb0c4 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/RuntimeWorkerException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/RuntimeWorkerException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/package-info.java
index 002372bfc7..eacb8f3323 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/exceptions/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/AbstractTagProcessor.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/AbstractTagProcessor.java
index e6495dae92..6e8fbe2bbf 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/AbstractTagProcessor.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/AbstractTagProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -54,7 +53,9 @@
import com.itextpdf.tool.xml.util.ParentTreeUtil;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* Abstract TagProcessor that allows setting the configuration object to a
@@ -150,43 +151,65 @@ public final List startElement(final WorkerContext ctx, final Tag tag)
public List content(final WorkerContext ctx, final Tag tag, final String content) {
return new ArrayList(0);
}
-
- private String getParentDirection() {
- String result = null;
- for (Tag tag : tree) {
+
+ /**
+ * For some tags, if they have their own not inherited DIR attribute, this attribute will definitely not be applied
+ * for itext layout. For the most common such tags we use this set to ignore DIR attribute, in order to avoid
+ * unnecessary adjustments in XmlWorker.
+ *
+ * However if parent of these tags have DIR attribute, it may be applied to these tags.
+ */
+ private Set ignoreDirAttribute = new HashSet() {{
+ add(HTML.Tag.P);
+ add(HTML.Tag.SPAN);
+ }};
+
+ private List tree;
+ private String getParentDirection() {
+ String result = null;
+ for (Tag tag : tree) {
+ if (!ignoreDirAttribute.contains(tag.getName().toLowerCase())) {
result = tag.getAttributes().get(HTML.Attribute.DIR);
if (result != null) break;
// Nested tables need this check
result = tag.getCSS().get(CSS.Property.DIRECTION);
if (result != null) break;
}
- return result;
}
-
- private List tree;
-
- protected int getRunDirection(Tag tag) {
- /* CSS should get precedence, but a dir attribute defined on the tag
- itself should take precedence over an inherited style tag
- */
- String dirValue = tag.getAttributes().get(HTML.Attribute.DIR);
- if (dirValue == null) {
+ return result;
+ }
+ protected int getRunDirection(Tag tag) {
+ /* CSS should get precedence, but a dir attribute defined on the tag
+ itself should take precedence over an inherited style tag
+ */
+ String dirValue = null;
+ boolean toFetchRunDirFromThisTag = tag.getName() != null &&
+ !ignoreDirAttribute.contains(tag.getName().toLowerCase());
+ if (toFetchRunDirFromThisTag) {
+ dirValue = tag.getAttributes().get(HTML.Attribute.DIR);
+ }
+ if (dirValue == null) {
+ if (toFetchRunDirFromThisTag) {
// using CSS is actually discouraged, but still supported
dirValue = tag.getCSS().get(CSS.Property.DIRECTION);
- if (dirValue == null) {
- // dir attribute is inheritable in HTML but gets trumped by CSS
- tree = new ParentTreeUtil().getParentTagTree(tag, tree);
- dirValue = getParentDirection();
- }// */
- }
- if (CSS.Value.RTL.equalsIgnoreCase(dirValue)) {
- return PdfWriter.RUN_DIRECTION_RTL;
}
- if (CSS.Value.LTR.equalsIgnoreCase(dirValue)) {
- return PdfWriter.RUN_DIRECTION_LTR;
+ if (dirValue == null) {
+ // dir attribute is inheritable in HTML but gets trumped by CSS
+ tree = new ParentTreeUtil().getParentTagTree(tag, tree);
+ dirValue = getParentDirection();
}
+ }
+ if (CSS.Value.RTL.equalsIgnoreCase(dirValue)) {
+ return PdfWriter.RUN_DIRECTION_RTL;
+ }
+ if (CSS.Value.LTR.equalsIgnoreCase(dirValue)) {
+ return PdfWriter.RUN_DIRECTION_LTR;
+ }
+ if (CSS.Value.AUTO.equalsIgnoreCase(dirValue)) {
return PdfWriter.RUN_DIRECTION_DEFAULT;
}
+ return PdfWriter.RUN_DIRECTION_NO_BIDI;
+ }
protected List textContent(final WorkerContext ctx, final Tag tag, final String content) {
List sanitizedChunks = HTMLUtils.sanitize(content, false);
@@ -301,6 +324,7 @@ public List currentContentToParagraph(final List currentConten
}
if (direction == PdfWriter.RUN_DIRECTION_RTL) {
doRtlIndentCorrections(p);
+ invertTextAlignForParagraph(p);
}
list.add(p);
}
@@ -308,11 +332,13 @@ public List currentContentToParagraph(final List currentConten
NoNewLineParagraph p = new NoNewLineParagraph(Float.NaN);
p.setMultipliedLeading(1.2f);
for (Element e : currentContent) {
+ updateParagraphFontIfNeeded(p, e);
p.add(e);
}
p = (NoNewLineParagraph) getCssAppliers().apply(p, tag, getHtmlPipelineContext(ctx));
if (direction == PdfWriter.RUN_DIRECTION_RTL) {
doRtlIndentCorrections(p);
+ invertTextAlignForParagraph(p);
}
list.add(p);
}
@@ -363,4 +389,55 @@ protected void doRtlIndentCorrections(Indentable p) {
p.setIndentationRight(p.getIndentationLeft());
p.setIndentationLeft(right);
}
+
+ protected void invertTextAlignForParagraph(Paragraph p) {
+ switch (p.getAlignment()) {
+ case Element.ALIGN_UNDEFINED:
+ case Element.ALIGN_CENTER:
+ case Element.ALIGN_JUSTIFIED:
+ case Element.ALIGN_JUSTIFIED_ALL:
+ break;
+ case Element.ALIGN_RIGHT:
+ p.setAlignment(Element.ALIGN_LEFT);
+ break;
+ case Element.ALIGN_LEFT:
+ default:
+ p.setAlignment(Element.ALIGN_RIGHT);
+ break;
+ }
+ }
+
+ protected void invertTextAlignForParagraph(NoNewLineParagraph p) {
+ switch (p.getAlignment()) {
+ case Element.ALIGN_UNDEFINED:
+ case Element.ALIGN_CENTER:
+ case Element.ALIGN_JUSTIFIED:
+ case Element.ALIGN_JUSTIFIED_ALL:
+ break;
+ case Element.ALIGN_RIGHT:
+ p.setAlignment(Element.ALIGN_LEFT);
+ break;
+ case Element.ALIGN_LEFT:
+ default:
+ p.setAlignment(Element.ALIGN_RIGHT);
+ break;
+ }
+ }
+
+ /**
+ * In case child font is of bigger size than paragraph font, text overlapping may occur.
+ * This happens because leading of the lines in paragraph is set based on paragraph font.
+ */
+ protected void updateParagraphFontIfNeeded(Phrase p, Element child) {
+ Font childFont = null;
+ if (child instanceof Chunk) {
+ childFont = ((Chunk) child).getFont();
+ } else if (child instanceof Phrase) {
+ childFont = ((Phrase) child).getFont();
+ }
+ float pFontSize = p.getFont() != null ? p.getFont().getSize() : Font.DEFAULTSIZE;
+ if (childFont != null && childFont.getSize() > pFontSize) {
+ p.setFont(childFont);
+ }
+ }
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Anchor.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Anchor.java
index d3e2e05a3d..6f48220a86 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Anchor.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Anchor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Body.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Body.java
index 2df61419b2..5be493e7f3 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Body.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Body.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Break.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Break.java
index 34f2167737..4a885ba583 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Break.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Break.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssApplier.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssApplier.java
new file mode 100644
index 0000000000..7ca916b92f
--- /dev/null
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssApplier.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * This file is part of the iText (R) project.
+ * Copyright (c) 1998-2016 iText Group NV
+ * Authors: Bruno Lowagie, Paulo Soares, et al.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License version 3
+ * as published by the Free Software Foundation with the addition of the
+ * following permission added to Section 15 as permitted in Section 7(a):
+ * FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY
+ * ITEXT GROUP. ITEXT GROUP DISCLAIMS THE WARRANTY OF NON INFRINGEMENT
+ * OF THIRD PARTY RIGHTS
+ *
+ * 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 or write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA, 02110-1301 USA, or download the license from the following URL:
+ * http://itextpdf.com/terms-of-use/
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of this program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU Affero General Public License.
+ *
+ * In accordance with Section 7(b) of the GNU Affero General Public License,
+ * a covered work must retain the producer line in every PDF that is created
+ * or manipulated using iText.
+ *
+ * You can be released from the requirements of the license by purchasing
+ * a commercial license. Buying such a license is mandatory as soon as you
+ * develop commercial activities involving the iText software without
+ * disclosing the source code of your own applications.
+ * These activities include: offering paid services to customers as an ASP,
+ * serving PDFs on the fly in a web application, shipping iText with a closed
+ * source product.
+ *
+ * For more information, please contact iText Software Corp. at this
+ * address: sales@itextpdf.com
+ */
+package com.itextpdf.tool.xml.html;
+
+import com.itextpdf.text.Element;
+import com.itextpdf.tool.xml.Tag;
+import com.itextpdf.tool.xml.css.apply.MarginMemory;
+import com.itextpdf.tool.xml.css.apply.PageSizeContainable;
+import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
+
+/**
+ * An interface for applying custom rules to a certain tag. The most obvious use
+ * case is CRUD operations on XML or CSS attributes from an input document which
+ * cannot be changed.
+ *
+ * @author benoit
+ * @param the type of iText element that can be customized
+ */
+public interface CssApplier {
+
+ /**
+ * Styles an element
+ *
+ * @param e the element
+ * @param t the tag
+ * @param mm the MarginMemory
+ * @param psc the PageSizeContainable
+ * @param ctx the HtmlPipelineContext
+ * @return a styled {@link Paragraph}
+ */
+ T apply(T e, final Tag t, final MarginMemory mm, final PageSizeContainable psc, final HtmlPipelineContext ctx);
+}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliers.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliers.java
index 23d9bd59cb..f7dbd65974 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliers.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliers.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersAware.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersAware.java
index af4ff9da5c..66f1b085ac 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersAware.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersAware.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersImpl.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersImpl.java
index 4a529c5b9e..9ebaf14b90 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersImpl.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/CssAppliersImpl.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -51,6 +50,9 @@
import com.itextpdf.tool.xml.pipeline.html.NoImageProviderException;
import com.itextpdf.tool.xml.pipeline.html.UrlLinkResolver;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* Applies CSS to an Element using the appliers from the com.itextpdf.tool.xml.css.apply
.
*
@@ -65,57 +67,51 @@ public class CssAppliersImpl implements CssAppliers {
*
* public static CssAppliersImpl getInstance() { return myself; }
*/
- protected ChunkCssApplier chunk;
- protected ParagraphCssApplier paragraph;
- private NoNewLineParagraphCssApplier nonewlineparagraph;
- private HtmlCellCssApplier htmlcell;
- private ListStyleTypeCssApplier list;
- private LineSeparatorCssApplier lineseparator;
- private ImageCssApplier image;
- private DivCssApplier div;
+ private Map, CssApplier extends Element>> map;
/**
*
*/
public CssAppliersImpl() {
- chunk = new ChunkCssApplier(null);
- paragraph = new ParagraphCssApplier(this);
- nonewlineparagraph = new NoNewLineParagraphCssApplier();
- htmlcell = new HtmlCellCssApplier();
- list = new ListStyleTypeCssApplier();
- lineseparator = new LineSeparatorCssApplier();
- image = new ImageCssApplier();
- div = new DivCssApplier();
+ map = new HashMap, CssApplier extends Element>>();
+ map.put(Chunk.class, new ChunkCssApplier(null));
+ map.put(Paragraph.class, new ParagraphCssApplier(this));
+ map.put(NoNewLineParagraph.class, new NoNewLineParagraphCssApplier());
+ map.put(HtmlCell.class, new HtmlCellCssApplier());
+ map.put(List.class, new ListStyleTypeCssApplier());
+ map.put(LineSeparator.class, new LineSeparatorCssApplier());
+ map.put(Image.class, new ImageCssApplier());
+ map.put(PdfDiv.class, new DivCssApplier());
}
- public CssAppliersImpl(FontProvider fontProvider) {
- this();
- chunk.setFontProvider(fontProvider);
+ public CssAppliersImpl(FontProvider fontProvider) {
+ this();
+ ((ChunkCssApplier) map.get(Chunk.class)).setFontProvider(fontProvider);
}
+
+ public void putCssApplier(Class> s, CssApplier c) {
+ map.put(s, c);
+ }
+
+ public CssApplier getCssApplier(Class> s) {
+ return map.get(s);
+ }
/* (non-Javadoc)
* @see com.itextpdf.tool.xml.html.CssAppliers#apply(com.itextpdf.text.Element, com.itextpdf.tool.xml.Tag, com.itextpdf.tool.xml.css.apply.MarginMemory, com.itextpdf.tool.xml.css.apply.PageSizeContainable, com.itextpdf.tool.xml.pipeline.html.ImageProvider)
*/
public Element apply(Element e, final Tag t, final MarginMemory mm, final PageSizeContainable psc, final HtmlPipelineContext ctx) {
- // warning, mapping is done by instance of, make sure to add things in the right order when adding more.
- if (e instanceof Chunk) { // covers TabbedChunk & Chunk
- e = chunk.apply((Chunk) e, t);
- } else if (e instanceof Paragraph) {
- e = paragraph.apply((Paragraph) e, t, mm);
- } else if (e instanceof NoNewLineParagraph) {
- e = nonewlineparagraph.apply((NoNewLineParagraph) e, t, mm);
- } else if (e instanceof HtmlCell) {
- e = htmlcell.apply((HtmlCell) e, t, mm, psc);
- } else if (e instanceof List) {
- e = list.apply((List) e, t, ctx);
- } else if (e instanceof LineSeparator) {
- e = lineseparator.apply((LineSeparator) e, t, psc);
- } else if (e instanceof Image) {
- e = image.apply((Image) e, t);
- } else if (e instanceof PdfDiv) {
- e = div.apply((PdfDiv)e, t, mm, psc, ctx);
- }
- return e;
-
+ CssApplier c = null;
+ for (Map.Entry, CssApplier extends Element>> entry : map.entrySet()) {
+ if (entry.getKey().isInstance(e)) {
+ c = entry.getValue();
+ break;
+ }
+ }
+ if (c == null) {
+ throw new RuntimeException();
+ }
+ e = c.apply(e, t, mm, psc, ctx);
+ return e;
}
/* (non-Javadoc)
@@ -126,25 +122,16 @@ public Element apply(final Element e, final Tag t, final HtmlPipelineContext ctx
}
public ChunkCssApplier getChunkCssAplier() {
- return chunk;
+ return (ChunkCssApplier) map.get(Chunk.class);
}
public void setChunkCssAplier(final ChunkCssApplier chunkCssAplier) {
- this.chunk = chunkCssAplier;
+ map.put(Chunk.class, chunkCssAplier);
}
public CssAppliers clone() {
CssAppliersImpl clone = getClonedObject();
- clone.chunk = chunk;
-
- clone.paragraph = paragraph;
- clone.nonewlineparagraph = nonewlineparagraph;
- clone.htmlcell = htmlcell;
- clone.list = list;
- clone.lineseparator = lineseparator;
- clone.image = image;
- clone.div = div;
-
+ clone.map = new HashMap, CssApplier extends Element>>(this.map);
return clone;
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/DefaultTagProcessorFactory.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/DefaultTagProcessorFactory.java
index f6b945ef89..8ff4798adc 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/DefaultTagProcessorFactory.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/DefaultTagProcessorFactory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Div.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Div.java
index 715c434059..55b8ec0ba5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Div.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/Div.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -104,7 +103,7 @@ public List end(final WorkerContext ctx, final Tag tag, final List end(final WorkerContext ctx, final Tag tag, final List end(final WorkerContext ctx, final Tag tag, final List l = new ArrayList(1);
+ if (direction == PdfWriter.RUN_DIRECTION_RTL) {
+ invertTextAlignForDiv(div);
+ }
+
+ List l = new ArrayList(1);
l.add(div);
return l;
} catch (NoCustomContextException e) {
@@ -153,9 +143,26 @@ public List end(final WorkerContext ctx, final Tag tag, final List end(final WorkerContext ctx, final Tag tag, final List entry : tag.getCSS().entrySet()) {
if (entry.getKey().equalsIgnoreCase(CSS.Property.PAGE_BREAK_INSIDE)) {
if (entry.getValue().equalsIgnoreCase(CSS.Value.AVOID)) {
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableBorderEvent.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableBorderEvent.java
index 004dc9b4b8..5254b2b29f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableBorderEvent.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableBorderEvent.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableData.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableData.java
index b58d1744fb..c1afc18ee2 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableData.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableData.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -95,10 +94,10 @@ public List content(final WorkerContext ctx, final Tag tag,
public List end(final WorkerContext ctx, final Tag tag,
final List currentContent) {
HtmlCell cell = new HtmlCell();
- int direction = getRunDirection(tag);
- if (direction != PdfWriter.RUN_DIRECTION_DEFAULT) {
- cell.setRunDirection(direction);
- }
+ int direction = getRunDirection(tag);
+ if (direction != PdfWriter.RUN_DIRECTION_NO_BIDI) {
+ cell.setRunDirection(direction);
+ }
if (HTML.Tag.TH.equalsIgnoreCase(tag.getName())) {
cell.setRole(PdfName.TH);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRow.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRow.java
index 72a570893c..27d6130385 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRow.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRow.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -80,9 +79,9 @@ public List end(WorkerContext ctx, final Tag tag, final List c
row = new TableRowElement(currentContent, Place.BODY);
}
int direction = getRunDirection(tag);
- if (direction != PdfWriter.RUN_DIRECTION_DEFAULT) {
+ if (direction != PdfWriter.RUN_DIRECTION_NO_BIDI) {
for (HtmlCell cell : row.getContent()) {
- if (cell.getRunDirection() == PdfWriter.RUN_DIRECTION_DEFAULT) {
+ if (cell.getRunDirection() == PdfWriter.RUN_DIRECTION_NO_BIDI) {
cell.setRunDirection(direction);
}
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRowElement.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRowElement.java
index 50931f3f16..0e3ec959f3 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRowElement.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableRowElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableStyleValues.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableStyleValues.java
index 8f644495bf..af9d1ee9c8 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableStyleValues.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/TableStyleValues.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/package-info.java
index 9e76e68b0f..82c0a25e0a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/html/table/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieve.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieve.java
index d84896124c..05d48f4a1c 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieve.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieve.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieveImpl.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieveImpl.java
index cf8c18acc3..4d6ae2a220 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieveImpl.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/FileRetrieveImpl.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ImageRetrieve.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ImageRetrieve.java
index b49d3d1710..6b6aba6f38 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ImageRetrieve.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ImageRetrieve.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ReadingProcessor.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ReadingProcessor.java
index e5e7fe3308..02987110d9 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ReadingProcessor.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/ReadingProcessor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/exc/NoImageException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/exc/NoImageException.java
index 34f285c53c..c76d321777 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/exc/NoImageException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/exc/NoImageException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/package-info.java
index cf0ca9600a..e2d71ac8de 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/net/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/net/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/package-info.java
index 9f51107965..1e35120b29 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/State.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/State.java
index 02ad14ef50..d9470efbef 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/State.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/State.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/StateController.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/StateController.java
index b69de9307d..f4997164ba 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/StateController.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/StateController.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -118,11 +117,14 @@ public XMLParser setState(final State state) {
}
/**
- * Returns to the previous state.
+ * Changes the state to the previous one.
* @return Parser
*/
public XMLParser previousState() {
parser.setState(previousState);
+ State temp = currentState;
+ currentState = previousState;
+ previousState = temp;
return parser;
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/TagState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/TagState.java
index e541e12a97..83e990e1bb 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/TagState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/TagState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParser.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParser.java
index 933b3f33b8..389996726d 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParser.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserListener.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserListener.java
index cfc10190c4..8fc8134d39 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserListener.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserListener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserMemory.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserMemory.java
index 615a252b70..6f0fe4c56b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserMemory.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/XMLParserMemory.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/Appender.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/Appender.java
index a1ab399f7a..31ad0f06c1 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/Appender.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/Appender.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/EncodingUtil.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/EncodingUtil.java
index 79161913a2..b081a74d65 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/EncodingUtil.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/EncodingUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/MonitorInputReader.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/MonitorInputReader.java
index 15d5379d0d..65f3a397f5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/MonitorInputReader.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/MonitorInputReader.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserListenerWriter.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserListenerWriter.java
index 8a5991de20..fd5110ce58 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserListenerWriter.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserListenerWriter.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserMonitor.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserMonitor.java
index 22c9df02d3..972df0d365 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserMonitor.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/ParserMonitor.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/package-info.java
index 65f661343a..6ce590b806 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/io/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/package-info.java
index 84a868011e..20de6ac23e 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/AttributeValueState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/AttributeValueState.java
index 72a275acbf..6344d8a1c9 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/AttributeValueState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/AttributeValueState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CdataState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CdataState.java
index b9d4462690..b8e4c29802 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CdataState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CdataState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseCommentState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseCommentState.java
index e8e9a3f549..69cccc1992 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseCommentState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseCommentState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseStarCommentState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseStarCommentState.java
index 786c13ba3f..edfd32b753 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseStarCommentState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CloseStarCommentState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ClosingTagState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ClosingTagState.java
index 1cd4734c9d..66612070e6 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ClosingTagState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ClosingTagState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CommentState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CommentState.java
index 1b19a3ab72..f84fefa852 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CommentState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/CommentState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DocTypeState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DocTypeState.java
index 3188fe109b..dbf66c28e9 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DocTypeState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DocTypeState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DoubleQuotedAttrValueState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DoubleQuotedAttrValueState.java
index 951ee58ecd..4f611f231e 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DoubleQuotedAttrValueState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/DoubleQuotedAttrValueState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -70,6 +69,8 @@ public void process(final char character) {
this.parser.memory().putCurrentAttrValue(this.parser.bufferToString());
this.parser.flush();
this.parser.selectState().tagAttributes();
+ } else if (character == '&') {
+ this.parser.selectState().specialChar();
} else {
this.parser.append(character);
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagHTMLState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagHTMLState.java
index 99fecf8741..d9619ed5d1 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagHTMLState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagHTMLState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagState.java
index 86d8f16c50..cad65faa2b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/InsideTagState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ProcessingInstructionEncounteredState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ProcessingInstructionEncounteredState.java
index 2a370cd345..af15a32d84 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ProcessingInstructionEncounteredState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/ProcessingInstructionEncounteredState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SelfClosingTagState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SelfClosingTagState.java
index 14cc099aa0..085b5325bf 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SelfClosingTagState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SelfClosingTagState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SingleQuotedAttrValueState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SingleQuotedAttrValueState.java
index 85c5e2d5b7..dc8e1bc767 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SingleQuotedAttrValueState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SingleQuotedAttrValueState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -70,6 +69,8 @@ public void process(final char character) {
this.parser.memory().putCurrentAttrValue(this.parser.bufferToString());
this.parser.flush();
this.parser.selectState().tagAttributes();
+ } else if (character == '&') {
+ this.parser.selectState().specialChar();
} else {
this.parser.append(character);
}
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SpecialCharState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SpecialCharState.java
index a6ce1ece4d..65dc6bc559 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SpecialCharState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/SpecialCharState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -83,12 +82,14 @@ public void process(final char character) {
parser.memory().lastChar(decoded);
}
// }
- parser.selectState().inTag();
+ //parser.selectState().inTag();
+ parser.selectState().previousState();
this.parser.memory().currentEntity().setLength(0);
} else if (character != '#' && (character < '0' || character > '9') && (character < 'a' || character > 'z')
&& (character < 'A' || character > 'Z') || entity.length() >= 7) {
- parser.append('&').append(entity.toString());
- parser.selectState().inTag();
+ parser.append('&').append(entity.toString()).append(character);
+ //parser.selectState().inTag();
+ parser.selectState().previousState();
this.parser.memory().currentEntity().setLength(0);
} else {
entity.append(character);
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/StarCommentState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/StarCommentState.java
index f8f860463b..a96acf147c 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/StarCommentState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/StarCommentState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagAttributeState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagAttributeState.java
index 49dd794730..3631c11ab5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagAttributeState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagAttributeState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagEncounteredState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagEncounteredState.java
index 1cfd84cc12..3e4fd7ab07 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagEncounteredState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/TagEncounteredState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnknownState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnknownState.java
index 328a7defa2..658e8750bd 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnknownState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnknownState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnquotedAttrState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnquotedAttrState.java
index 9638c80c55..2c72792da5 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnquotedAttrState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/UnquotedAttrState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/XmlState.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/XmlState.java
index 3779954b46..1bd93a5085 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/XmlState.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/XmlState.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/package-info.java
index ae89977f4f..1ccc97bc5b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/parser/state/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/AbstractPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/AbstractPipeline.java
index 2b3b0d5c4e..367822f41f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/AbstractPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/AbstractPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/WritableElement.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/WritableElement.java
index f102422183..46084d687f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/WritableElement.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/WritableElement.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CSSResolver.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CSSResolver.java
index 4f77ddfd45..76c9959c33 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CSSResolver.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CSSResolver.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CssResolverPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CssResolverPipeline.java
index b60b11d40f..f5b17a4876 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CssResolverPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/CssResolverPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -64,6 +63,14 @@ public class CssResolverPipeline extends AbstractPipeline init(final WorkerContext context) throws PipelineException {
throw new PipelineException(e);
}
}
+
/**
* @param next the next pipeline.
* @param cssResolver the {@link CSSResolver} to use in this Pipeline, it
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/package-info.java
index 1785fe60ce..59d10d6b8a 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/css/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/MapContext.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/MapContext.java
index ef0b806b63..886f213b51 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/MapContext.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/MapContext.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/ObjectContext.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/ObjectContext.java
index 86e4ceb416..a9f982ad8f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/ObjectContext.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/ObjectContext.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/WorkerContextImpl.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/WorkerContextImpl.java
index 6493715d0f..8ce388adf2 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/WorkerContextImpl.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/WorkerContextImpl.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/package-info.java
index aabc95915f..60c18d1f4f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/ctx/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/ElementHandlerPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/ElementHandlerPipeline.java
index c1d1965a81..54880b7a37 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/ElementHandlerPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/ElementHandlerPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/PdfWriterPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/PdfWriterPipeline.java
index 7f81efb90f..6edeaaab93 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/PdfWriterPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/PdfWriterPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/package-info.java
index 758f83c123..4fc8a46cf1 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/end/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AbstractImageProvider.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AbstractImageProvider.java
index 4b069c11ee..107c4521ed 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AbstractImageProvider.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AbstractImageProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AutoDocPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AutoDocPipeline.java
index 4588f1a142..0c579ca2a0 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AutoDocPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/AutoDocPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/FileMaker.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/FileMaker.java
index 4e7c26e745..6b168e5654 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/FileMaker.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/FileMaker.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipeline.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipeline.java
index 0ce3e02201..1b30384ac6 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipeline.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipeline.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -72,6 +71,14 @@ public HtmlPipeline(final HtmlPipelineContext hpc, final Pipeline> next) {
this.hpc = hpc;
}
+ /**
+ * This allows the descendant classes to be fetched from the context.
+ */
+ @Override
+ public String getContextKey() {
+ return HtmlPipeline.class.getName();
+ }
+
@Override
public Pipeline> init(final WorkerContext context) throws PipelineException {
try {
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipelineContext.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipelineContext.java
index 21310a71a8..4ce9e788ba 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipelineContext.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/HtmlPipelineContext.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/ImageProvider.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/ImageProvider.java
index 15530e0ba2..640e5fc090 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/ImageProvider.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/ImageProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/LinkProvider.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/LinkProvider.java
index dee75217ae..07282305a4 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/LinkProvider.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/LinkProvider.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoImageProviderException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoImageProviderException.java
index 13cb07cb2f..754c53d07f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoImageProviderException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoImageProviderException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoStackException.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoStackException.java
index d52f92aca0..cb754ecad2 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoStackException.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/NoStackException.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/StackKeeper.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/StackKeeper.java
index 3d5c33ae1c..37949b0898 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/StackKeeper.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/StackKeeper.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/UrlLinkResolver.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/UrlLinkResolver.java
index c29a501310..3e2af324bd 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/UrlLinkResolver.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/UrlLinkResolver.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/package-info.java
index 4e5085add8..f291cd721d 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/html/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/package-info.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/package-info.java
index 3e0b72ad32..16a0511d5f 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/package-info.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/pipeline/package-info.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/main/java/com/itextpdf/tool/xml/util/ParentTreeUtil.java b/xmlworker/src/main/java/com/itextpdf/tool/xml/util/ParentTreeUtil.java
index 0e4583b067..f9a5c3ba9b 100644
--- a/xmlworker/src/main/java/com/itextpdf/tool/xml/util/ParentTreeUtil.java
+++ b/xmlworker/src/main/java/com/itextpdf/tool/xml/util/ParentTreeUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/BugRunnerTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/BugRunnerTest.java
index da488b84e5..d410cd8df2 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/BugRunnerTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/BugRunnerTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/TagTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/TagTest.java
index 18e3c8f87b..0cdb95f53b 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/TagTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/TagTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/TagUtilsTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/TagUtilsTest.java
index d22d1f7220..e0dd1d0f8a 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/TagUtilsTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/TagUtilsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFileProcessorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFileProcessorTest.java
index d23d9e336f..c76bf3ebbd 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFileProcessorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFileProcessorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFilesTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFilesTest.java
index c5e6a74dc8..8b3c7b8e4e 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFilesTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CSSFilesTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssFileWrapperTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssFileWrapperTest.java
index 3a5262773d..689e18ef2f 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssFileWrapperTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssFileWrapperTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssUtilsTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssUtilsTest.java
index bac90bbd7a..eb917cc52c 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssUtilsTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/CssUtilsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project. Copyright (c) 1998-2015 iText Group NV Authors: Balder Van Camp, Emiel
* Ackermann, et al.
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/DefaultCSSResolverTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/DefaultCSSResolverTest.java
index 22d278bb4d..8724574644 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/DefaultCSSResolverTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/DefaultCSSResolverTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/FontSizeTranslatorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/FontSizeTranslatorTest.java
index be583798b3..457ee6d184 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/FontSizeTranslatorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/FontSizeTranslatorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/WidthCalculatorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/WidthCalculatorTest.java
index 1234f08888..2406731368 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/WidthCalculatorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/WidthCalculatorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplierTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplierTest.java
index 99638491c1..c060069c38 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplierTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ChunkCssApplierTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/FontFamilyTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/FontFamilyTest.java
index 472a174d41..b03e286787 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/FontFamilyTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/FontFamilyTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplierTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplierTest.java
index cbfeb89714..63ebabf27e 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplierTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/HtmlCellCssApplierTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplierTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplierTest.java
index 3632746e2f..587f040830 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplierTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/css/apply/ParagraphCssApplierTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/AlignAndMarginTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/AlignAndMarginTest.java
index 76dfbc1576..0435efb313 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/AlignAndMarginTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/AlignAndMarginTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/FontAndColorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/FontAndColorTest.java
index b11ab91847..6ba654ea78 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/FontAndColorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/FontAndColorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HTMLWorkerFactoryTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HTMLWorkerFactoryTest.java
index c17e295409..eeb39513d2 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HTMLWorkerFactoryTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HTMLWorkerFactoryTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
@@ -43,12 +42,6 @@
* address: sales@itextpdf.com
*/
package com.itextpdf.tool.xml.html;
-import java.io.BufferedInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-
-import org.junit.Test;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
@@ -68,15 +61,21 @@
import com.itextpdf.tool.xml.pipeline.html.HtmlPipeline;
import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
+import java.io.BufferedInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.junit.Test;
+
/**
* @author Balder
- *
*/
public class HTMLWorkerFactoryTest {
public static final String OUT = "./target/test-classes/com/itextpdf/tool/xml/html/";
-// public static final String SNIPPETS = "/snippets/";
- public static final String SNIPPETS = "/bugs/";
+ // public static final String SNIPPETS = "/snippets/";
+ public static final String SNIPPETS = "/bugs/";
// private static final String TEST = "doc_";
// private static final String TEST = "xfa-support_";
@@ -115,40 +114,40 @@ public class HTMLWorkerFactoryTest {
// private static final String TEST ="test-table-d_";
// private static final String TEST = "pagebreaks_";
- // Bug snippets
+ // Bug snippets
- private static final String TEST = "colored_lists_";
+ private static final String TEST = "colored_lists_";
static {
- //FontFactory.registerDirectories();
- Document.compress = false;
- LoggerFactory.getInstance().setLogger(new SysoLogger(3));
+ //FontFactory.registerDirectories();
+ LoggerFactory.getInstance().setLogger(new SysoLogger(3));
}
+
private final CssUtils utils = CssUtils.getInstance();
- @Test
- public void parseXfaOnlyXML() throws IOException {
- BufferedInputStream bis = new BufferedInputStream(HTMLWorkerFactoryTest.class.getResourceAsStream(String.format("%s%ssnippet.html", SNIPPETS, TEST)));
- final Document doc = new Document(PageSize.A4);
- float margin = utils.parseRelativeValue("10%", PageSize.A4.getWidth());
- doc.setMargins(margin, margin, margin, margin);
- PdfWriter writer = null;
- try {
+ @Test
+ public void parseXfaOnlyXML() throws IOException {
+ BufferedInputStream bis = new BufferedInputStream(HTMLWorkerFactoryTest.class.getResourceAsStream(String.format("%s%ssnippet.html", SNIPPETS, TEST)));
+ final Document doc = new Document(PageSize.A4);
+ float margin = utils.parseRelativeValue("10%", PageSize.A4.getWidth());
+ doc.setMargins(margin, margin, margin, margin);
+ PdfWriter writer = null;
+ try {
writer = PdfWriter.getInstance(doc, new FileOutputStream(
String.format("%s%sTest.pdf", OUT, TEST)));
- } catch (DocumentException e) {
- e.printStackTrace();
- }
- CssFilesImpl cssFiles = new CssFilesImpl();
- cssFiles.add(XMLWorkerHelper.getInstance().getDefaultCSS());
- StyleAttrCSSResolver cssResolver = new StyleAttrCSSResolver(cssFiles);
- HtmlPipelineContext hpc = new HtmlPipelineContext(null);
- hpc.setAcceptUnknown(true).autoBookmark(true).setTagFactory(Tags.getHtmlTagProcessorFactory());
- Pipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(hpc, new PdfWriterPipeline(doc, writer)));
- XMLWorker worker = new XMLWorker(pipeline, true);
- doc.open();
- XMLParser p = new XMLParser(true, worker);
- p.parse(new InputStreamReader(bis));
+ } catch (DocumentException e) {
+ e.printStackTrace();
+ }
+ CssFilesImpl cssFiles = new CssFilesImpl();
+ cssFiles.add(XMLWorkerHelper.getInstance().getDefaultCSS());
+ StyleAttrCSSResolver cssResolver = new StyleAttrCSSResolver(cssFiles);
+ HtmlPipelineContext hpc = new HtmlPipelineContext(null);
+ hpc.setAcceptUnknown(true).autoBookmark(true).setTagFactory(Tags.getHtmlTagProcessorFactory());
+ Pipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(hpc, new PdfWriterPipeline(doc, writer)));
+ XMLWorker worker = new XMLWorker(pipeline, true);
+ doc.open();
+ XMLParser p = new XMLParser(true, worker);
+ p.parse(new InputStreamReader(bis));
doc.close();
- }
+ }
}
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HorAndVertScalingTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HorAndVertScalingTest.java
index 212c96c9fe..abfa515ff7 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HorAndVertScalingTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HorAndVertScalingTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HtmlUtilsTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HtmlUtilsTest.java
index c511b250f3..c8acdfc0a4 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HtmlUtilsTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/HtmlUtilsTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LineHeightLetterSpacingTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LineHeightLetterSpacingTest.java
index 957e59340b..d7f541e3d8 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LineHeightLetterSpacingTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LineHeightLetterSpacingTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LoadCssThroughLinkStyleTagTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LoadCssThroughLinkStyleTagTest.java
index 13be998092..4780d90821 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LoadCssThroughLinkStyleTagTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/LoadCssThroughLinkStyleTagTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/PandBTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/PandBTest.java
index 9a149078fa..9b6522baeb 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/PandBTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/PandBTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SamplesTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SamplesTest.java
index 960a15dc17..002cef1c49 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SamplesTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SamplesTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SnippetUtil.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SnippetUtil.java
index 7cd8f0b529..4e24950f45 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SnippetUtil.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SnippetUtil.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SpecialCharInPDFTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SpecialCharInPDFTest.java
index da770a32f5..2676199436 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SpecialCharInPDFTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SpecialCharInPDFTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
@@ -43,13 +42,6 @@
* address: sales@itextpdf.com
*/
package com.itextpdf.tool.xml.html;
-import java.io.BufferedInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.Charset;
-
-import org.junit.Test;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
@@ -69,47 +61,54 @@
import com.itextpdf.tool.xml.pipeline.html.HtmlPipeline;
import com.itextpdf.tool.xml.pipeline.html.HtmlPipelineContext;
+import java.io.BufferedInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+
+import org.junit.Test;
+
/**
* @author Balder
- *
*/
public class SpecialCharInPDFTest {
public static final String OUT = "./target/test-classes/com/itextpdf/tool/xml/html/";
- public static final String SNIPPETS = "/snippets/";
+ public static final String SNIPPETS = "/snippets/";
- private static final String TEST = "index_";
+ private static final String TEST = "index_";
static {
- //FontFactory.registerDirectories();
- Document.compress = false;
- LoggerFactory.getInstance().setLogger(new SysoLogger(3));
+ //FontFactory.registerDirectories();
+ LoggerFactory.getInstance().setLogger(new SysoLogger(3));
}
+
private final CssUtils utils = CssUtils.getInstance();
- @Test
- public void parseXfaOnlyXML() throws IOException {
- BufferedInputStream bis = new BufferedInputStream(SpecialCharInPDFTest.class.getResourceAsStream(String.format("%s%ssnippet.html", SNIPPETS, TEST)));
- final Document doc = new Document(PageSize.A4);
- float margin = utils.parseRelativeValue("10%", PageSize.A4.getWidth());
- doc.setMargins(margin, margin, margin, margin);
- PdfWriter writer = null;
- try {
+ @Test
+ public void parseXfaOnlyXML() throws IOException {
+ BufferedInputStream bis = new BufferedInputStream(SpecialCharInPDFTest.class.getResourceAsStream(String.format("%s%ssnippet.html", SNIPPETS, TEST)));
+ final Document doc = new Document(PageSize.A4);
+ float margin = utils.parseRelativeValue("10%", PageSize.A4.getWidth());
+ doc.setMargins(margin, margin, margin, margin);
+ PdfWriter writer = null;
+ try {
writer = PdfWriter.getInstance(doc, new FileOutputStream(
String.format("%s%s_charset.pdf", OUT, TEST)));
- } catch (DocumentException e) {
- e.printStackTrace();
- }
- CssFilesImpl cssFiles = new CssFilesImpl();
- cssFiles.add(XMLWorkerHelper.getInstance().getDefaultCSS());
- StyleAttrCSSResolver cssResolver = new StyleAttrCSSResolver(cssFiles);
- HtmlPipelineContext hpc = new HtmlPipelineContext(null);
- hpc.setAcceptUnknown(true).autoBookmark(true).setTagFactory(Tags.getHtmlTagProcessorFactory()).charSet(Charset.forName("ISO-8859-1"));
- Pipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(hpc, new PdfWriterPipeline(doc, writer)));
- XMLWorker worker = new XMLWorker(pipeline, true);
- doc.open();
- XMLParser p = new XMLParser(true, worker);
- p.parse(new InputStreamReader(bis));
+ } catch (DocumentException e) {
+ e.printStackTrace();
+ }
+ CssFilesImpl cssFiles = new CssFilesImpl();
+ cssFiles.add(XMLWorkerHelper.getInstance().getDefaultCSS());
+ StyleAttrCSSResolver cssResolver = new StyleAttrCSSResolver(cssFiles);
+ HtmlPipelineContext hpc = new HtmlPipelineContext(null);
+ hpc.setAcceptUnknown(true).autoBookmark(true).setTagFactory(Tags.getHtmlTagProcessorFactory()).charSet(Charset.forName("ISO-8859-1"));
+ Pipeline pipeline = new CssResolverPipeline(cssResolver, new HtmlPipeline(hpc, new PdfWriterPipeline(doc, writer)));
+ XMLWorker worker = new XMLWorker(pipeline, true);
+ doc.open();
+ XMLParser p = new XMLParser(true, worker);
+ p.parse(new InputStreamReader(bis));
doc.close();
- }
+ }
}
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SubAndSupTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SubAndSupTest.java
index 57a5453c80..d67ee3af3f 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SubAndSupTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/SubAndSupTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/table/TableTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/table/TableTest.java
index 0e461ccac3..b4527291f2 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/table/TableTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/table/TableTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AbstractTagprocessorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AbstractTagprocessorTest.java
index 7365dba14d..7ddb77d473 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AbstractTagprocessorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AbstractTagprocessorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AnchorTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AnchorTest.java
index 13d4d6c31e..e92100a97c 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AnchorTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/AnchorTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/BodyTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/BodyTest.java
index 64078cc26c..8362f66ce7 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/BodyTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/BodyTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DefaultTagProcessorFactoryTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DefaultTagProcessorFactoryTest.java
index 7a387bf5b6..55f9861d45 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DefaultTagProcessorFactoryTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DefaultTagProcessorFactoryTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DivTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DivTest.java
index fadf702cca..08fda4f997 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DivTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/DivTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/HeaderTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/HeaderTest.java
index 1bd0fe8ba2..8c75388276 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/HeaderTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/HeaderTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ImageTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ImageTest.java
index 12be781806..f86da88973 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ImageTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ImageTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ListItemTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ListItemTest.java
index 0bf2617915..b7066af66b 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ListItemTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ListItemTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/NonSanitizedTagTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/NonSanitizedTagTest.java
index 66ad212e98..3d9dcb107a 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/NonSanitizedTagTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/NonSanitizedTagTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ParaGraphTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ParaGraphTest.java
index 2673e439d0..7de86666e2 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ParaGraphTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/ParaGraphTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/SpanTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/SpanTest.java
index c8c8e594e5..88d36cd8bd 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/SpanTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/SpanTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/TPBreakTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/TPBreakTest.java
index 5fed893aa3..c22eeacc4a 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/TPBreakTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/html/tps/TPBreakTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/net/FileRetrieveTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/net/FileRetrieveTest.java
index 821a6cb119..8dc317b728 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/net/FileRetrieveTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/net/FileRetrieveTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/parser/ParserTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/parser/ParserTest.java
index a03413377e..5247bfbe1b 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/parser/ParserTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/parser/ParserTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/CssResolverPipelineTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/CssResolverPipelineTest.java
index 41c519c905..57621dce99 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/CssResolverPipelineTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/CssResolverPipelineTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/ElementHandlerPipelineTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/ElementHandlerPipelineTest.java
index 6cfeedaa60..4448398908 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/ElementHandlerPipelineTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/ElementHandlerPipelineTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/HtmlPipelineContextTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/HtmlPipelineContextTest.java
index d7ee73fd52..3a006736c3 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/HtmlPipelineContextTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/HtmlPipelineContextTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/PipelineTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/PipelineTest.java
index 3200f88f3a..72c577a649 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/PipelineTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/PipelineTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/StackKeeperTest.java b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/StackKeeperTest.java
index 6878e94f2d..911fa1d47e 100644
--- a/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/StackKeeperTest.java
+++ b/xmlworker/src/test/java/com/itextpdf/tool/xml/pipeline/StackKeeperTest.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/examples/XMLWorkerHTMLExample.java b/xmlworker/src/test/java/examples/XMLWorkerHTMLExample.java
index 93dd43fb77..a5007b63f8 100644
--- a/xmlworker/src/test/java/examples/XMLWorkerHTMLExample.java
+++ b/xmlworker/src/test/java/examples/XMLWorkerHTMLExample.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/java/examples/XMLWorkerHelperExample.java b/xmlworker/src/test/java/examples/XMLWorkerHelperExample.java
index 21c75c568e..811c25c9db 100644
--- a/xmlworker/src/test/java/examples/XMLWorkerHelperExample.java
+++ b/xmlworker/src/test/java/examples/XMLWorkerHelperExample.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2015 iText Group NV
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDiv01/complexDiv01.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDiv01/complexDiv01.pdf
index 676b82556c..64e33aae51 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDiv01/complexDiv01.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDiv01/complexDiv01.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDivPagination01/complexDivPagination01.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDivPagination01/complexDivPagination01.pdf
index 4710eb8ee2..8e64d799ee 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDivPagination01/complexDivPagination01.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/css/div/complexDivPagination01/complexDivPagination01.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/custom/starComment/starComment.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/custom/starComment/starComment.pdf
index 1ec65231b1..945281d2c6 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/custom/starComment/starComment.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/custom/starComment/starComment.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/big01/big01.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/big01/big01.pdf
index f59e975c14..73b83a4be2 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/big01/big01.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/big01/big01.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/small01/small01.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/small01/small01.pdf
index 0e5fc8717e..efbdbe0ca2 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/small01/small01.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/small01/small01.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table36/table36.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table36/table36.pdf
index 26e5bc5689..b3625784c5 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table36/table36.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table36/table36.pdf differ
diff --git a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table37/table37.pdf b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table37/table37.pdf
index 0e5fda59ea..1a9d4425af 100644
Binary files a/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table37/table37.pdf and b/xmlworker/src/test/resources/com/itextpdf/tool/xml/examples/html/table37/table37.pdf differ
diff --git a/xtra/pom.xml b/xtra/pom.xml
index 85358b0e11..261949b3b5 100644
--- a/xtra/pom.xml
+++ b/xtra/pom.xml
@@ -1,173 +1,172 @@
-
- 4.0.0
+
+ 4.0.0
-
- com.itextpdf
- itext-parent
- 1.0.0
-
-
+
+ com.itextpdf
+ itext-parent
+ 1.0.0
+
+
- itext-xtra
- 5.5.9
- jar
+ itext-xtra
+ 5.5.10
+ jar
- iText Xtra
- iText Xtra, part of iText a Free Java-PDF library
- http://itextpdf.com
+ iText Xtra
+ iText Xtra, part of iText a Free Java-PDF library
+ http://itextpdf.com
-
-
- GNU Affero General Public License v3
- http://www.fsf.org/licensing/licenses/agpl-3.0.html
-
-
+
+
+ GNU Affero General Public License v3
+ http://www.fsf.org/licensing/licenses/agpl-3.0.html
+
+
-
-
+
+
-
-
- iText on StackOverflow
-
+
+
+ iText on StackOverflow
+
http://stackoverflow.com/questions/tagged/itext
-
+
http://stackoverflow.com/questions/tagged/itext
-
- http://news.gmane.org/gmane.comp.java.lib.itext.general
- http://itext-general.2136553.n4.nabble.com/
- http://www.junlu.com/2.html
- http://sourceforge.net/mailarchive/forum.php?forum_id=3273
- http://www.mail-archive.com/itext-questions%40lists.sourceforge.net/
-
-
-
+
+ http://news.gmane.org/gmane.comp.java.lib.itext.general
+ http://itext-general.2136553.n4.nabble.com/
+ http://www.junlu.com/2.html
+ http://sourceforge.net/mailarchive/forum.php?forum_id=3273
+ http://www.mail-archive.com/itext-questions%40lists.sourceforge.net/
+
+
+
-
- scm:git:git@github.com:itext/itextpdf.git
- https://github.com/itext/itextpdf
-
+
+ scm:git:git@github.com:itext/itextpdf.git
+ https://github.com/itext/itextpdf
+
-
- jira
- https://jira.itextsupport.com/
-
+
+ jira
+ https://jira.itextsupport.com/
+
-
- jenkins-ci
- http://ci.itextsupport.com/
-
+
+ jenkins-ci
+ http://ci.itextsupport.com/
+
-
- 1.5
- UTF-8
- -Xmx128m
- java
- jacoco
- ${project.basedir}/target/jacoco.exec
-
+
+ 1.7
+ UTF-8
+ -Xmx128m
+ java
+ jacoco
+ ${project.basedir}/target/jacoco.exec
+
-
-
- com.itextpdf
- itextpdf
- ${project.version}
- true
-
-
- org.apache.commons
- commons-imaging
- 1.0-SNAPSHOT
-
-
- commons-io
- commons-io
- 2.4
-
-
- junit
- junit
- 4.8.2
- jar
- test
-
-
+
+
+ com.itextpdf
+ itextpdf
+ ${project.version}
+ true
+
+
+ org.apache.commons
+ commons-imaging
+ 1.0-SNAPSHOT
+
+
+ commons-io
+ commons-io
+ 2.4
+
+
+ junit
+ junit
+ 4.8.2
+ jar
+ test
+
+
-
-
- apache.snapshots
- Apache Development Snapshot Repository
- https://repository.apache.org/content/repositories/snapshots/
-
- false
-
-
- true
-
-
-
+
+
+ apache.snapshots
+ Apache Development Snapshot Repository
+ https://repository.apache.org/content/repositories/snapshots/
+
+ false
+
+
+ true
+
+
+
-
-
+
+
-
- maven-compiler-plugin
- 3.3
-
-
- ${java.version}
-
-
+
+ maven-compiler-plugin
+ 3.3
+
+
+ ${java.version}
+
+
-
- external.atlassian.jgitflow
- jgitflow-maven-plugin
- 1.0-m5.1
-
-
- master
- develop
- feature/
- release/
- hotfix/
-
-
- true
- true
- true
-
-
+
+ external.atlassian.jgitflow
+ jgitflow-maven-plugin
+ 1.0-m5.1
+
+
+ master
+ develop
+ feature/
+ release/
+ hotfix/
+
+
+ true
+ true
+ true
+
+
-
-
+
+
-
+
-
- all
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.8
-
-
- attach-sources
-
- jar
-
-
-
-
-
- http://developers.itextpdf.com/reference/classes
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ 1.5
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.17
+
+ random
+
+
+
+
+
+ src/main/resources
+
+ **/*.txt
+
+
+
+
+
-
- doclint-java8-disable
-
- [1.8,)
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- -Xdoclint:none
-
-
-
-
-
+
+ doclint-java8-disable
+
+ [1.8,)
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.3
+
+ -Xdoclint:none
+
+
+
+
+
-
-
- coverage-per-test
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- 2.17
-
-
-
- listener
- org.sonar.java.jacoco.JUnitListener
-
-
-
-
-
-
-
-
- org.codehaus.sonar-plugins.java
- sonar-jacoco-listeners
- 1.2
- test
-
-
-
-
+
+
+ coverage-per-test
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ 2.17
+
+
+
+ listener
+ org.sonar.java.jacoco.JUnitListener
+
+
+
+
+
+
+
+
+ org.codehaus.sonar-plugins.java
+ sonar-jacoco-listeners
+ 1.2
+ test
+
+
+
+
-
+
-
+
\ No newline at end of file
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCFieldFlattener.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCFieldFlattener.java
index 1479f96c57..157137e2cf 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCFieldFlattener.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCFieldFlattener.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCParser.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCParser.java
index 84f8e1971f..c65f4ebf59 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCParser.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/MCParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItem.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItem.java
index c478dd795c..15d6f870c7 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItem.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItem.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItems.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItems.java
index 13edac0645..42c687d793 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItems.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureItems.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -189,17 +188,33 @@ public int processMCID(PdfNumber structParents, PdfIndirectReference ref)
throws DocumentException {
if (ref == null)
throw new DocumentException(MessageLocalization.getComposedMessage("can.t.read.document.structure"));
- PdfObject object = parentTree.get(structParents.intValue());
- PdfArray array = (PdfArray)PdfReader.getPdfObject(object);
- for (int i = 0; i < array.size(); i++) {
- if (array.getAsIndirectObject(i) == null) {
- array.set(i, ref);
- return i;
- }
- }
+ PdfObject object = parentTree.get(structParents.intValue());
+ PdfArray array = (PdfArray)PdfReader.getPdfObject(object);
+ int i = getNextMCID(structParents);
+ if (i < array.size()) {
+ array.set(i, ref);
+ return i;
+ }
array.add(ref);
return array.size() - 1;
}
+
+ /**
+ * Finds the next available MCID, which is either the lowest empty ID in
+ * the existing range, or the first available higher number.
+ * @param structParents the StructParents entry in the page dictionary
+ * @return the first available MCID
+ */
+ public int getNextMCID(PdfNumber structParents) {
+ PdfObject object = parentTree.get(structParents.intValue());
+ PdfArray array = (PdfArray)PdfReader.getPdfObject(object);
+ for (int i = 0; i < array.size(); i++) {
+ if (array.getAsIndirectObject(i) == null) {
+ return i;
+ }
+ }
+ return array.size();
+ }
/**
* Writes the altered parent tree to a PdfWriter and updates the StructTreeRoot entry.
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureMCID.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureMCID.java
index 78fa74a064..6ec2f39e11 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureMCID.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureMCID.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureObject.java b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureObject.java
index d4a38e4304..cd85492107 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureObject.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/mc/StructureObject.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGParser.java b/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGParser.java
index 13f5c01b0f..8699fb216b 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGParser.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGParser.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -44,15 +43,6 @@
*/
package com.itextpdf.text.pdf.ocg;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
import com.itextpdf.text.ExceptionConverter;
import com.itextpdf.text.pdf.PRStream;
import com.itextpdf.text.pdf.PRTokeniser;
@@ -65,6 +55,15 @@
import com.itextpdf.text.pdf.PdfString;
import com.itextpdf.text.pdf.RandomAccessFileOrArray;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
/**
* A helper class for OCGRemover.
*/
@@ -74,10 +73,15 @@ public class OCGParser {
public static final String DEFAULTOPERATOR = "DefaultOperator";
/** A map with all supported operators operators (PDF syntax). */
- protected static Map operators = null;
+ protected static final Map operators;
+
+ static {
+ operators = new HashMap();
+ populateOperators();
+ }
/** The OutputStream of this worker object. */
- protected static ByteArrayOutputStream baos;
+ protected ByteArrayOutputStream baos;
/** Keeps track of BMC/EMC balance. */
protected int mc_balance = 0;
@@ -96,7 +100,6 @@ public class OCGParser {
* @param ocgs a set of String values with the names of the OCGs that need to be removed.
*/
public OCGParser(Set ocgs) {
- populateOperators();
this.ocgs = ocgs;
}
@@ -137,7 +140,34 @@ public void parse(PRStream stream, PdfDictionary resources) throws IOException {
ArrayList operands = new ArrayList();
while (ps.parse(operands).size() > 0){
PdfLiteral operator = (PdfLiteral)operands.get(operands.size() - 1);
- processOperator(this, operator, operands);
+ processOperator(this, operator, operands);
+ if ("BI".equals(operator.toString())) {
+ int found = 0;
+ int ch;
+ boolean immediateAfterBI = true;
+ while ((ch = tokeniser.read()) != -1) {
+ if (!immediateAfterBI || !PRTokeniser.isWhitespace(ch)) {
+ baos.write(ch);
+ }
+ immediateAfterBI = false;
+ if (found == 0 && PRTokeniser.isWhitespace(ch)){
+ found++;
+ } else if (found == 1 && ch == 'E'){
+ found++;
+ } else if (found == 1 && PRTokeniser.isWhitespace(ch)){
+ // this clause is needed if we have a white space character that is part of the image data
+ // followed by a whitespace character that precedes the EI operator. In this case, we need
+ // to flush the first whitespace, then treat the current whitespace as the first potential
+ // character for the end of stream check. Note that we don't increment 'found' here.
+ } else if (found == 2 && ch == 'I'){
+ found++;
+ } else if (found == 3 && PRTokeniser.isWhitespace(ch)){
+ break;
+ } else {
+ found = 0;
+ }
+ }
+ }
}
}
catch (Exception e) {
@@ -165,10 +195,7 @@ protected static void processOperator(OCGParser parser, PdfLiteral operator, Lis
/**
* Populates the operators variable.
*/
- protected void populateOperators() {
- if (operators != null)
- return;
- operators = new HashMap();
+ protected static void populateOperators() {
operators.put(DEFAULTOPERATOR, new CopyContentOperator());
PathConstructionOrPaintingOperator opConstructionPainting = new PathConstructionOrPaintingOperator();
operators.put("m", opConstructionPainting);
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGRemover.java b/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGRemover.java
index 9dfdb66257..9c0700c267 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGRemover.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/ocg/OCGRemover.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentChunk.java b/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentChunk.java
index 6956487b1b..780b73dc7c 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentChunk.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentChunk.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
diff --git a/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentOperator.java b/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentOperator.java
index 4c10913aaa..1efc66a90b 100644
--- a/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentOperator.java
+++ b/xtra/src/main/java/com/itextpdf/text/pdf/pdfcleanup/PdfCleanUpContentOperator.java
@@ -1,5 +1,4 @@
/*
- * $Id$
*
* This file is part of the iText (R) project.
* Copyright (c) 1998-2016 iText Group NV
@@ -344,13 +343,13 @@ private void writeTextChunks(Map structuredTJoperands, List