summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/PdfHandler
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /www/wiki/extensions/PdfHandler
first commit
Diffstat (limited to 'www/wiki/extensions/PdfHandler')
-rw-r--r--www/wiki/extensions/PdfHandler/CODE_OF_CONDUCT.md1
-rw-r--r--www/wiki/extensions/PdfHandler/COPYING339
-rw-r--r--www/wiki/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php129
-rw-r--r--www/wiki/extensions/PdfHandler/Gruntfile.js28
-rw-r--r--www/wiki/extensions/PdfHandler/PdfHandler.image.php318
-rw-r--r--www/wiki/extensions/PdfHandler/PdfHandler.php14
-rw-r--r--www/wiki/extensions/PdfHandler/PdfHandler_body.php440
-rw-r--r--www/wiki/extensions/PdfHandler/Rakefile17
-rw-r--r--www/wiki/extensions/PdfHandler/composer.json23
-rw-r--r--www/wiki/extensions/PdfHandler/extension.json49
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/af.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ais.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/aln.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/an.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ar.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/arz.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/as.json13
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ast.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/azb.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ba.json17
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/bcl.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/be-tarask.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/bg.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/bn.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/br.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/bs.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ca.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ce.json13
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ckb.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/cs.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/cy.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/da.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/de-ch.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/de-formal.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/de.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/diq.json16
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/dsb.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/el.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/en-gb.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/en.json16
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/eo.json13
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/es.json22
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/et.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/eu.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/fa.json23
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/fi.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/fr.json23
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/frc.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/frp.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/gl.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/grc.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/gsw.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/gu.json13
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/he.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/hi.json12
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/hr.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/hsb.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/hu.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ia.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/id.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ilo.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/is.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/it.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ja.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/jv.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ka.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/kk-cyrl.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/km.json13
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/kn.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ko.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ksh.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ku-latn.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ky.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/la.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/lb.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/li.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/lki.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/lrc.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/lt.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/mk.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ml.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/mr.json12
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ms.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/mt.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/mwl.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/nap.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/nb.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ne.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/nl.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/nn.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/oc.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/olo.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/or.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pdc.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pl.json22
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pms.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pnb.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ps.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pt-br.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/pt.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/qqq.json21
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ro.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/roa-tara.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ru.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/rue.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sa.json12
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sah.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/si.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sk.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/skr-arab.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sl.json18
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sq.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sr-ec.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sr-el.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/stq.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/sv.json16
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ta.json14
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/tay.json11
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/te.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/tk.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/tl.json10
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/tr.json16
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ug-arab.json9
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/uk.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/ur.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/vec.json15
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/vi.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/yo.json8
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/yue.json19
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/zh-hans.json20
-rw-r--r--www/wiki/extensions/PdfHandler/i18n/zh-hant.json22
-rw-r--r--www/wiki/extensions/PdfHandler/includes/CreatePdfThumbnailsJob.php130
-rw-r--r--www/wiki/extensions/PdfHandler/includes/PdfHandler.php453
-rw-r--r--www/wiki/extensions/PdfHandler/includes/PdfImage.php329
-rw-r--r--www/wiki/extensions/PdfHandler/phpcs.xml16
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/ci.yml8
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/environments.yml39
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/features/pdf.feature11
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb9
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/features/support/env.rb3
-rw-r--r--www/wiki/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb6
-rw-r--r--www/wiki/extensions/PdfHandler/tests/phan/config.php3
142 files changed, 4109 insertions, 0 deletions
diff --git a/www/wiki/extensions/PdfHandler/CODE_OF_CONDUCT.md b/www/wiki/extensions/PdfHandler/CODE_OF_CONDUCT.md
new file mode 100644
index 00000000..d8e5d087
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/CODE_OF_CONDUCT.md
@@ -0,0 +1 @@
+The development of this software is covered by a [Code of Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/www/wiki/extensions/PdfHandler/COPYING b/www/wiki/extensions/PdfHandler/COPYING
new file mode 100644
index 00000000..d159169d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ 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
+this service 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.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
+
+ 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
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/www/wiki/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php b/www/wiki/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php
new file mode 100644
index 00000000..1dfacefd
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/CreatePdfThumbnailsJob.class.php
@@ -0,0 +1,129 @@
+<?php
+
+class CreatePdfThumbnailsJob extends Job {
+ /**
+ * Flags for thumbnail jobs
+ */
+ const BIG_THUMB = 1;
+ const SMALL_THUMB = 2;
+
+ /**
+ * Construct a thumbnail job
+ *
+ * @param $title Title Title object
+ * @param $params array Associative array of options:
+ * page: page number for which the thumbnail will be created
+ * jobtype: CreatePDFThumbnailsJob::BIG_THUMB or CreatePDFThumbnailsJob::SMALL_THUMB
+ * BIG_THUMB will create a thumbnail visible for full thumbnail view,
+ * SMALL_THUMB will create a thumbnail shown in "previous page"/"next page" boxes
+ */
+ public function __construct( $title, $params ) {
+ parent::__construct( 'createPdfThumbnailsJob', $title, $params );
+ }
+
+ /**
+ * Run a thumbnail job on a given PDF file.
+ * @return bool true
+ */
+ public function run() {
+ if ( !isset( $this->params['page'] ) ) {
+ wfDebugLog( 'thumbnails', 'A page for thumbnails job of ' . $this->title->getText() .
+ ' was not specified! That should never happen!' );
+ return true; // no page set? that should never happen
+ }
+
+ $file = wfLocalFile( $this->title ); // we just want a local file
+ if ( !$file ) {
+ return true; // Just silently fail, perhaps the file was already deleted, don't bother
+ }
+
+ switch ( $this->params['jobtype'] ) {
+ case self::BIG_THUMB:
+ global $wgImageLimits;
+ // Ignore user preferences, do default thumbnails
+ // everything here shamelessy copied and reused from includes/ImagePage.php
+ $sizeSel = User::getDefaultOption( 'imagesize' );
+
+ // The user offset might still be incorrect, specially if
+ // $wgImageLimits got changed (see bug #8858).
+ if ( !isset( $wgImageLimits[$sizeSel] ) ) {
+ // Default to the first offset in $wgImageLimits
+ $sizeSel = 0;
+ }
+ $max = $wgImageLimits[$sizeSel];
+ $maxWidth = $max[0];
+ $maxHeight = $max[1];
+
+ $width_orig = $file->getWidth( $this->params['page'] );
+ $width = $width_orig;
+ $height_orig = $file->getHeight( $this->params['page'] );
+ $height = $height_orig;
+ if ( $width > $maxWidth || $height > $maxHeight ) {
+ // Calculate the thumbnail size.
+ // First case, the limiting factor is the width, not the height.
+ if ( $width / $height >= $maxWidth / $maxHeight ) {
+ // $height = round( $height * $maxWidth / $width );
+ $width = $maxWidth;
+ // Note that $height <= $maxHeight now.
+ } else {
+ $newwidth = floor( $width * $maxHeight / $height );
+ // $height = round( $height * $newwidth / $width );
+ $width = $newwidth;
+ // Note that $height <= $maxHeight now, but might not be identical
+ // because of rounding.
+ }
+ $transformParams = [ 'page' => $this->params['page'], 'width' => $width ];
+ $file->transform( $transformParams );
+ }
+ break;
+
+ case self::SMALL_THUMB:
+ Linker::makeThumbLinkObj( $this->title, $file, '', '', 'none',
+ [ 'page' => $this->params['page'] ] );
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * @param $upload UploadBase
+ * @param $mime
+ * @param $error
+ * @return bool
+ */
+ public static function insertJobs( $upload, $mime, &$error ) {
+ global $wgPdfCreateThumbnailsInJobQueue;
+ if ( !$wgPdfCreateThumbnailsInJobQueue ) {
+ return true;
+ }
+ if ( !MimeMagic::singleton()->isMatchingExtension( 'pdf', $mime ) ) {
+ return true; // not a PDF, abort
+ }
+
+ $title = $upload->getTitle();
+ $uploadFile = $upload->getLocalFile();
+ if ( is_null( $uploadFile ) ) {
+ wfDebugLog( 'thumbnails', '$uploadFile seems to be null, should never happen...' );
+ return true; // should never happen, but it's better to be secure
+ }
+
+ $metadata = $uploadFile->getMetadata();
+ $unserialized = unserialize( $metadata );
+ $pages = intval( $unserialized['Pages'] );
+
+ $jobs = [];
+ for ( $i = 1; $i <= $pages; $i++ ) {
+ $jobs[] = new CreatePdfThumbnailsJob(
+ $title,
+ [ 'page' => $i, 'jobtype' => self::BIG_THUMB ]
+ );
+ $jobs[] = new CreatePdfThumbnailsJob(
+ $title,
+ [ 'page' => $i, 'jobtype' => self::SMALL_THUMB ]
+ );
+ }
+ JobQueueGroup::singleton()->push( $jobs );
+ return true;
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/Gruntfile.js b/www/wiki/extensions/PdfHandler/Gruntfile.js
new file mode 100644
index 00000000..26ca0c16
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/Gruntfile.js
@@ -0,0 +1,28 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+ grunt.loadNpmTasks( 'grunt-banana-checker' );
+ grunt.loadNpmTasks( 'grunt-jsonlint' );
+ grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+
+ var conf = grunt.file.readJSON( 'extension.json' );
+ grunt.initConfig( {
+ banana: conf.MessagesDirs,
+ jshint: {
+ all: [
+ '**/*.js',
+ '!node_modules/**',
+ '!vendor/**'
+ ]
+ },
+ jsonlint: {
+ all: [
+ '**/*.json',
+ '!node_modules/**',
+ '!vendor/**'
+ ]
+ }
+ } );
+
+ grunt.registerTask( 'test', [ 'jsonlint', 'banana', 'jshint' ] );
+ grunt.registerTask( 'default', 'test' );
+};
diff --git a/www/wiki/extensions/PdfHandler/PdfHandler.image.php b/www/wiki/extensions/PdfHandler/PdfHandler.image.php
new file mode 100644
index 00000000..8cf3fcee
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/PdfHandler.image.php
@@ -0,0 +1,318 @@
+<?php
+/**
+ *
+ * Copyright © 2007 Xarax <jodeldi@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+use UtfNormal\Validator;
+
+/**
+ * inspired by djvuimage from Brion Vibber
+ * modified and written by xarax
+ */
+
+class PdfImage {
+
+ /**
+ * @param $filename
+ */
+ function __construct( $filename ) {
+ $this->mFilename = $filename;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isValid() {
+ return true;
+ }
+
+ /**
+ * @return array|bool
+ */
+ public function getImageSize() {
+ $data = $this->retrieveMetadata();
+ $size = self::getPageSize( $data, 1 );
+
+ if ( $size ) {
+ $width = $size['width'];
+ $height = $size['height'];
+ return [ $width, $height, 'Pdf',
+ "width=\"$width\" height=\"$height\"" ];
+ }
+ return false;
+ }
+
+ /**
+ * @param $data array
+ * @param $page
+ * @return array|bool
+ */
+ public static function getPageSize( $data, $page ) {
+ global $wgPdfHandlerDpi;
+
+ if ( isset( $data['pages'][$page]['Page size'] ) ) {
+ $o = $data['pages'][$page]['Page size'];
+ } elseif ( isset( $data['Page size'] ) ) {
+ $o = $data['Page size'];
+ } else {
+ $o = false;
+ }
+
+ if ( $o ) {
+ if ( isset( $data['pages'][$page]['Page rot'] ) ) {
+ $r = $data['pages'][$page]['Page rot'];
+ } elseif ( isset( $data['Page rot'] ) ) {
+ $r = $data['Page rot'];
+ } else {
+ $r = 0;
+ }
+ $size = explode( 'x', $o, 2 );
+
+ if ( $size ) {
+ $width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
+ $height = explode( ' ', trim( $size[1] ), 2 );
+ $height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
+ if ( ( $r / 90 ) & 1 ) {
+ // Swap width and height for landscape pages
+ $t = $width;
+ $width = $height;
+ $height = $t;
+ }
+
+ return [
+ 'width' => $width,
+ 'height' => $height
+ ];
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @return array|bool|null
+ */
+ public function retrieveMetaData() {
+ global $wgPdfInfo, $wgPdftoText;
+
+ if ( $wgPdfInfo ) {
+ // Note in poppler 0.26 the -meta and page data options worked together,
+ // but as of poppler 0.48 they must be queried separately.
+ // https://bugs.freedesktop.org/show_bug.cgi?id=96801
+ $cmd = wfEscapeShellArg( $wgPdfInfo ) .
+ " -enc UTF-8 " . # Report metadata as UTF-8 text...
+ " -meta " . # Report XMP metadata
+ wfEscapeShellArg( $this->mFilename );
+ $retval = '';
+ $resultMeta = wfShellExec( $cmd, $retval );
+
+ $cmd = wfEscapeShellArg( $wgPdfInfo ) .
+ " -enc UTF-8 " . # Report metadata as UTF-8 text...
+ " -l 9999999 " . # Report page sizes for all pages
+ wfEscapeShellArg( $this->mFilename );
+ $retval = '';
+ $resultPages = wfShellExec( $cmd, $retval );
+
+ $dump = $resultMeta . $resultPages;
+ $data = $this->convertDumpToArray( $dump );
+ } else {
+ $data = null;
+ }
+
+ // Read text layer
+ if ( isset( $wgPdftoText ) ) {
+ $cmd = wfEscapeShellArg( $wgPdftoText ) . ' '. wfEscapeShellArg( $this->mFilename ) . ' - ';
+ wfDebug( __METHOD__.": $cmd\n" );
+ $retval = '';
+ $txt = wfShellExec( $cmd, $retval );
+ if ( $retval == 0 ) {
+ $txt = str_replace( "\r\n", "\n", $txt );
+ $pages = explode( "\f", $txt );
+ foreach ( $pages as $page => $pageText ) {
+ // Get rid of invalid UTF-8, strip control characters
+ // Note we need to do this per page, as \f page feed would be stripped.
+ $pages[$page] = Validator::cleanUp( $pageText );
+ }
+ $data['text'] = $pages;
+ }
+ }
+ return $data;
+ }
+
+ /**
+ * @param $dump string
+ * @return array|bool
+ */
+ protected function convertDumpToArray( $dump ) {
+ if ( strval( $dump ) == '' ) {
+ return false;
+ }
+
+ $lines = explode( "\n", $dump );
+ $data = [];
+
+ // Metadata is always the last item, and spans multiple lines.
+ $inMetadata = false;
+
+ // Basically this loop will go through each line, splitting key value
+ // pairs on the colon, until it gets to a "Metadata:\n" at which point
+ // it will gather all remaining lines into the xmp key.
+ foreach ( $lines as $line ) {
+ if ( $inMetadata ) {
+ // Handle XMP differently due to diffence in line break
+ $data['xmp'] .= "\n$line";
+ continue;
+ }
+ $bits = explode( ':', $line, 2 );
+ if ( count( $bits ) > 1 ) {
+ $key = trim( $bits[0] );
+ if ( $key === 'Metadata' ) {
+ $inMetadata = true;
+ $data['xmp'] = '';
+ continue;
+ }
+ $value = trim( $bits[1] );
+ $matches = [];
+ // "Page xx rot" will be in poppler 0.20's pdfinfo output
+ // See https://bugs.freedesktop.org/show_bug.cgi?id=41867
+ if ( preg_match( '/^Page +(\d+) (size|rot)$/', $key, $matches ) ) {
+ $data['pages'][$matches[1]][$matches[2] == 'size' ? 'Page size' : 'Page rot'] = $value;
+ } else {
+ $data[$key] = $value;
+ }
+ }
+ }
+ $data = $this->postProcessDump( $data );
+ return $data;
+ }
+
+ /**
+ * Postprocess the metadata (convert xmp into useful form, etc)
+ *
+ * This is used to generate the metadata table at the bottom
+ * of the image description page.
+ *
+ * @param $data Array metadata
+ * @return Array post-processed metadata
+ */
+ protected function postProcessDump( array $data ) {
+ $meta = new BitmapMetadataHandler();
+ $items = [];
+ foreach ( $data as $key => $val ) {
+ switch ( $key ) {
+ case 'Title':
+ $items['ObjectName'] = $val;
+ break;
+ case 'Subject':
+ $items['ImageDescription'] = $val;
+ break;
+ case 'Keywords':
+ // Sometimes we have empty keywords. This seems
+ // to be a product of how pdfinfo deals with keywords
+ // with spaces in them. Filter such empty keywords
+ $keyList = array_filter( explode( ' ', $val ) );
+ if ( count( $keyList ) > 0 ) {
+ $items['Keywords'] = $keyList;
+ }
+ break;
+ case 'Author':
+ $items['Artist'] = $val;
+ break;
+ case 'Creator':
+ // Program used to create file.
+ // Different from program used to convert to pdf.
+ $items['Software'] = $val;
+ break;
+ case 'Producer':
+ // Conversion program
+ $items['pdf-Producer'] = $val;
+ break;
+ case 'ModTime':
+ $timestamp = wfTimestamp( TS_EXIF, $val );
+ if ( $timestamp ) {
+ // 'if' is just paranoia
+ $items['DateTime'] = $timestamp;
+ }
+ break;
+ case 'CreationTime':
+ $timestamp = wfTimestamp( TS_EXIF, $val );
+ if ( $timestamp ) {
+ $items['DateTimeDigitized'] = $timestamp;
+ }
+ break;
+ // These last two (version and encryption) I was unsure
+ // if we should include in the table, since they aren't
+ // all that useful to editors. I leaned on the side
+ // of including. However not including if file
+ // is optimized/linearized since that is really useless
+ // to an editor.
+ case 'PDF version':
+ $items['pdf-Version'] = $val;
+ break;
+ case 'Encrypted':
+ // @todo: The value isn't i18n-ised. The appropriate
+ // place to do that is in FormatMetadata.php
+ // should add a hook a there.
+ // For reference, if encrypted this fields value looks like:
+ // "yes (print:yes copy:no change:no addNotes:no)"
+ $items['pdf-Encrypted'] = $val;
+ break;
+ // Note 'pages' and 'Pages' are different keys (!)
+ case 'pages':
+ // A pdf document can have multiple sized pages in it.
+ // (However 95% of the time, all pages are the same size)
+ // get a list of all the unique page sizes in document.
+ // This doesn't do anything with rotation as of yet,
+ // mostly because I am unsure of what a good way to
+ // present that information to the user would be.
+ $pageSizes = [];
+ foreach ( $val as $page ) {
+ if ( isset( $page['Page size'] ) ) {
+ $pageSizes[$page['Page size']] = true;
+ }
+ }
+
+ $pageSizeArray = array_keys( $pageSizes );
+ if ( count( $pageSizeArray ) > 0 ) {
+ $items['pdf-PageSize'] = $pageSizeArray;
+ }
+ break;
+ }
+
+ }
+ $meta->addMetadata( $items, 'native' );
+
+ if ( isset( $data['xmp'] ) && function_exists( 'xml_parser_create_ns' ) ) {
+ // func exists verifies that the xml extension required for XMPReader
+ // is present (Almost always is present)
+ // @todo: This only handles generic xmp properties. Would be improved
+ // by handling pdf xmp properties (pdf and pdfx) via XMPInfo hook.
+ $xmp = new XMPReader( LoggerFactory::getInstance( 'XMP' ) );
+ $xmp->parse( $data['xmp'] );
+ $xmpRes = $xmp->getResults();
+ foreach ( $xmpRes as $type => $xmpSection ) {
+ $meta->addMetadata( $xmpSection, $type );
+ }
+ }
+ unset( $data['xmp'] );
+ $data['mergedMetadata'] = $meta->getMetadataArray();
+ return $data;
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/PdfHandler.php b/www/wiki/extensions/PdfHandler/PdfHandler.php
new file mode 100644
index 00000000..07ecd104
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/PdfHandler.php
@@ -0,0 +1,14 @@
+<?php
+
+if ( function_exists( 'wfLoadExtension' ) ) {
+ wfLoadExtension( 'PdfHandler' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['PdfHandler'] = __DIR__ . '/i18n';
+ /* wfWarn(
+ 'Deprecated PHP entry point used for PdfHandler extension. Please use wfLoadExtension instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for more details.'
+ ); */
+ return true;
+} else {
+ die( 'This version of the PdfHandler extension requires MediaWiki 1.25+' );
+}
diff --git a/www/wiki/extensions/PdfHandler/PdfHandler_body.php b/www/wiki/extensions/PdfHandler/PdfHandler_body.php
new file mode 100644
index 00000000..0ff5aad4
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/PdfHandler_body.php
@@ -0,0 +1,440 @@
+<?php
+/**
+ * Copyright © 2007 Martin Seidel (Xarax) <jodeldi@gmx.de>
+ *
+ * Inspired by djvuhandler from Tim Starling
+ * Modified and written by Xarax
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+class PdfHandler extends ImageHandler {
+ public static $messages = [
+ 'main' => 'pdf-file-page-warning',
+ 'header' => 'pdf-file-page-warning-header',
+ 'info' => 'pdf-file-page-warning-info',
+ 'footer' => 'pdf-file-page-warning-footer',
+ ];
+
+ /**
+ * @return bool
+ */
+ function isEnabled() {
+ global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfInfo;
+
+ if ( !isset( $wgPdfProcessor ) || !isset( $wgPdfPostProcessor ) || !isset( $wgPdfInfo ) ) {
+ wfDebug( "PdfHandler is disabled, please set the following\n" );
+ wfDebug( "variables in LocalSettings.php:\n" );
+ wfDebug( "\$wgPdfProcessor, \$wgPdfPostProcessor, \$wgPdfInfo\n" );
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @param $file
+ * @return bool
+ */
+ function mustRender( $file ) {
+ return true;
+ }
+
+ /**
+ * @param $file
+ * @return bool
+ */
+ function isMultiPage( $file ) {
+ return true;
+ }
+
+ /**
+ * @param $name
+ * @param $value
+ * @return bool
+ */
+ function validateParam( $name, $value ) {
+ if ( $name === 'page' && trim( $value ) !== (string)intval( $value ) ) {
+ // Extra junk on the end of page, probably actually a caption
+ // e.g. [[File:Foo.pdf|thumb|Page 3 of the document shows foo]]
+ return false;
+ }
+ if ( in_array( $name, [ 'width', 'height', 'page' ] ) ) {
+ return ( $value > 0 );
+ }
+ return false;
+ }
+
+ /**
+ * @param $params array
+ * @return bool|string
+ */
+ function makeParamString( $params ) {
+ $page = isset( $params['page'] ) ? $params['page'] : 1;
+ if ( !isset( $params['width'] ) ) {
+ return false;
+ }
+ return "page{$page}-{$params['width']}px";
+ }
+
+ /**
+ * @param $str string
+ * @return array|bool
+ */
+ function parseParamString( $str ) {
+ $m = false;
+
+ if ( preg_match( '/^page(\d+)-(\d+)px$/', $str, $m ) ) {
+ return [ 'width' => $m[2], 'page' => $m[1] ];
+ }
+
+ return false;
+ }
+
+ /**
+ * @param $params array
+ * @return array
+ */
+ function getScriptParams( $params ) {
+ return [
+ 'width' => $params['width'],
+ 'page' => $params['page'],
+ ];
+ }
+
+ /**
+ * @return array
+ */
+ function getParamMap() {
+ return [
+ 'img_width' => 'width',
+ 'img_page' => 'page',
+ ];
+ }
+
+ /**
+ * @param $width
+ * @param $height
+ * @param $msg
+ * @return MediaTransformError
+ */
+ protected function doThumbError( $width, $height, $msg ) {
+ return new MediaTransformError( 'thumbnail_error',
+ $width, $height, wfMessage( $msg )->inContentLanguage()->text() );
+ }
+
+ /**
+ * @param $image File
+ * @param $dstPath string
+ * @param $dstUrl string
+ * @param $params array
+ * @param $flags int
+ * @return MediaTransformError|MediaTransformOutput|ThumbnailImage|TransformParameterError
+ */
+ function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
+ global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfHandlerDpi, $wgPdfHandlerJpegQuality;
+
+ if ( !$this->normaliseParams( $image, $params ) ) {
+ return new TransformParameterError( $params );
+ }
+
+ $width = (int)$params['width'];
+ $height = (int)$params['height'];
+ $page = (int)$params['page'];
+
+ if ( $page > $this->pageCount( $image ) ) {
+ return $this->doThumbError( $width, $height, 'pdf_page_error' );
+ }
+
+ if ( $flags & self::TRANSFORM_LATER ) {
+ return new ThumbnailImage( $image, $dstUrl, $width, $height, false, $page );
+ }
+
+ if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) {
+ return $this->doThumbError( $width, $height, 'thumbnail_dest_directory' );
+ }
+
+ // Thumbnail extraction is very inefficient for large files.
+ // Provide a way to pool count limit the number of downloaders.
+ if ( $image->getSize() >= 1e7 ) { // 10MB
+ $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $image->getName() ),
+ [
+ 'doWork' => function () use ( $image ) {
+ return $image->getLocalRefPath();
+ }
+ ]
+ );
+ $srcPath = $work->execute();
+ } else {
+ $srcPath = $image->getLocalRefPath();
+ }
+
+ if ( $srcPath === false ) { // could not download original
+ return $this->doThumbError( $width, $height, 'filemissing' );
+ }
+
+ $cmd = '(' . wfEscapeShellArg(
+ $wgPdfProcessor,
+ "-sDEVICE=jpeg",
+ "-sOutputFile=-",
+ "-dFirstPage={$page}",
+ "-dLastPage={$page}",
+ "-dSAFER",
+ "-r{$wgPdfHandlerDpi}",
+ "-dBATCH",
+ "-dNOPAUSE",
+ "-q",
+ $srcPath
+ );
+ $cmd .= " | " . wfEscapeShellArg(
+ $wgPdfPostProcessor,
+ "-depth",
+ "8",
+ "-quality",
+ $wgPdfHandlerJpegQuality,
+ "-resize",
+ $width,
+ "-",
+ $dstPath
+ );
+ $cmd .= ")";
+
+ wfDebug( __METHOD__ . ": $cmd\n" );
+ $retval = '';
+ $err = wfShellExecWithStderr( $cmd, $retval );
+
+ $removed = $this->removeBadFile( $dstPath, $retval );
+
+ if ( $retval != 0 || $removed ) {
+ wfDebugLog( 'thumbnail',
+ sprintf( 'thumbnail failed on %s: error %d "%s" from "%s"',
+ wfHostname(), $retval, trim( $err ), $cmd ) );
+ return new MediaTransformError( 'thumbnail_error', $width, $height, $err );
+ } else {
+ return new ThumbnailImage( $image, $dstUrl, $width, $height, $dstPath, $page );
+ }
+ }
+
+ /**
+ * @param $image File
+ * @param $path string
+ * @return PdfImage
+ */
+ function getPdfImage( $image, $path ) {
+ if ( !$image ) {
+ $pdfimg = new PdfImage( $path );
+ } elseif ( !isset( $image->pdfImage ) ) {
+ $pdfimg = $image->pdfImage = new PdfImage( $path );
+ } else {
+ $pdfimg = $image->pdfImage;
+ }
+
+ return $pdfimg;
+ }
+
+ /**
+ * @param $image File
+ * @return bool
+ */
+ function getMetaArray( $image ) {
+ if ( isset( $image->pdfMetaArray ) ) {
+ return $image->pdfMetaArray;
+ }
+
+ $metadata = $image->getMetadata();
+
+ if ( !$this->isMetadataValid( $image, $metadata ) ) {
+ wfDebug( "Pdf metadata is invalid or missing, should have been fixed in upgradeRow\n" );
+ return false;
+ }
+
+ $work = new PoolCounterWorkViaCallback(
+ 'PdfHandler-unserialize-metadata',
+ $image->getName(),
+ [
+ 'doWork' => function () use ( $image, $metadata ) {
+ wfSuppressWarnings();
+ $image->pdfMetaArray = unserialize( $metadata );
+ wfRestoreWarnings();
+ },
+ ]
+ );
+ $work->execute();
+
+ return $image->pdfMetaArray;
+ }
+
+ /**
+ * @param $image File
+ * @param $path string
+ * @return array|bool
+ */
+ function getImageSize( $image, $path ) {
+ return $this->getPdfImage( $image, $path )->getImageSize();
+ }
+
+ /**
+ * @param $ext
+ * @param $mime string
+ * @param $params null
+ * @return array
+ */
+ function getThumbType( $ext, $mime, $params = null ) {
+ global $wgPdfOutputExtension;
+ static $mime;
+
+ if ( !isset( $mime ) ) {
+ $magic = MimeMagic::singleton();
+ $mime = $magic->guessTypesForExtension( $wgPdfOutputExtension );
+ }
+ return [ $wgPdfOutputExtension, $mime ];
+ }
+
+ /**
+ * @param $image File
+ * @param $path string
+ * @return string
+ */
+ function getMetadata( $image, $path ) {
+ return serialize( $this->getPdfImage( $image, $path )->retrieveMetaData() );
+ }
+
+ /**
+ * @param $image File
+ * @param $metadata string
+ * @return bool
+ */
+ function isMetadataValid( $image, $metadata ) {
+ if ( !$metadata || $metadata === serialize( [] ) ) {
+ return self::METADATA_BAD;
+ } elseif ( strpos( $metadata, 'mergedMetadata' ) === false ) {
+ return self::METADATA_COMPATIBLE;
+ }
+ return self::METADATA_GOOD;
+ }
+
+ /**
+ * @param $image File
+ * @param bool|IContextSource $context Context to use (optional)
+ * @return bool|array
+ */
+ function formatMetadata( $image, $context = false ) {
+ $meta = $image->getMetadata();
+
+ if ( !$meta ) {
+ return false;
+ }
+ wfSuppressWarnings();
+ $meta = unserialize( $meta );
+ wfRestoreWarnings();
+
+ if ( !isset( $meta['mergedMetadata'] )
+ || !is_array( $meta['mergedMetadata'] )
+ || count( $meta['mergedMetadata'] ) < 1
+ ) {
+ return false;
+ }
+
+ // Inherited from MediaHandler.
+ return $this->formatMetadataHelper( $meta['mergedMetadata'], $context );
+ }
+
+ /**
+ * @param File $image
+ * @return bool|int
+ */
+ function pageCount( File $image ) {
+ $info = $this->getDimensionInfo( $image );
+
+ return $info ? $info['pageCount'] : false;
+ }
+
+ /**
+ * @param $image File
+ * @param $page int
+ * @return array|bool
+ */
+ function getPageDimensions( File $image, $page ) {
+ $index = $page; // MW starts pages at 1, as they are stored here
+
+ $info = $this->getDimensionInfo( $image );
+ if ( $info && isset( $info['dimensionsByPage'][$index] ) ) {
+ return $info['dimensionsByPage'][$index];
+ }
+
+ return false;
+ }
+
+ protected function getDimensionInfo( File $file ) {
+ $cache = ObjectCache::getMainWANInstance();
+ return $cache->getWithSetCallback(
+ $cache->makeKey( 'file-pdf', 'dimensions', $file->getSha1() ),
+ $cache::TTL_INDEFINITE,
+ function () use ( $file ) {
+ $data = $this->getMetaArray( $file );
+ if ( !$data || !isset( $data['Pages'] ) ) {
+ return false;
+ }
+ unset( $data['text'] ); // lower peak RAM
+
+ $dimsByPage = [];
+ $count = intval( $data['Pages'] );
+ for ( $i = 1; $i <= $count; $i++ ) {
+ $dimsByPage[$i] = PdfImage::getPageSize( $data, $i );
+ }
+
+ return [ 'pageCount' => $count, 'dimensionsByPage' => $dimsByPage ];
+ },
+ [ 'pcTTL' => $cache::TTL_INDEFINITE ]
+ );
+ }
+
+ /**
+ * @param $image File
+ * @param $page int
+ * @return bool
+ */
+ function getPageText( File $image, $page ) {
+ $data = $this->getMetaArray( $image );
+ if ( !$data || !isset( $data['text'] ) || !isset( $data['text'][$page - 1] ) ) {
+ return false;
+ }
+ return $data['text'][$page - 1];
+ }
+
+ /**
+ * Adds a warning about PDFs being potentially dangerous to the file
+ * page. Multiple messages with this base will be used.
+ * @param File $file
+ * @return array
+ */
+ function getWarningConfig( $file ) {
+ return [
+ 'messages' => self::$messages,
+ 'link' => '//www.mediawiki.org/wiki/Special:MyLanguage/Help:Security/PDF_files',
+ 'module' => 'pdfhandler.messages',
+ ];
+ }
+
+ /**
+ * Register a module with the warning messages in it.
+ * @param &$resourceLoader ResourceLoader
+ */
+ static function registerWarningModule( &$resourceLoader ) {
+ $resourceLoader->register( 'pdfhandler.messages', [
+ 'messages' => array_values( self::$messages ),
+ ] );
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/Rakefile b/www/wiki/extensions/PdfHandler/Rakefile
new file mode 100644
index 00000000..87831ab3
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/Rakefile
@@ -0,0 +1,17 @@
+require 'bundler/setup'
+
+require 'rubocop/rake_task'
+RuboCop::RakeTask.new(:rubocop) do |task|
+ # If you use mediawiki-vagrant, rubocop will by default use it's .rubocop.yml
+ # The next line makes it explicit that you want .rubocop.yml from the
+ # directory where `bundle exec rake` is executed:
+ task.options = ['-c', '.rubocop.yml']
+end
+
+require 'mediawiki_selenium/rake_task'
+MediawikiSelenium::RakeTask.new
+
+task default: [:test]
+
+desc 'Run all build/tests commands (CI entry point)'
+task test: [:rubocop]
diff --git a/www/wiki/extensions/PdfHandler/composer.json b/www/wiki/extensions/PdfHandler/composer.json
new file mode 100644
index 00000000..b822010c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/composer.json
@@ -0,0 +1,23 @@
+{
+ "require-dev": {
+ "jakub-onderka/php-parallel-lint": "1.0.0",
+ "jakub-onderka/php-console-highlighter": "0.3.2",
+ "mediawiki/mediawiki-codesniffer": "18.0.0",
+ "mediawiki/minus-x": "0.3.1",
+ "mediawiki/mediawiki-phan-config": "0.2.0"
+ },
+ "scripts": {
+ "fix": [
+ "phpcbf",
+ "minus-x fix ."
+ ],
+ "test": [
+ "parallel-lint . --exclude node_modules --exclude vendor",
+ "phpcs -p -s",
+ "minus-x check ."
+ ]
+ },
+ "extra": {
+ "phan-taint-check-plugin": "1.2.0"
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/extension.json b/www/wiki/extensions/PdfHandler/extension.json
new file mode 100644
index 00000000..d046d0e0
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/extension.json
@@ -0,0 +1,49 @@
+{
+ "name": "PDF Handler",
+ "author": [
+ "Martin Seidel",
+ "Mike Połtyn"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Extension:PdfHandler",
+ "descriptionmsg": "pdf-desc",
+ "license-name": "GPL-2.0-or-later",
+ "type": "media",
+ "requires": {
+ "MediaWiki": ">= 1.25.0"
+ },
+ "config": {
+ "PdfOutputExtension": "jpg",
+ "PdfHandlerDpi": 150,
+ "PdfCreateThumbnailsInJobQueue": false,
+ "PdfPostProcessor": "/usr/bin/convert",
+ "PdfHandlerJpegQuality": 95,
+ "PdftoText": "/usr/bin/pdftotext",
+ "PdfProcessor": "/usr/bin/gs",
+ "PdfInfo": "/usr/bin/pdfinfo"
+ },
+ "MessagesDirs": {
+ "PdfHandler": [
+ "i18n"
+ ]
+ },
+ "Hooks": {
+ "UploadVerifyFile": [
+ "CreatePdfThumbnailsJob::insertJobs"
+ ],
+ "ResourceLoaderRegisterModules": [
+ "PdfHandler::registerWarningModule"
+ ]
+ },
+ "JobClasses": {
+ "createPdfThumbnailsJob": "CreatePdfThumbnailsJob"
+ },
+ "MediaHandlers": {
+ "application/pdf": "PdfHandler"
+ },
+ "AutoloadClasses": {
+ "PdfImage": "includes/PdfImage.php",
+ "PdfHandler": "includes/PdfHandler.php",
+ "CreatePdfThumbnailsJob": "includes/CreatePdfThumbnailsJob.php"
+ },
+ "manifest_version": 1
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/af.json b/www/wiki/extensions/PdfHandler/i18n/af.json
new file mode 100644
index 00000000..0bb386a2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/af.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Naudefj",
+ "පසිඳු කාවින්ද"
+ ]
+ },
+ "pdf-desc": "Handler vir die lees van PDF-lêers in beeld af",
+ "pdf_no_metadata": "Kan nie metadata uit PDF kry nie",
+ "pdf_page_error": "Bladsynommer kom nie in dokument voor nie"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ais.json b/www/wiki/extensions/PdfHandler/i18n/ais.json
new file mode 100644
index 00000000..510ec64b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ais.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Tokoabibi",
+ "Bunukwiki",
+ "Benel"
+ ]
+ },
+ "pdf-desc": "pisaungay zunga muse ciwsace PDF tangan a lisimet cengse",
+ "pdf-file-page-warning": "PDF u macibulay a kese, i hatizaay a pulita hakay apuelac liyad dimuday a cesyun. pilucek PDF ciwsace-sakaluk nu misu masaungay kazahkezay a sasakawawen setin.",
+ "pdf-file-page-warning-header": "mizateng tu midimut kasikazan",
+ "pdf-file-page-warning-footer": "tina munday caay patuzu’ tu zumaay tangan, ku PDF kese a habutud munday.",
+ "pdf-file-page-warning-info": "amitineng yadah mahizaay tina munday.",
+ "pdf_no_metadata": "la’cus ilabu nu PDF miala misaheci nu kalunasulitan.",
+ "pdf_page_error": "kasabilih mataelib ku tatungus.",
+ "exif-pdf-producer": "miliyaw cengse",
+ "exif-pdf-version": "PDF kese baziyong",
+ "exif-pdf-encrypted": "pamimatu",
+ "exif-pdf-pagesize": "kasabelih hacica-tabaki"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/aln.json b/www/wiki/extensions/PdfHandler/i18n/aln.json
new file mode 100644
index 00000000..38372cdb
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/aln.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mdupont"
+ ]
+ },
+ "pdf-desc": "Mbajtës për shikimin PDF files në imazh mode",
+ "pdf_no_metadata": "Nuk mund të merrni nga metadata PDF",
+ "pdf_page_error": "numrin e faqes nuk është në varg"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/an.json b/www/wiki/extensions/PdfHandler/i18n/an.json
new file mode 100644
index 00000000..ed321d67
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/an.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Juanpabl"
+ ]
+ },
+ "pdf-desc": "Maneyador ta veyer fichers PDF en modo imachen",
+ "pdf_no_metadata": "No s'obtenioron metadatos d'o PDF",
+ "pdf_page_error": "Numero de pachina difuera de rango"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ar.json b/www/wiki/extensions/PdfHandler/i18n/ar.json
new file mode 100644
index 00000000..ad35297b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ar.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Meno25",
+ "Mido",
+ "أحمد",
+ "محمد أحمد عبد الفتاح"
+ ]
+ },
+ "pdf-desc": "معالج عرض ملفات PDF في طور الصور",
+ "pdf-file-page-warning": "PDF هو صيغة معقدة والتي ربما تعرض بعض معلوماتك الخاصة في بعض الحالات. تأكد من ضبط الPDF viewer الخاص بك بطريقة آمنة.",
+ "pdf-file-page-warning-header": "اعتبارات الخصوصية",
+ "pdf-file-page-warning-footer": "هذه المشكلة ليست خاصة بهذا الملف بالتحديد، لكن مشكلة عامة بصيغة PDF.",
+ "pdf-file-page-warning-info": "اعرف المزيد حول هذا الموضوع.",
+ "pdf_no_metadata": "تعذّر استخراج البيانات الفوقية من ملف PDF",
+ "pdf_page_error": "رقم الصفحة خارج عن النطاق",
+ "exif-pdf-producer": "برمجية التحويل",
+ "exif-pdf-version": "إصدارة صيغة PDF",
+ "exif-pdf-encrypted": "مُعمّى",
+ "exif-pdf-pagesize": "حجم الصفحة"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/arz.json b/www/wiki/extensions/PdfHandler/i18n/arz.json
new file mode 100644
index 00000000..16b3a730
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/arz.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Meno25"
+ ]
+ },
+ "pdf-desc": "متحكم لرؤية ملفات PDF فى نمط صورة",
+ "pdf_no_metadata": "لم يمكن أخذ معلومات ميتا من PDF",
+ "pdf_page_error": "رقم الصفحة ليس فى النطاق"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/as.json b/www/wiki/extensions/PdfHandler/i18n/as.json
new file mode 100644
index 00000000..bcd58e33
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/as.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bishnu Saikia"
+ ]
+ },
+ "pdf-desc": "পিডিএফ ফাইল ছবি হিচাপে ব্যৱহাৰৰ পদ্ধতি",
+ "pdf_no_metadata": "পি.ডি.এফ.ৰ পৰা মেটাডাটা উপলদ্ধ নহয়",
+ "pdf_page_error": "পৃষ্ঠাৰ নম্বৰ সীমাৰ ভিতৰত নাই",
+ "exif-pdf-producer": "ৰূপান্তৰক প্ৰগ্ৰাম",
+ "exif-pdf-version": "পি.ডি.এফ. ৰূপত সংস্কৰণ",
+ "exif-pdf-pagesize": "পৃষ্ঠাৰ আকাৰ"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ast.json b/www/wiki/extensions/PdfHandler/i18n/ast.json
new file mode 100644
index 00000000..c2c275dc
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ast.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Xuacu"
+ ]
+ },
+ "pdf-desc": "Xestor pa ver los ficheros PDF en mou d'imaxe",
+ "pdf-file-page-warning": "PDF ye un formatu complexu que pue esponer dalguna información privada en dellos casos. Asegúrate de configurar el to llector de PDF de manera segura.",
+ "pdf-file-page-warning-header": "Consideraciones d'intimidá",
+ "pdf-file-page-warning-footer": "Esti problema nun ye específicu d'esti ficheru concretu, sinón que ye un problema xeneral col formatu PDF.",
+ "pdf-file-page-warning-info": "Más información sobro esti problema.",
+ "pdf_no_metadata": "Nun se pudieron sacar los metadatos del PDF",
+ "pdf_page_error": "El númberu de la páxina nun ta nel rangu",
+ "exif-pdf-producer": "Programa de conversión",
+ "exif-pdf-version": "Versión del formatu PDF",
+ "exif-pdf-encrypted": "Cifráu",
+ "exif-pdf-pagesize": "Tamañu de la páxina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/azb.json b/www/wiki/extensions/PdfHandler/i18n/azb.json
new file mode 100644
index 00000000..d947868b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/azb.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Amir a57"
+ ]
+ },
+ "exif-pdf-pagesize": "صحیفه اولچوسو"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ba.json b/www/wiki/extensions/PdfHandler/i18n/ba.json
new file mode 100644
index 00000000..bf96dc97
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ba.json
@@ -0,0 +1,17 @@
+{
+ "@metadata": {
+ "authors": [
+ "Assele",
+ "Янмурза Баки"
+ ]
+ },
+ "pdf-desc": "PDF файлдарҙы рәсемдәр рәүешендә ҡарау өсөн эшкәртеүсе ҡорал",
+ "pdf-file-page-warning-header": "Конфиденциальносте күҙ уңында тотоу.",
+ "pdf-file-page-warning-info": "Был функция тураһында тулыраҡ мәғлүмәт",
+ "pdf_no_metadata": "PDF-тан мета-мәғлүмәтте алыу мөмкин түгел",
+ "pdf_page_error": "Бит һаны биттәр һанынан ашҡан",
+ "exif-pdf-producer": "Үҙгәртеү программаһы",
+ "exif-pdf-version": "PDF формтындағы версия.",
+ "exif-pdf-encrypted": "Шифрлау.",
+ "exif-pdf-pagesize": "Бит ҙурлығы"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/bcl.json b/www/wiki/extensions/PdfHandler/i18n/bcl.json
new file mode 100644
index 00000000..3614c142
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/bcl.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Geopoet"
+ ]
+ },
+ "pdf-desc": "An tagapagkapot para sa pagtatanaw kan PDF na mga sagunson na yaon sa moda nin imahe.",
+ "pdf_no_metadata": "Dae makakakua nin datos na meta gikan sa PDF.",
+ "pdf_page_error": "An numero kan pahina dae tabi abot.",
+ "exif-pdf-producer": "Programa nin kombersyon",
+ "exif-pdf-version": "Bersyon kan PDF pormat",
+ "exif-pdf-encrypted": "Enkriptado",
+ "exif-pdf-pagesize": "Sukol kan pahina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/be-tarask.json b/www/wiki/extensions/PdfHandler/i18n/be-tarask.json
new file mode 100644
index 00000000..9d923131
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/be-tarask.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "EugeneZelenko",
+ "Jim-by",
+ "Wizardist",
+ "Renessaince"
+ ]
+ },
+ "pdf-desc": "Апрацоўшчык для прагляду PDF-файлаў у выглядзе выяваў",
+ "pdf-file-page-warning": "PDF — складаны фармат, які ў некаторых выпадках можа раскрыць пэўную інфармацыю пра Вас. Пераканайцеся, што Ваш праглядальнік PDF наладжаны бясьпечным чынам.",
+ "pdf-file-page-warning-header": "Меркаваньні канфідэнцыйнасьці",
+ "pdf-file-page-warning-footer": "Гэтая праблема спэцыфічная не для дадзенага канкрэтнага файлу, а ўвогуле праблема PDF-фармату.",
+ "pdf-file-page-warning-info": "Даведацца болей пра гэтую праблему.",
+ "pdf_no_metadata": "Немагчыма атрымаць мэта-зьвесткі з PDF-файла",
+ "pdf_page_error": "Нумар старонкі паза дыяпазонам",
+ "exif-pdf-producer": "Праграма канвэртацыі",
+ "exif-pdf-version": "Вэрсія фармату PDF",
+ "exif-pdf-encrypted": "Зашыфравана",
+ "exif-pdf-pagesize": "Памер старонкі"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/bg.json b/www/wiki/extensions/PdfHandler/i18n/bg.json
new file mode 100644
index 00000000..eb7322a1
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/bg.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "DCLXVI",
+ "Stanqo",
+ "Turin",
+ "StanProg"
+ ]
+ },
+ "pdf_no_metadata": "Извличането метаданни от PDF е невъзможно.",
+ "pdf_page_error": "Номерът на страница е извън обхвата",
+ "exif-pdf-encrypted": "Криптиране",
+ "exif-pdf-pagesize": "Размер на страницата"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/bn.json b/www/wiki/extensions/PdfHandler/i18n/bn.json
new file mode 100644
index 00000000..69e91e15
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/bn.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Nasir8891",
+ "Wikitanvir",
+ "Aftabuzzaman"
+ ]
+ },
+ "pdf-desc": "পিডিএফ ফাইল ছবি হিসাবে ব্যবহারের পদ্ধতি",
+ "pdf-file-page-warning": "পিডিএফ একটি জটিল বিন্যাস যা কিছু ক্ষেত্রে আপনার ব্যক্তিগত কিছু তথ্য প্রকাশ করতে পারে। নিরাপদ ভাবে আপনার পিডিএফ প্রদর্শক কনফিগার করার বিষয়ে নিশ্চিত হন।",
+ "pdf-file-page-warning-header": "গোপনীয়তার বিবেচ্য",
+ "pdf-file-page-warning-footer": "এই সমস্যাটি শুধু এই ফাইলে নির্দিষ্ট নয়, এটি পিডিএফ বিন্যাসের একটি সাধারণ সমস্যা।",
+ "pdf-file-page-warning-info": "এই বিষয় সম্পর্কে আরও জানুন।",
+ "pdf_no_metadata": "পিডিএফ থেকে মেটাডেটা পাওয়া যায়নি",
+ "pdf_page_error": "পাতার নম্বর সীমার মধ্যে নেই",
+ "exif-pdf-producer": "রূপান্তর প্রোগ্রাম",
+ "exif-pdf-version": "PDF বিন্যাসের সংস্করণ",
+ "exif-pdf-encrypted": "এনক্রিপ্টকৃত",
+ "exif-pdf-pagesize": "পাতার আকার"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/br.json b/www/wiki/extensions/PdfHandler/i18n/br.json
new file mode 100644
index 00000000..5b9f8a82
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/br.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Fohanno",
+ "Fulup"
+ ]
+ },
+ "pdf-desc": "Maveg evit gwelet ar restroù PDF e mod skeudenn",
+ "pdf_no_metadata": "Dibosupl tapout meta-roadennoù digant ar restr PDF",
+ "pdf_page_error": "N'emañ ket niverenn ar bajenn er skeuliad",
+ "exif-pdf-producer": "Program amdreiñ",
+ "exif-pdf-version": "Stumm ar furmad PDF",
+ "exif-pdf-encrypted": "Sifret",
+ "exif-pdf-pagesize": "Ment ar bajenn"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/bs.json b/www/wiki/extensions/PdfHandler/i18n/bs.json
new file mode 100644
index 00000000..08fb976f
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/bs.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "CERminator",
+ "Srdjan m"
+ ]
+ },
+ "pdf-desc": "Uređivač za pregled PDF datoteka u modu za slike",
+ "pdf-file-page-warning": "PDF je složen format koji, u nekim slučajevima, može otkriti vaše lične podatke. Molimo da podesite svoj PDF preglednik tako da koristi siguran način pregledanja.",
+ "pdf-file-page-warning-header": "Napomena o privatnosti",
+ "pdf-file-page-warning-footer": "Ovaj problem nije specifičan za ovu datoteku, već je uopćeno problem s PDF formatom.",
+ "pdf-file-page-warning-info": "Saznajte više o ovom problemu.",
+ "pdf_no_metadata": "Ne mogu se naći metapodaci u PDFu",
+ "pdf_page_error": "Broj stranice nije u rasponu",
+ "exif-pdf-producer": "Softver za pretvaranje",
+ "exif-pdf-version": "Verzija PDF formata",
+ "exif-pdf-encrypted": "Šifrirano",
+ "exif-pdf-pagesize": "Veličina stranice"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ca.json b/www/wiki/extensions/PdfHandler/i18n/ca.json
new file mode 100644
index 00000000..499e9199
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ca.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Aleator",
+ "Ssola",
+ "Fitoschido"
+ ]
+ },
+ "pdf-desc": "Gestor per a visualitzar arxius PDF en mode imatge",
+ "pdf-file-page-warning": "PDF és un format complex que en alguns casos podria exposar la vostra informació privada. Assegureu-vos de configurar el lector de PDF d'una forma segura.",
+ "pdf-file-page-warning-header": "Consideracions de privadesa",
+ "pdf-file-page-warning-footer": "Aquest problema no es específic d'aquest fitxer en particular, sinó un problema general amb el format PDF.",
+ "pdf-file-page-warning-info": "Més informació sobre aquest problema.",
+ "pdf_no_metadata": "No s'han pogut obtenir metadades del PDF",
+ "pdf_page_error": "Número de pàgina fora d'abast",
+ "exif-pdf-producer": "Programa de conversió",
+ "exif-pdf-version": "Versió del format PDF",
+ "exif-pdf-encrypted": "Encriptat",
+ "exif-pdf-pagesize": "Mida de la pàgina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ce.json b/www/wiki/extensions/PdfHandler/i18n/ce.json
new file mode 100644
index 00000000..e1dabe05
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ce.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sasan700",
+ "Умар",
+ "Исмаил Садуев"
+ ]
+ },
+ "pdf-desc": "Хьажа аттон кечйо PDF-файлаш суьрта куьцехь",
+ "pdf_no_metadata": "схьацаэцало чура бух оцу PDF",
+ "pdf_page_error": "Агlон терахь дозан чулацамца дац",
+ "exif-pdf-pagesize": "АгӀонан барам"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ckb.json b/www/wiki/extensions/PdfHandler/i18n/ckb.json
new file mode 100644
index 00000000..756f3c59
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ckb.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Calak"
+ ]
+ },
+ "exif-pdf-pagesize": "قەبارەی پەڕە"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/cs.json b/www/wiki/extensions/PdfHandler/i18n/cs.json
new file mode 100644
index 00000000..eab1ccc0
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/cs.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Matěj Grabovský",
+ "Mormegil"
+ ]
+ },
+ "pdf-desc": "Ovladač pro prohlížení PDF souborů jako obrázků",
+ "pdf-file-page-warning": "PDF je komplexní formát, který může v jistých případech prozradit některé vaše soukromé údaje. Ujistěte se, že máte svůj PDF prohlížeč nakonfigurován bezpečným způsobem.",
+ "pdf-file-page-warning-header": "Poznámka k ochraně soukromí",
+ "pdf-file-page-warning-footer": "Tento problém se netýká přímo tohoto konkrétního souboru, jde o obecný problém formátu PDF.",
+ "pdf-file-page-warning-info": "Více informací k tomuto tématu.",
+ "pdf_no_metadata": "Z PDF se nepodařilo získat metadata",
+ "pdf_page_error": "Číslo stránky mimo rozsah",
+ "exif-pdf-producer": "Konverzní program",
+ "exif-pdf-version": "Verze formátu PDF",
+ "exif-pdf-encrypted": "Šifrovaný",
+ "exif-pdf-pagesize": "Velikost stránky"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/cy.json b/www/wiki/extensions/PdfHandler/i18n/cy.json
new file mode 100644
index 00000000..bdaa8abc
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/cy.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Lloffiwr"
+ ]
+ },
+ "pdf-desc": "Teclyn i weld ffeiliau PDF ar lun delwedd",
+ "pdf_no_metadata": "Yn methu cael y metadata o'r PDF",
+ "pdf_page_error": "Nid yw'r rhif hwn oddi mewn i ystod rhifau'r tudalennau",
+ "exif-pdf-producer": "Rhaglen trosi",
+ "exif-pdf-version": "Fersiwn y fformat PDF",
+ "exif-pdf-encrypted": "Amgriptiwyd",
+ "exif-pdf-pagesize": "Maint y dudalen"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/da.json b/www/wiki/extensions/PdfHandler/i18n/da.json
new file mode 100644
index 00000000..06a9b63e
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/da.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Peter Alberti"
+ ]
+ },
+ "pdf-desc": "Håndtering af PDF-visning i billedtilstand",
+ "pdf_no_metadata": "Kan ikke hente metadata fra PDF",
+ "pdf_page_error": "Sidetallet er større end antallet af sider i dokumentet",
+ "exif-pdf-producer": "Konverteringsprogram",
+ "exif-pdf-version": "Version af PDF-format",
+ "exif-pdf-encrypted": "Krypteret",
+ "exif-pdf-pagesize": "Sidestørrelse"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/de-ch.json b/www/wiki/extensions/PdfHandler/i18n/de-ch.json
new file mode 100644
index 00000000..1e9af268
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/de-ch.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Geitost"
+ ]
+ },
+ "pdf_page_error": "Seitenzahl ausserhalb des Dokumentes."
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/de-formal.json b/www/wiki/extensions/PdfHandler/i18n/de-formal.json
new file mode 100644
index 00000000..b1a99e55
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/de-formal.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kghbln"
+ ]
+ },
+ "pdf-file-page-warning": "PDF ist ein komplexes Dateiformat, das in bestimmten Fällen einige Ihrer privaten Informationen preisgeben kann. Achten Sie darauf, dass Ihr PDF-Betrachter entsprechend sicher konfiguriert ist.",
+ "pdf-file-page-warning-info": "Erfahren Sie mehr über dieses Problem."
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/de.json b/www/wiki/extensions/PdfHandler/i18n/de.json
new file mode 100644
index 00000000..162605d2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/de.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kghbln",
+ "Metalhead64",
+ "Raimond Spekking",
+ "ThePiscin"
+ ]
+ },
+ "pdf-desc": "Ermöglicht die Anzeige von PDF-Dateien im Bildermodus",
+ "pdf-file-page-warning": "PDF ist ein komplexes Dateiformat, das in bestimmten Fällen private Informationen preisgeben kann. Es muss darauf geachtet werden, dass der PDF-Betrachter entsprechend sicher konfiguriert ist.",
+ "pdf-file-page-warning-header": "Hinweise zum Datenschutz",
+ "pdf-file-page-warning-footer": "Dieses Problem ist nicht auf diese Datei beschränkt, sondern ist ein generelles Problem mit dem PDF-Dateiformat.",
+ "pdf-file-page-warning-info": "Erfahre mehr über dieses Problem.",
+ "pdf_no_metadata": "Es können keine Metadaten aus der PDF-Datei abgerufen werden.",
+ "pdf_page_error": "Die Seitenzahl ist höher als die Anzahl der Seiten der PDF-Datei.",
+ "exif-pdf-producer": "Umwandlungsprogramm",
+ "exif-pdf-version": "Version des PDF-Formats",
+ "exif-pdf-encrypted": "Verschlüsselt",
+ "exif-pdf-pagesize": "Papierformat"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/diq.json b/www/wiki/extensions/PdfHandler/i18n/diq.json
new file mode 100644
index 00000000..5978d419
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/diq.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": [
+ "Aspar",
+ "Erdemaslancan",
+ "Mirzali"
+ ]
+ },
+ "pdf-desc": "şuxulnayoxo ke dosyayê PDFyan modê mocnayiş de mocneno",
+ "pdf_no_metadata": "PDF ra metadata nêgeriyeno",
+ "pdf_page_error": "numreyê peli benate de niyo",
+ "exif-pdf-producer": "Programa çerxiney",
+ "exif-pdf-version": "Versiyona babet da PDF",
+ "exif-pdf-encrypted": "Kodıno",
+ "exif-pdf-pagesize": "Ebadê pele"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/dsb.json b/www/wiki/extensions/PdfHandler/i18n/dsb.json
new file mode 100644
index 00000000..ec2ec39d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/dsb.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Michawiki"
+ ]
+ },
+ "pdf-desc": "Źěłowy rěd za woglědowanje PDF-datajow we wobrazowem modusu",
+ "pdf_no_metadata": "Metadaty njedaju se z PDF dobyś",
+ "pdf_page_error": "Bokowe cysło zwenka wobcerka",
+ "exif-pdf-producer": "Konwertěrowański program",
+ "exif-pdf-version": "Wersija PDF-formata",
+ "exif-pdf-encrypted": "Skoděrowany",
+ "exif-pdf-pagesize": "Wjelikosć boka"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/el.json b/www/wiki/extensions/PdfHandler/i18n/el.json
new file mode 100644
index 00000000..f835d016
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/el.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Omnipaedista"
+ ]
+ },
+ "pdf-desc": "Διαχειριστής για την εμφάνιση αρχείων PDF σε μορφή εικόνας",
+ "pdf_no_metadata": "Αδύνατη η απόκτηση μεταδεδομένων από PDF",
+ "pdf_page_error": "Αριθμός σελίδας εκτός ορίου"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/en-gb.json b/www/wiki/extensions/PdfHandler/i18n/en-gb.json
new file mode 100644
index 00000000..e7f8ae14
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/en-gb.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Shirayuki"
+ ]
+ },
+ "exif-pdf-producer": "Conversion programme"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/en.json b/www/wiki/extensions/PdfHandler/i18n/en.json
new file mode 100644
index 00000000..bafc3b05
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/en.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": []
+ },
+ "pdf-desc": "Handler for viewing PDF files in image mode",
+ "pdf-file-page-warning": "PDF is a complex format that may expose some of your private information in some cases. Make sure to configure your PDF viewer in a safe way.",
+ "pdf-file-page-warning-header": "Privacy considerations",
+ "pdf-file-page-warning-footer": "This issue is not specific to this particular file, but a general issue with the PDF format.",
+ "pdf-file-page-warning-info": "Learn more about this issue.",
+ "pdf_no_metadata": "Cannot get metadata from PDF.",
+ "pdf_page_error": "Page number not in range.",
+ "exif-pdf-producer": "Conversion program",
+ "exif-pdf-version": "Version of PDF format",
+ "exif-pdf-encrypted": "Encrypted",
+ "exif-pdf-pagesize": "Page size"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/eo.json b/www/wiki/extensions/PdfHandler/i18n/eo.json
new file mode 100644
index 00000000..0f74f7c4
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/eo.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Yekrats"
+ ]
+ },
+ "pdf-desc": "Ilo por vidi PDF-dosierojn en bilda reĝimo",
+ "pdf_no_metadata": "Ne povas preni metadatenon el PDF",
+ "pdf_page_error": "Paĝnombro ekster valida intervalo",
+ "exif-pdf-version": "Versio de PDF-formato",
+ "exif-pdf-encrypted": "Ĉifrita",
+ "exif-pdf-pagesize": "Grandeco de paĝo"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/es.json b/www/wiki/extensions/PdfHandler/i18n/es.json
new file mode 100644
index 00000000..b3000df6
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/es.json
@@ -0,0 +1,22 @@
+{
+ "@metadata": {
+ "authors": [
+ "Armando-Martin",
+ "Sanbec",
+ "Macofe",
+ "Dgstranz",
+ "Fitoschido"
+ ]
+ },
+ "pdf-desc": "Controlador para ver archivos PDF en modo imagen.",
+ "pdf-file-page-warning": "PDF es un formato complejo que puede exponer alguna información privada en algunos casos. Asegúrate de configurar tu lector de PDF de una manera segura.",
+ "pdf-file-page-warning-header": "Consideraciones de privacidad",
+ "pdf-file-page-warning-footer": "Este problema no es específico de este archivo en particular, sino un problema general con el formato PDF.",
+ "pdf-file-page-warning-info": "Más información sobre este problema.",
+ "pdf_no_metadata": "No se pudieron obtener metadatos del PDF.",
+ "pdf_page_error": "El número de página se ubica fuera del intervalo.",
+ "exif-pdf-producer": "Programa de conversión",
+ "exif-pdf-version": "Versión del formato PDF",
+ "exif-pdf-encrypted": "Cifrado",
+ "exif-pdf-pagesize": "Tamaño de página"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/et.json b/www/wiki/extensions/PdfHandler/i18n/et.json
new file mode 100644
index 00000000..e062e58c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/et.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Avjoska",
+ "Pikne"
+ ]
+ },
+ "pdf-desc": "Töötleja PDF-failide piltidena kuvamiseks",
+ "pdf-file-page-warning": "PDF on keeruline vorming, mis võib mõnel juhul paljastada isiklikku teavet. Veendu, et sinu PDF-failide vaatur on häälestatud turvaliselt.",
+ "pdf-file-page-warning-header": "Andmekaitse kaalutlused",
+ "pdf-file-page-warning-footer": "See küsimus puudutab PDF-vormingut üldiselt, mitte ei käi selle kindla faili kohta.",
+ "pdf-file-page-warning-info": "Lisateave selle küsimuse kohta.",
+ "pdf_no_metadata": "Ei õnnestu PDF-faili meta-andmeid saada",
+ "pdf_page_error": "Leheküljenumber pole vahemikus.",
+ "exif-pdf-producer": "Teisendusprogramm",
+ "exif-pdf-version": "PDF-vormingu versioon",
+ "exif-pdf-encrypted": "Krüptitud",
+ "exif-pdf-pagesize": "Lehe suurus"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/eu.json b/www/wiki/extensions/PdfHandler/i18n/eu.json
new file mode 100644
index 00000000..0cc9a5b0
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/eu.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Subi"
+ ]
+ },
+ "exif-pdf-version": "PDF formatuaren bertsioa",
+ "exif-pdf-encrypted": "Zifratua"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/fa.json b/www/wiki/extensions/PdfHandler/i18n/fa.json
new file mode 100644
index 00000000..359aac88
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/fa.json
@@ -0,0 +1,23 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ebraminio",
+ "Huji",
+ "Reza1615",
+ "Sahim",
+ "Wayiran",
+ "Yoosef Pooranvary"
+ ]
+ },
+ "pdf-desc": "گرداننده‌ای برای مشاهدهٔ پرونده‌های پی‌دی‌اف در حالت تصویر",
+ "pdf-file-page-warning": "پی‌دی‌اف قالبی پیچیده است که ممکن است بعضی اوقات برخی از اطلاعات شما را افشا کند. مراقب باشید که نرم‌افزار پی‌دی‌اف‌خوان خود را به شکل امن پیکربندی کنید.",
+ "pdf-file-page-warning-header": "ملاحظات امنیتی",
+ "pdf-file-page-warning-footer": "این مسأله مختص به این فایل نیست بلکه قالب پی‌دی‌اف کلاً دچار آن است.",
+ "pdf-file-page-warning-info": "دربارهٔ این ویژگی بیشتر مطالعه کنید",
+ "pdf_no_metadata": "نمی‌توان فراداده‌ها را از پی‌دی‌اف گرفت",
+ "pdf_page_error": "شماره صفحه در محدوده نیست",
+ "exif-pdf-producer": "برنامهٔ مبدل",
+ "exif-pdf-version": "نسخهٔ قالب پی‌دی‌اف",
+ "exif-pdf-encrypted": "رمز شده",
+ "exif-pdf-pagesize": "حجم صفحه"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/fi.json b/www/wiki/extensions/PdfHandler/i18n/fi.json
new file mode 100644
index 00000000..7dd03d03
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/fi.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Crt",
+ "Kulmalukko",
+ "Nike",
+ "VezonThunder",
+ "Vililikku"
+ ]
+ },
+ "pdf-desc": "Käsittelijä PDF-tiedostojen katsomiseen kuvatilassa.",
+ "pdf_no_metadata": "Metatietojen hakeminen PDF-tiedostosta epäonnistui",
+ "pdf_page_error": "Sivunumero ei ole alueella.",
+ "exif-pdf-producer": "Muunto-ohjelma",
+ "exif-pdf-version": "PDF-muodon versio",
+ "exif-pdf-encrypted": "Salattu",
+ "exif-pdf-pagesize": "Sivun koko"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/fr.json b/www/wiki/extensions/PdfHandler/i18n/fr.json
new file mode 100644
index 00000000..e16150a2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/fr.json
@@ -0,0 +1,23 @@
+{
+ "@metadata": {
+ "authors": [
+ "Crochet.david",
+ "Gomoko",
+ "Grondin",
+ "Verdy p",
+ "Yodaspirine",
+ "The RedBurn"
+ ]
+ },
+ "pdf-desc": "Gestionnaire permettant de visualiser les fichiers PDF en mode image",
+ "pdf-file-page-warning": "Le PDF est un format complexe qui peut exposer certaines de vos informations privées dans certains cas. Assurez-vous d'avoir configuré votre lecteur de PDF de façon sûre.",
+ "pdf-file-page-warning-header": "Considérations sur la vie privée",
+ "pdf-file-page-warning-footer": "Ce problème n'est pas lié à ce fichier en particulier mais bien au format PDF en général.",
+ "pdf-file-page-warning-info": "En savoir plus sur ce problème.",
+ "pdf_no_metadata": "Impossible d’obtenir les métadonnées du fichier PDF",
+ "pdf_page_error": "Le numéro de page est hors de l’étendue.",
+ "exif-pdf-producer": "Programme de conversion",
+ "exif-pdf-version": "Version du format PDF",
+ "exif-pdf-encrypted": "Crypté",
+ "exif-pdf-pagesize": "Taille de la page"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/frc.json b/www/wiki/extensions/PdfHandler/i18n/frc.json
new file mode 100644
index 00000000..f788c1c9
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/frc.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Stisc-14"
+ ]
+ },
+ "pdf-file-page-warning-footer": "La question est pas spécifique à ce dossier, mais une question générale avec le format PDF."
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/frp.json b/www/wiki/extensions/PdfHandler/i18n/frp.json
new file mode 100644
index 00000000..256d38a1
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/frp.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "ChrisPtDe"
+ ]
+ },
+ "pdf-desc": "Utilitèro por vêre los fichiérs PDF en fôrma émâge.",
+ "pdf_no_metadata": "Pôt pas avêr les mètabalyês du fichiér PDF.",
+ "pdf_page_error": "Lo numerô de pâge est en defôr de la portâ."
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/gl.json b/www/wiki/extensions/PdfHandler/i18n/gl.json
new file mode 100644
index 00000000..58683e18
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/gl.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Alma",
+ "Toliño",
+ "Banjo",
+ "Elisardojm"
+ ]
+ },
+ "pdf-desc": "Manipulador para ver ficheiros PDF no modo de imaxe",
+ "pdf-file-page-warning": "PDF é un formato complexo que pode expoñer algunha información privada nalgúns casos. Asegúrese de configurar o seu lector de PDF dunha maneira segura.",
+ "pdf-file-page-warning-header": "Consideracións de privacidade",
+ "pdf-file-page-warning-footer": "Este problema non é específico deste ficheiro en particular, senón un problema xeral co formato PDF.",
+ "pdf-file-page-warning-info": "Máis informacións sobre este problema.",
+ "pdf_no_metadata": "Non se puideron obter os metadatos do PDF.",
+ "pdf_page_error": "O número da páxina non está no rango.",
+ "exif-pdf-producer": "Programa de conversión",
+ "exif-pdf-version": "Versión en formato PDF",
+ "exif-pdf-encrypted": "Cifrado",
+ "exif-pdf-pagesize": "Tamaño da páxina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/grc.json b/www/wiki/extensions/PdfHandler/i18n/grc.json
new file mode 100644
index 00000000..fd2249ab
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/grc.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Omnipaedista"
+ ]
+ },
+ "pdf_no_metadata": "Ἀδύνατον τὸ ἀποκομίζειν μεταδεδομένα ἐκ PDF",
+ "pdf_page_error": "Ἀριθμὸς δέλτου ἐκτὸς ἐμβελείας"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/gsw.json b/www/wiki/extensions/PdfHandler/i18n/gsw.json
new file mode 100644
index 00000000..7dc1324e
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/gsw.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Als-Holder"
+ ]
+ },
+ "pdf-desc": "Schnittstell fir d Aasicht vu PDF-Dateien im Bilder-Modus",
+ "pdf_no_metadata": "Kei Metadate im PDF vorhande.",
+ "pdf_page_error": "Sytezahl usserhalb vum Dokumänt.",
+ "exif-pdf-producer": "Umwandligsprogramm",
+ "exif-pdf-version": "Version vum PDF-Format",
+ "exif-pdf-encrypted": "Verschlisslet",
+ "exif-pdf-pagesize": "Sytegreßi"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/gu.json b/www/wiki/extensions/PdfHandler/i18n/gu.json
new file mode 100644
index 00000000..697b8487
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/gu.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "KartikMistry",
+ "Sushant savla",
+ "NehalDaveND"
+ ]
+ },
+ "pdf-desc": "PDF ફાઈલોને ચિત્ર સ્વરૂપે જોવાનું સાધન",
+ "pdf_no_metadata": "PDFમાંથી મેટા ડાટા ન મેળવી શકાયો",
+ "pdf_page_error": "પાનાં ક્રમાંક અવધિમાં નથી",
+ "exif-pdf-pagesize": "પાનાંનો આકાર"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/he.json b/www/wiki/extensions/PdfHandler/i18n/he.json
new file mode 100644
index 00000000..d82f6a59
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/he.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Amire80",
+ "Rotemliss",
+ "YaronSh"
+ ]
+ },
+ "pdf-desc": "טיפול בצפייה בקובצי PDF במצב תמונה",
+ "pdf-file-page-warning": "PDF הוא תסדיר קובץ מורכב שיכול לחשוף חלק מהמידע שלך במקרים מסוימים. נא לוודא שהגדרת את מציג ה־PDF באופן בטוח.",
+ "pdf-file-page-warning-header": "שיקולי פרטיות",
+ "pdf-file-page-warning-footer": "הבעיה הזאת אינה ייחודית לקובץ הזה, אלא כללית לתסדיר PDF.",
+ "pdf-file-page-warning-info": "מידע נוסף על הבעיה הזאת.",
+ "pdf_no_metadata": "לא ניתן לאחזר מטא־נתונים מה־PDF.",
+ "pdf_page_error": "מספר הדף אינו בטווח",
+ "exif-pdf-producer": "תוכנת המרה",
+ "exif-pdf-version": "הגרסה של תסדיר PDF",
+ "exif-pdf-encrypted": "מוצפן",
+ "exif-pdf-pagesize": "גודל דף"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/hi.json b/www/wiki/extensions/PdfHandler/i18n/hi.json
new file mode 100644
index 00000000..674f4f71
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/hi.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kaustubh",
+ "NehalDaveND"
+ ]
+ },
+ "pdf-desc": "चित्र मोड में पीडीएफ फ़ाईल देखनेके लिये आवश्यक प्रणाली",
+ "pdf_no_metadata": "पीडीएफ से मेटाडाटा ले नहीं पायें",
+ "pdf_page_error": "पन्ने का क्रमांक सीमामें नहीं हैं",
+ "exif-pdf-pagesize": "पृष्ठ का आकार"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/hr.json b/www/wiki/extensions/PdfHandler/i18n/hr.json
new file mode 100644
index 00000000..a296d8ec
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/hr.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ex13",
+ "MaGa"
+ ]
+ },
+ "pdf-desc": "Program za gledanje PDF datoteka u slikovnom modu",
+ "pdf-file-page-warning": "PDF je složeni format koji može u određenim slučajevima prikazati Vaše privatne informacije.",
+ "pdf-file-page-warning-header": "Napomene u svezi privatnosti",
+ "pdf-file-page-warning-footer": "Ovaj problem nije usko povezan s ovom datotekom već je općeniti problem PDF formata.",
+ "pdf-file-page-warning-info": "Saznajte više o ovom problemu.",
+ "pdf_no_metadata": "Nije moguće dobiti metapodatke iz PDF",
+ "pdf_page_error": "Broj stranice nije u opsegu",
+ "exif-pdf-producer": "Program za pretvorbu",
+ "exif-pdf-version": "Inačica PDF formata",
+ "exif-pdf-encrypted": "Šifrirano",
+ "exif-pdf-pagesize": "Veličina stranice"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/hsb.json b/www/wiki/extensions/PdfHandler/i18n/hsb.json
new file mode 100644
index 00000000..917cf858
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/hsb.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Michawiki"
+ ]
+ },
+ "pdf-desc": "Program za wobhladowanje datajow PDF we wobrazowym modusu",
+ "pdf_no_metadata": "W PDF žane metadaty njejsu.",
+ "pdf_page_error": "Ličba strony zwonka dokumenta.",
+ "exif-pdf-producer": "Konwertowanski program",
+ "exif-pdf-version": "Wersija PDF-formata",
+ "exif-pdf-encrypted": "Zaklučowany",
+ "exif-pdf-pagesize": "Wulkosć strony"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/hu.json b/www/wiki/extensions/PdfHandler/i18n/hu.json
new file mode 100644
index 00000000..66fb2621
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/hu.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Dani",
+ "Dj",
+ "Tacsipacsi"
+ ]
+ },
+ "pdf-desc": "PDF fájlok megjelenítse képként",
+ "pdf-file-page-warning": "A PDF egy komplex formátum, ami bizonyos esetekben veszélyeztetheti a személyes információidat. Figyelj a PDF-megjelenítőd biztonságos beállítására.",
+ "pdf-file-page-warning-header": "Biztonsági problémák",
+ "pdf-file-page-warning-footer": "Ez nem a konkrét fájl problémája, hanem a általánosan a PDF formátumé.",
+ "pdf-file-page-warning-info": "További információk a problémáról",
+ "pdf_no_metadata": "nem sikerült lekérni a PDF metaadatait",
+ "pdf_page_error": "Az oldalszám a tartományon kívül esik",
+ "exif-pdf-producer": "Konvertáló program",
+ "exif-pdf-version": "PDF formátum verziója",
+ "exif-pdf-encrypted": "Titkosított",
+ "exif-pdf-pagesize": "Lapméret"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ia.json b/www/wiki/extensions/PdfHandler/i18n/ia.json
new file mode 100644
index 00000000..66550a72
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ia.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "McDutchie"
+ ]
+ },
+ "pdf-desc": "Gestor pro visualisar files PDF in modo de imagine",
+ "pdf_no_metadata": "Non pote obtener metadatos ab PDF",
+ "pdf_page_error": "Numero de pagina foras del intervallo",
+ "exif-pdf-producer": "Programma de conversion",
+ "exif-pdf-version": "Version del formato PDF",
+ "exif-pdf-encrypted": "Cryptate",
+ "exif-pdf-pagesize": "Dimension del pagina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/id.json b/www/wiki/extensions/PdfHandler/i18n/id.json
new file mode 100644
index 00000000..fddfc094
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/id.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bennylin"
+ ]
+ },
+ "pdf-desc": "Yang menangani tampilan berkas PDF dalam mode gambar",
+ "pdf_no_metadata": "Tidak dapat membaca metadata dari PDF",
+ "pdf_page_error": "Nomor halaman di luar batas"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ilo.json b/www/wiki/extensions/PdfHandler/i18n/ilo.json
new file mode 100644
index 00000000..d61a0a96
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ilo.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Lam-ang"
+ ]
+ },
+ "pdf-desc": "Panagtengngel para iti panagkita kadagiti PDF a papeles iti moda a ladawan",
+ "pdf_no_metadata": "Saan a makaala ti metadata manipud iti PDF.",
+ "pdf_page_error": "Saan a masakupan ti numero ti panid.",
+ "exif-pdf-producer": "Konbersion a programa",
+ "exif-pdf-version": "Bersion iti PDF a pormat",
+ "exif-pdf-encrypted": "Naenkripto",
+ "exif-pdf-pagesize": "Kadakkel ti panid"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/is.json b/www/wiki/extensions/PdfHandler/i18n/is.json
new file mode 100644
index 00000000..92cccd8b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/is.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sveinn í Felli"
+ ]
+ },
+ "exif-pdf-encrypted": "Dulritað",
+ "exif-pdf-pagesize": "Blaðsíðustærð"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/it.json b/www/wiki/extensions/PdfHandler/i18n/it.json
new file mode 100644
index 00000000..40e3733d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/it.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Beta16",
+ "Darth Kule",
+ "F. Cosoleto",
+ "OrbiliusMagister"
+ ]
+ },
+ "pdf-desc": "Gestore per la visualizzazione di file PDF in modalità immagine",
+ "pdf-file-page-warning": "PDF è un formato complesso che in alcuni casi potrebbe rivelare alcune delle tue informazioni private. Assicurati di configurare il visualizzatore di file PDF in modo sicuro.",
+ "pdf-file-page-warning-header": "Considerazioni sulla privacy",
+ "pdf-file-page-warning-footer": "Questo problema non è specifico di questo particolare file, ma è un problema generale del formato PDF.",
+ "pdf-file-page-warning-info": "Ulteriori informazioni su questo problema.",
+ "pdf_no_metadata": "Impossibile ottenere i metadati da PDF",
+ "pdf_page_error": "Numero di pagina non compreso nell'intervallo",
+ "exif-pdf-producer": "Programma di conversione",
+ "exif-pdf-version": "Versione del formato PDF",
+ "exif-pdf-encrypted": "Crittografato",
+ "exif-pdf-pagesize": "Dimensioni pagina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ja.json b/www/wiki/extensions/PdfHandler/i18n/ja.json
new file mode 100644
index 00000000..e2debf48
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ja.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Fryed-peach",
+ "Shirayuki",
+ "Sujiniku"
+ ]
+ },
+ "pdf-desc": "画像モードで PDF ファイルを表示するためのハンドラー",
+ "pdf-file-page-warning": "PDF は複雑なフォーマットであり、場合によってはあなたの個人情報の一部を含んでいることもあります。ご利用の PDF ビューワが安全に設定されていることを確認してください。",
+ "pdf-file-page-warning-header": "プライバシーの考慮事項",
+ "pdf-file-page-warning-footer": "この問題はこの特定のファイルに限るものではなく、PDF フォーマット全般の問題です。",
+ "pdf-file-page-warning-info": "この問題の詳細について、もっと知る。",
+ "pdf_no_metadata": "PDF ファイルからメタデータを取得できません",
+ "pdf_page_error": "ページ番号が正しい範囲内にありません。",
+ "exif-pdf-producer": "変換プログラム",
+ "exif-pdf-version": "PDF 形式のバージョン",
+ "exif-pdf-encrypted": "暗号化済み",
+ "exif-pdf-pagesize": "ページのサイズ"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/jv.json b/www/wiki/extensions/PdfHandler/i18n/jv.json
new file mode 100644
index 00000000..a9a25b2e
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/jv.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Meursault2004",
+ "NoiX180"
+ ]
+ },
+ "pdf-desc": "Sing nadhangi kanggo ndelok berkas PDF mawa modé gambar",
+ "pdf_no_metadata": "Ora bisa olèh metadata saka PDF",
+ "pdf_page_error": "Nomèr kaca nèng njaba wates"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ka.json b/www/wiki/extensions/PdfHandler/i18n/ka.json
new file mode 100644
index 00000000..34a327ad
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ka.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "BRUTE",
+ "David1010"
+ ]
+ },
+ "pdf-desc": "დამამუშავებელი PDF-ფაილების სურათების სახით დასათვალიერებლად",
+ "pdf_no_metadata": "შეუძლებელია PDF-დან მეტამონაცემების მიღება",
+ "pdf_page_error": "გვერდის ნომერი არ არის დიაპაზონში",
+ "exif-pdf-producer": "პროგრამის გარდაქმნა",
+ "exif-pdf-version": "ვერსია PDF ფორმატში",
+ "exif-pdf-encrypted": "დაშიფრული",
+ "exif-pdf-pagesize": "გვერდის ზომა"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/kk-cyrl.json b/www/wiki/extensions/PdfHandler/i18n/kk-cyrl.json
new file mode 100644
index 00000000..78d753b2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/kk-cyrl.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Arystanbek"
+ ]
+ },
+ "pdf-file-page-warning-info": "Қате туралы толығырақ білу.",
+ "exif-pdf-producer": "Түрлендіру програмасы",
+ "exif-pdf-version": "PDF форматының нұсқасы",
+ "exif-pdf-pagesize": "Бет өлшемі"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/km.json b/www/wiki/extensions/PdfHandler/i18n/km.json
new file mode 100644
index 00000000..db8ec3e2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/km.json
@@ -0,0 +1,13 @@
+{
+ "@metadata": {
+ "authors": [
+ "Chhorran",
+ "Lovekhmer",
+ "Thearith",
+ "គីមស៊្រុន"
+ ]
+ },
+ "pdf-desc": "កម្មវិធីសំរាប់បើកមើលឯកសារ PDF ជាទំរង់រូបភាព",
+ "pdf_no_metadata": "មិនអាចទទួលយកទិន្នន័យមេតាពី PDF បានទេ",
+ "pdf_page_error": "គ្មានលេខទំព័រ ក្នុងដែនកំណត់"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/kn.json b/www/wiki/extensions/PdfHandler/i18n/kn.json
new file mode 100644
index 00000000..a0587589
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/kn.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "VASANTH S.N."
+ ]
+ },
+ "exif-pdf-pagesize": "ಪುಟದ ಗಾತ್ರ"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ko.json b/www/wiki/extensions/PdfHandler/i18n/ko.json
new file mode 100644
index 00000000..902bbed0
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ko.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kwj2772",
+ "아라",
+ "Ykhwong",
+ "Garam"
+ ]
+ },
+ "pdf-desc": "PDF 파일을 영상 방식으로 볼 수 있게 하는 조정기",
+ "pdf-file-page-warning-info": "이 문제에 대해 더 알아보세요.",
+ "pdf_no_metadata": "PDF 파일에서 메타데이터를 추출할 수 없습니다.",
+ "pdf_page_error": "쪽수가 범위 안에 있지 않습니다.",
+ "exif-pdf-producer": "변환 프로그램",
+ "exif-pdf-version": "PDF 형식 버전",
+ "exif-pdf-encrypted": "암호화함",
+ "exif-pdf-pagesize": "페이지 크기"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ksh.json b/www/wiki/extensions/PdfHandler/i18n/ksh.json
new file mode 100644
index 00000000..f98ff67a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ksh.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Purodha"
+ ]
+ },
+ "pdf-desc": "Määd et möjjelesch, PDF-Dateie wie Bellder ze beloore.",
+ "pdf-file-page-warning": "<i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"Portable Document Format\">PDF</i> es en öpwändesch Dattei_Fommahd un kann onger Ömschtände jebruch wähde, öm päsöhnlejje Dahte vun Der ußzeschpejonihre.\nDonn Ding Projramm för <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"Portable Document Format\">PDF</i>-Datteije aanzezeije esu enschtälle, dat dat nit passehre kann, wann De nit meins „Driiß jät drop“",
+ "pdf-file-page-warning-header": "Zom Schoz vun päsöhnlesche Dahte",
+ "pdf-file-page-warning-footer": "Dat hädd och nix met heh dä beschtemmpte Dattei ze donn, ed es esu för jehde Dattei em <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"Portable Document Format\">PDF</i>-Fommaht.",
+ "pdf-file-page-warning-info": "Donn mih övver dat Jannze lässe.",
+ "pdf_no_metadata": "Kann de Metta_Dahte nit fun dä <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"Portable Document Format\">PDF</i>-Dattei holle.",
+ "pdf_page_error": "En Sigge-Nommer es ußerhallef",
+ "exif-pdf-producer": "Ömwandelongsprojramm",
+ "exif-pdf-version": "PDF-Fommaat-Väsjohn",
+ "exif-pdf-encrypted": "Verschlößelt",
+ "exif-pdf-pagesize": "Dä Sigg(e) ier Jrüüße <--\nhttps://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Exif-pdf-pagesize/ksh\nhttps://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Exif-pdf-pagesize\n-->"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ku-latn.json b/www/wiki/extensions/PdfHandler/i18n/ku-latn.json
new file mode 100644
index 00000000..6312e962
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ku-latn.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bikarhêner"
+ ]
+ },
+ "pdf-file-page-warning-info": "Di vî mijare de hinêkî din agahî bistine.",
+ "exif-pdf-pagesize": "Mezinahiya rûpelê"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ky.json b/www/wiki/extensions/PdfHandler/i18n/ky.json
new file mode 100644
index 00000000..7df1c9c4
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ky.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Chorobek"
+ ]
+ },
+ "pdf-desc": "PDF файлдарды сүрөт түрүндө көрсөткүч",
+ "pdf_no_metadata": "PDF-тин метамаалыматтарын алуу мүмкүн эмес"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/la.json b/www/wiki/extensions/PdfHandler/i18n/la.json
new file mode 100644
index 00000000..de5e7f12
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/la.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Lesgles"
+ ]
+ },
+ "exif-pdf-pagesize": "Magnitudo paginae"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/lb.json b/www/wiki/extensions/PdfHandler/i18n/lb.json
new file mode 100644
index 00000000..5625b3c4
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/lb.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Robby"
+ ]
+ },
+ "pdf-desc": "\"Programm\" den et erméiglecht PDF-Fichieren als Bild ze kucken",
+ "pdf-file-page-warning": "PDF ass e komplexen Dateformat, deen a bestëmmte Fäll, eenzel privat Informatioune weise kann. Vergewëssert Iech datt Dir Äre PDF-Viewer op eng sécher Manéier astellt.",
+ "pdf-file-page-warning-header": "Informatiounen iwwer den Dateschutz",
+ "pdf-file-page-warning-footer": "Dëse Problem ass net op dëse spezielle Fichier limitéiert, mä et ass e generelle Problem mam PDF-Format.",
+ "pdf-file-page-warning-info": "Méi iwwer dëse Sujet gewuer ginn.",
+ "pdf_no_metadata": "Meta-Informatiounen aus dem PDF Dokument kënnen net gelies ginn",
+ "pdf_page_error": "D'Säitenzuel ass net an dem Beräich.",
+ "exif-pdf-producer": "Ëmwandlungsprogramm",
+ "exif-pdf-version": "Versioun vum PDF-Format",
+ "exif-pdf-encrypted": "Verschlësselt",
+ "exif-pdf-pagesize": "Gréisst vun der Säit"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/li.json b/www/wiki/extensions/PdfHandler/i18n/li.json
new file mode 100644
index 00000000..6cb890bf
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/li.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ooswesthoesbes"
+ ]
+ },
+ "pdf-desc": "Hanjeltj PDF-bestenj aaf en maak 't meugelik die es aafbeildjing te zeen",
+ "pdf_no_metadata": "Kèn gein metadata vanne PDF kriege",
+ "pdf_page_error": "paginanómmer besteit neet"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/lki.json b/www/wiki/extensions/PdfHandler/i18n/lki.json
new file mode 100644
index 00000000..6fa1f9e6
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/lki.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hosseinblue"
+ ]
+ },
+ "pdf-desc": "گرداننده‌ای برای مشاهدهٔ پرونده‌های پی‌دی‌اف در حالت تصویر",
+ "pdf_no_metadata": "نمی‌توان فراداده‌ها را از پی‌دی‌اف گرفت",
+ "pdf_page_error": "شماره صفحه در محدوده نیست",
+ "exif-pdf-producer": "برنامهٔ مبدل",
+ "exif-pdf-version": "نسخهٔ قالب پی‌دی‌اف",
+ "exif-pdf-encrypted": "رمز شده",
+ "exif-pdf-pagesize": "حجم صفحه"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/lrc.json b/www/wiki/extensions/PdfHandler/i18n/lrc.json
new file mode 100644
index 00000000..f8fabc8a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/lrc.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mogoeilor"
+ ]
+ },
+ "exif-pdf-producer": "برنامه چک چنه",
+ "exif-pdf-version": "نسقه قالو پی دی اف",
+ "exif-pdf-pagesize": "انازه بلگه"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/lt.json b/www/wiki/extensions/PdfHandler/i18n/lt.json
new file mode 100644
index 00000000..7a1d5d0b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/lt.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Matasg",
+ "Albertas"
+ ]
+ },
+ "pdf-desc": "Įrankis PDF failų peržiūrai vaizdo režime",
+ "pdf-file-page-warning": "PDF yra sudėtingas formatas, kuris kartais gali atskleisti dalį jūsų privačios informacijos. Įsitikinkite, kad jūsų PDF peržiūros įrankis yra saugiai sukonfigūruotas.",
+ "pdf-file-page-warning-header": "Privatumo sumetimai",
+ "pdf-file-page-warning-footer": "Ši problema nėra specifinė konkrečiam failui, bet apskritai PDF formato problema.",
+ "pdf-file-page-warning-info": "Išmokite daugiau apie šią problemą.",
+ "pdf_no_metadata": "Nepavyko gauti metaduomenų iš PDF",
+ "pdf_page_error": "Puslapis numeris nėra diapazone",
+ "exif-pdf-producer": "Konvertavimo programa",
+ "exif-pdf-version": "PDF formato versija",
+ "exif-pdf-encrypted": "Užšifruotas",
+ "exif-pdf-pagesize": "Puslapio dydis"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/mk.json b/www/wiki/extensions/PdfHandler/i18n/mk.json
new file mode 100644
index 00000000..b858002d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/mk.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Bjankuloski06",
+ "Brest"
+ ]
+ },
+ "pdf-desc": "Ракувач за прегледување PDF податотеки во сликовен режим",
+ "pdf-file-page-warning": "PDF е сложен формат кој, во некои случаи, може да изложи некои од вашите лични податоци. Не заборавајте да ги наместите безбедносните поставки на прегледувачот на PDF.",
+ "pdf-file-page-warning-header": "За личните податоци",
+ "pdf-file-page-warning-footer": "Проблемов не се однесува на оваа дадена податотека, туку претставува начелен проблем со форматот PDF воопшто.",
+ "pdf-file-page-warning-info": "Дознајте повеќе за проблемов.",
+ "pdf_no_metadata": "Не може да се земат метаподатоци од PDF",
+ "pdf_page_error": "Бројот на страница е надвор од опсег",
+ "exif-pdf-producer": "Програм за претворање",
+ "exif-pdf-version": "Верзија на PDF-форматот",
+ "exif-pdf-encrypted": "Шифрирано",
+ "exif-pdf-pagesize": "Големина на страницата"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ml.json b/www/wiki/extensions/PdfHandler/i18n/ml.json
new file mode 100644
index 00000000..71f483bb
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ml.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Praveenp",
+ "Shijualex"
+ ]
+ },
+ "pdf-desc": "പി.ഡി.എഫ്. പ്രമാണങ്ങൾ ചിത്രരൂപത്തിൽ കാണുന്നതിനുള്ള കൈകാര്യോപകരണം",
+ "pdf-file-page-warning": "പി.ഡി.എഫ്. വളരെ സങ്കീർണ്ണമാണ്, ചിലപ്പോളത് താങ്കളുടെ സ്വകാര്യവിവരങ്ങൾ വെളിപ്പെടുത്തിയേക്കാം. താങ്കളുടെ പി.ഡി.എഫ്. ദർശനോപാധി സുരക്ഷിതമായ വിധത്തിൽ ക്രമീകരിക്കാൻ ശ്രദ്ധിക്കുക.",
+ "pdf-file-page-warning-header": "സ്വകാര്യതാ പരിഗണനകൾ",
+ "pdf-file-page-warning-footer": "ഈ പ്രശ്നം ഈ പ്രത്യേക പ്രമാണത്തിന് മാത്രമുള്ളതല്ല, മറിച്ച് പി.ഡി.എഫ്. രീതിയുടെ പൊതു പ്രശ്നമാണ്.",
+ "pdf-file-page-warning-info": "ഈ പ്രശ്നത്തെക്കുറിച്ച് കൂടുതൽ അറിയുക.",
+ "pdf_no_metadata": "PDF-ൽ നിന്നു മെറ്റാഡാറ്റ ലഭിച്ചില്ല",
+ "pdf_page_error": "താളിന്റെ ക്രമസംഖ്യ പരിധിയിലധികമാണ്",
+ "exif-pdf-producer": "പരിവർത്തന പ്രോഗ്രാം",
+ "exif-pdf-version": "പി.ഡി.എഫ്. തരത്തിന്റെ പതിപ്പ്",
+ "exif-pdf-encrypted": "നിഗൂഢീകരിക്കപ്പെട്ടത്",
+ "exif-pdf-pagesize": "താളിന്റെ വലിപ്പം"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/mr.json b/www/wiki/extensions/PdfHandler/i18n/mr.json
new file mode 100644
index 00000000..dfc9894c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/mr.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Kaustubh",
+ "Sankalpdravid",
+ "V.narsikar"
+ ]
+ },
+ "pdf-desc": "चित्र मोडमध्ये पीडीएफ संचिका पाहण्यासाठी आवश्यक प्रणाली",
+ "pdf_no_metadata": "पीडीएफमधून मेटाडाटा घेऊ शकत नाही",
+ "pdf_page_error": "पान क्रमांक आवाक्यात नाही"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ms.json b/www/wiki/extensions/PdfHandler/i18n/ms.json
new file mode 100644
index 00000000..843b160d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ms.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Anakmalaysia"
+ ]
+ },
+ "pdf-desc": "Pengendali untuk melihat fail PDF dalam mod imej",
+ "pdf_no_metadata": "Metadata tidak boleh diperoleh dari PDF",
+ "pdf_page_error": "Nombor halaman tiada dalam julat",
+ "exif-pdf-producer": "Program penukaran",
+ "exif-pdf-version": "Versi format PDF",
+ "exif-pdf-encrypted": "Disulitkan",
+ "exif-pdf-pagesize": "Saiz halaman"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/mt.json b/www/wiki/extensions/PdfHandler/i18n/mt.json
new file mode 100644
index 00000000..1f707e8a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/mt.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Chrisportelli"
+ ]
+ },
+ "pdf_page_error": "In-numru tal-paġna ma jinsabx fl-intervall"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/mwl.json b/www/wiki/extensions/PdfHandler/i18n/mwl.json
new file mode 100644
index 00000000..bd07bc12
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/mwl.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "MokaAkashiyaPT",
+ "Athena in Wonderland"
+ ]
+ },
+ "pdf-desc": "Cuntrolador pa ber fexeiros PDF an modo de eimaige",
+ "pdf-file-page-warning": "L PDF ye un formato cumplexo que puode sponer alguas de las sues anformaçones pribadas, an alguns causos. Certefique-se de cunfigurar l sou lheitor de PDF dua forma sigura.",
+ "pdf-file-page-warning-header": "Cunsidraçones de pribacidade",
+ "pdf-file-page-warning-footer": "Este porblema nó ye specífeco pa este tipo de fexeiro, mas un porblema giral cul formato PDF.",
+ "pdf-file-page-warning-info": "Coincer más subre este porblema.",
+ "pdf_no_metadata": "Nó fui possible outener ls metadados de l PDF.",
+ "pdf_page_error": "Númaro de páigina fuora de l anterbalo.",
+ "exif-pdf-producer": "Porgrama de cumberson",
+ "exif-pdf-version": "Berson de l formato PDF",
+ "exif-pdf-encrypted": "Criptografado",
+ "exif-pdf-pagesize": "Tamanho de la páigina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/nap.json b/www/wiki/extensions/PdfHandler/i18n/nap.json
new file mode 100644
index 00000000..f4d53731
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/nap.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "C.R."
+ ]
+ },
+ "pdf-desc": "Gestore pe vedè 'e file PDF 'n modo immaggine",
+ "pdf-file-page-warning": "'O PDF è nu formato cumplesso ca putesse fà veré cocche nfurmazione privata vuosta int'a cierti situaziune. Faciteve sicuro/a ca cunfigurate 'o visualizzatore PDF int'a nu modo sicuro.",
+ "pdf-file-page-warning-header": "Cunzideraziune d' 'a privacy",
+ "pdf-file-page-warning-footer": "Stu probblema nun è specifico 'e stu file particolare, ma nu probblema generale cu 'o furmato PDF.",
+ "pdf-file-page-warning-info": "Mpara 'e cchiù ncopp'a sti probbleme.",
+ "pdf_no_metadata": "Nun se ponno piglià 'e metadate d' 'o PDF.",
+ "pdf_page_error": "'O nummero d' 'a paggena nun è int'a ll'intervallo.",
+ "exif-pdf-producer": "Prugramma 'e cunverziona",
+ "exif-pdf-version": "Verzione d' 'o furmato 'e PDF",
+ "exif-pdf-encrypted": "Criptate",
+ "exif-pdf-pagesize": "Diminziona d' 'a paggena"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/nb.json b/www/wiki/extensions/PdfHandler/i18n/nb.json
new file mode 100644
index 00000000..c9eacfda
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/nb.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jsoby",
+ "Danmichaelo",
+ "Jon Harald Søby"
+ ]
+ },
+ "pdf-desc": "Håndtering av PDF-visning i bildemodus",
+ "pdf-file-page-warning": "PDF er et komplekst format som kan eksponere din private informasjon. Forsikre deg om at du har sikre innstillinger i PDF-visningsprogrammet ditt.",
+ "pdf-file-page-warning-header": "Personvernhensyn",
+ "pdf-file-page-warning-footer": "Dette er ikke et problem med denne bestemte filen, men et generelt problem med PDF-formatet.",
+ "pdf-file-page-warning-info": "Lær mer.",
+ "pdf_no_metadata": "kan ikke hente metadata fra PDF",
+ "pdf_page_error": "Sidenummer overstiger antall sider i dokumentet",
+ "exif-pdf-producer": "Koverteringsprogram",
+ "exif-pdf-version": "Versjon av PDF-format",
+ "exif-pdf-encrypted": "Kryptert",
+ "exif-pdf-pagesize": "Sidestørrelse"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ne.json b/www/wiki/extensions/PdfHandler/i18n/ne.json
new file mode 100644
index 00000000..20730cff
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ne.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "NehalDaveND"
+ ]
+ },
+ "exif-pdf-pagesize": "पृष्ठको आकार"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/nl.json b/www/wiki/extensions/PdfHandler/i18n/nl.json
new file mode 100644
index 00000000..449e5924
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/nl.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Siebrand",
+ "Wiki13",
+ "Robin0van0der0vliet",
+ "Robin van der Vliet",
+ "Sjoerddebruin"
+ ]
+ },
+ "pdf-desc": "Handelt pdfbestanden af en maakt het mogelijk ze als afbeeldingen te bekijken",
+ "pdf-file-page-warning-header": "Privacyoverwegingen",
+ "pdf-file-page-warning-info": "Meer informatie over dit probleem.",
+ "pdf_no_metadata": "De metadata van het pdfbestand kan niet uitgelezen worden",
+ "pdf_page_error": "Het paginanummer ligt niet binnen het bereik",
+ "exif-pdf-producer": "Conversieprogramma",
+ "exif-pdf-version": "Versie van pdfopmaak",
+ "exif-pdf-encrypted": "Versleuteld",
+ "exif-pdf-pagesize": "Papierformaat"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/nn.json b/www/wiki/extensions/PdfHandler/i18n/nn.json
new file mode 100644
index 00000000..19f20f46
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/nn.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Harald Khan",
+ "Njardarlogar"
+ ]
+ },
+ "pdf-desc": "Handering av PDF-vising i biletmodus",
+ "pdf_no_metadata": "Kan ikkje henta metadata frå PDF",
+ "pdf_page_error": "Sidenummer overstig talet på sider i dokumentet"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/oc.json b/www/wiki/extensions/PdfHandler/i18n/oc.json
new file mode 100644
index 00000000..618cfebe
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/oc.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Cedric31"
+ ]
+ },
+ "pdf-desc": "Utilitari per visualizar los fichièrs PDF en mòde imatge",
+ "pdf_no_metadata": "Pòt pas obténer las metadonadas del fichièr PDF",
+ "pdf_page_error": "Lo numèro de pagina es pas dins la gama.",
+ "exif-pdf-producer": "Programa de conversion",
+ "exif-pdf-version": "Version del format PDF",
+ "exif-pdf-encrypted": "Chifrat",
+ "exif-pdf-pagesize": "Talha de la pagina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/olo.json b/www/wiki/extensions/PdfHandler/i18n/olo.json
new file mode 100644
index 00000000..ada2c6f9
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/olo.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Mashoi7"
+ ]
+ },
+ "exif-pdf-version": "PDF-formuatan versii",
+ "exif-pdf-pagesize": "Sivun kogo"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/or.json b/www/wiki/extensions/PdfHandler/i18n/or.json
new file mode 100644
index 00000000..c11db2ef
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/or.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Jnanaranjan Sahu",
+ "Psubhashish"
+ ]
+ },
+ "pdf-desc": "PDF ଫାଇଲକୁ ଛବି ମୋଡ଼ରେ ଦେଖିବାର ପରିଚାଳକ",
+ "pdf_no_metadata": "ପି.ଡ଼ି.ଏଫ.ରୁ ମେଟାଡାଟା ବାହାର କରିପାରିଲୁଁ ନାହିଁ",
+ "pdf_page_error": "ପୃଷ୍ଠା ସଂଖ୍ୟା ସୀମା ଭିତରେ ନାହିଁ",
+ "exif-pdf-producer": "ରୂପାନ୍ତର କାମ",
+ "exif-pdf-version": "PDF ପ୍ରକାରର ସଂସ୍କରଣ",
+ "exif-pdf-encrypted": "ଏନକ୍ରିପ୍ଟ ହୋଇଥିବା",
+ "exif-pdf-pagesize": "ପୃଷ୍ଠା ଆକାର"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pdc.json b/www/wiki/extensions/PdfHandler/i18n/pdc.json
new file mode 100644
index 00000000..1d7798c2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pdc.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Xqt"
+ ]
+ },
+ "pdf_no_metadata": "Keene Meta-Daade im PDF"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pl.json b/www/wiki/extensions/PdfHandler/i18n/pl.json
new file mode 100644
index 00000000..11d1ce56
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pl.json
@@ -0,0 +1,22 @@
+{
+ "@metadata": {
+ "authors": [
+ "Holek",
+ "Matma Rex",
+ "Sp5uhe",
+ "VerMa",
+ "Woytecr"
+ ]
+ },
+ "pdf-desc": "Konwerter graficznego podglądu plików PDF",
+ "pdf-file-page-warning": "PDF jest złożonym formatem, który może częściowo ujawnić Twoje informacje prywatne. Upewnij się, że skonfigurowałeś swoją przeglądarkę PDF w bezpieczny sposób.",
+ "pdf-file-page-warning-header": "Kwestia prywatności",
+ "pdf-file-page-warning-footer": "Ten problem nie dotyczy tylko tego pliku, lecz formatu PDF w ogóle.",
+ "pdf-file-page-warning-info": "Dowiedz się więcej o tym problemie.",
+ "pdf_no_metadata": "nie można pobrać metadanych z pliku PDF",
+ "pdf_page_error": "Numer strony poza zakresem",
+ "exif-pdf-producer": "Program użyty do konwersji",
+ "exif-pdf-version": "Wersja formatu PDF",
+ "exif-pdf-encrypted": "Zaszyfrowany",
+ "exif-pdf-pagesize": "Wymiary strony"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pms.json b/www/wiki/extensions/PdfHandler/i18n/pms.json
new file mode 100644
index 00000000..4ec09417
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pms.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Borichèt",
+ "Dragonòt"
+ ]
+ },
+ "pdf-desc": "Ël gestor për vëdde ij file PDF an manera image",
+ "pdf_no_metadata": "as peulo nen pijesse ij metadat dal PDF",
+ "pdf_page_error": "Ël nùmer ëd pàgina a l'é pa ant ël range",
+ "exif-pdf-producer": "Programa ëd conversion",
+ "exif-pdf-version": "Version dël formà PDF",
+ "exif-pdf-encrypted": "Criptà",
+ "exif-pdf-pagesize": "Dimension dla pàgina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pnb.json b/www/wiki/extensions/PdfHandler/i18n/pnb.json
new file mode 100644
index 00000000..c239b8b3
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pnb.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Khalid Mahmood"
+ ]
+ },
+ "pdf-desc": "پی ڈی ایف فائلاں امیج موڈ چ ویکھن لئی ہینڈلر",
+ "pdf_no_metadata": "پی ڈی ایف توں میٹاڈیٹا نئیں مل سکیا۔",
+ "pdf_page_error": "صفہ نمبر ولگن چ نئیں۔"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ps.json b/www/wiki/extensions/PdfHandler/i18n/ps.json
new file mode 100644
index 00000000..81c5c74d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ps.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ahmed-Najib-Biabani-Ibrahimkhel"
+ ]
+ },
+ "exif-pdf-pagesize": "مخ کچه"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pt-br.json b/www/wiki/extensions/PdfHandler/i18n/pt-br.json
new file mode 100644
index 00000000..bedcc21d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pt-br.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Eduardo.mps",
+ "555",
+ "Felipe L. Ewald"
+ ]
+ },
+ "pdf-desc": "Ferramenta de visualização de arquivos PDF em modo de imagem.",
+ "pdf-file-page-warning": "O PDF é um formato complexo que pode expor algumas de suas informações privadas em alguns casos. Certifique-se de configurar seu visualizador de PDF de forma segura.",
+ "pdf-file-page-warning-header": "Considerações sobre privacidade",
+ "pdf-file-page-warning-footer": "Este problema não é específico para este arquivo particular, mas um problema geral com o formato PDF.",
+ "pdf-file-page-warning-info": "Saiba mais sobre esta tarefa.",
+ "pdf_no_metadata": "Não foi possível obter os metadados do PDF.",
+ "pdf_page_error": "Número de página fora do intervalo.",
+ "exif-pdf-producer": "Programa de conversão",
+ "exif-pdf-version": "Versão do formato PDF",
+ "exif-pdf-encrypted": "Criptografado",
+ "exif-pdf-pagesize": "Tamanho da página"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/pt.json b/www/wiki/extensions/PdfHandler/i18n/pt.json
new file mode 100644
index 00000000..aa770c83
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/pt.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hamilton Abreu",
+ "Malafaya",
+ "Vitorvicentevalente",
+ "Fabulous"
+ ]
+ },
+ "pdf-desc": "Controlador do visionamento de ficheiros PDF em modo de imagem",
+ "pdf-file-page-warning": "O PDF é um formato complexo que pode expor algumas informações privadas em certos casos. Certifique-se de que configura o seu leitor de PDF de forma a ficar seguro.",
+ "pdf-file-page-warning-header": "Considerações de privacidade",
+ "pdf-file-page-warning-footer": "Este problema não é específico para este tipo de ficheiro, mas uma questão geral com o formato PDF.",
+ "pdf-file-page-warning-info": "Saiba mais sobre este problema.",
+ "pdf_no_metadata": "não foi possível obter os metadados do PDF",
+ "pdf_page_error": "Número de página fora do intervalo",
+ "exif-pdf-producer": "Programa de conversão",
+ "exif-pdf-version": "Versão do formato PDF",
+ "exif-pdf-encrypted": "Criptografado",
+ "exif-pdf-pagesize": "Tamanho da página"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/qqq.json b/www/wiki/extensions/PdfHandler/i18n/qqq.json
new file mode 100644
index 00000000..ca8bb394
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/qqq.json
@@ -0,0 +1,21 @@
+{
+ "@metadata": {
+ "authors": [
+ "Purodha",
+ "Shirayuki",
+ "The Evil IP address",
+ "Umherirrender"
+ ]
+ },
+ "pdf-desc": "{{desc|name=Pdf Handler|url=https://www.mediawiki.org/wiki/Extension:PdfHandler}}",
+ "pdf-file-page-warning": "Warning about potential issues with the PDF format, shown to users on the file page in a popup.",
+ "pdf-file-page-warning-header": "Header for a popup warning on the file page concerning potential privacy issues with the PDF format.",
+ "pdf-file-page-warning-footer": "Footer for a popup warning on the file page concerning potential privacy issues with the PDF format. Qualifies the warning by noting that any PDF may be unsafe, but we don't actually know if this particular PDF file is.",
+ "pdf-file-page-warning-info": "Link text for learning more about potential issues with the PDF format. Links to //www.mediawiki.org/wiki/Special:MyLanguage/Help:Security/PDF_files in the interface.",
+ "pdf_no_metadata": "Error message given when metadata cannot be retrieved from a PDF file",
+ "pdf_page_error": "Error message given when a PDF does not have the requested page number",
+ "exif-pdf-producer": "The label used in the metadata table at the bottom of the file description page for the program used to convert this PDF file into a PDF.\n\nThis is separate from the program used to create the original file (Which is labeled by {{msg-mw|Exif-software}}).",
+ "exif-pdf-version": "Label for the version of the pdf file format in the metadata table at the bottom of an image description page. Usually a number between 1.2 and 1.6",
+ "exif-pdf-encrypted": "Label for field in metadata table at bottom of an image description page to denote if the PDF file is encrypted. The value of the field this references is either \"no\" (most common) or something like \"yes (print:yes copy:no change:no addNotes:no)\"",
+ "exif-pdf-pagesize": "Label for the field in the metadata table at the bottom of an image description page to denote the size of the pages in the pdf. If there is more than one size of page used in this document, each size is listed once.\n{{Identical|Page size}}"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ro.json b/www/wiki/extensions/PdfHandler/i18n/ro.json
new file mode 100644
index 00000000..8d576489
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ro.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Stelistcristi"
+ ]
+ },
+ "pdf-desc": "Operator pentru vizualizarea fișierelor PDF în modul de imagine",
+ "pdf_no_metadata": "Nu se poate obține metadate din PDF",
+ "pdf_page_error": "Numărul paginii nu e în șir",
+ "exif-pdf-pagesize": "Dimensiunea paginii"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/roa-tara.json b/www/wiki/extensions/PdfHandler/i18n/roa-tara.json
new file mode 100644
index 00000000..2a8ddba2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/roa-tara.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Joetaras"
+ ]
+ },
+ "pdf-desc": "Gestore pe vedè le file PDF in mode immaggine",
+ "pdf-file-page-warning": "PDF jè 'nu formate comblesse ca pò fà vedè quacche 'mbormazione privata toje jndr'à certe case. A essere secure de configurà 'u visualizzatore de PDF jndr'à 'nu mode secure.",
+ "pdf-file-page-warning-header": "Conzideraziune d'a provacy",
+ "pdf-file-page-warning-footer": "Stu probbleme non g'è specifiche de stu file particolare, ma 'nu probbleme generale cu 'u formate PDF.",
+ "pdf-file-page-warning-info": "'Mbare de cchiù sus a stu probbleme.",
+ "pdf_no_metadata": "Non ge pozze pigghià le metadata da 'u PDF",
+ "pdf_page_error": "Numere de pàgene fore da l'indervalle",
+ "exif-pdf-producer": "Programme de conversione",
+ "exif-pdf-version": "Versione d'u formate PDF",
+ "exif-pdf-encrypted": "Criptate",
+ "exif-pdf-pagesize": "Dimenzione d'a pàgene"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ru.json b/www/wiki/extensions/PdfHandler/i18n/ru.json
new file mode 100644
index 00000000..68da0fe8
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ru.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "DCamer",
+ "Александр Сигачёв",
+ "Okras"
+ ]
+ },
+ "pdf-desc": "Обработчик для просмотра PDF-файлов в виде изображений",
+ "pdf-file-page-warning": "PDF — комплексный формат, который в некоторых случаях может раскрыть определённую вашу личную информацию. Убедитесь в том, что настройки вашего PDF-просмотрщика безопасны.",
+ "pdf-file-page-warning-header": "Соображения конфиденциальности",
+ "pdf-file-page-warning-footer": "Эта проблема не является специфичной для данного конкретного файла, она относится к PDF-формату в целом.",
+ "pdf-file-page-warning-info": "Подробнее об этой проблеме.",
+ "pdf_no_metadata": "невозможно получить метаданные из PDF",
+ "pdf_page_error": "Номер страницы вне диапазона",
+ "exif-pdf-producer": "Программа преобразования",
+ "exif-pdf-version": "Версия в формате PDF",
+ "exif-pdf-encrypted": "Шифрование",
+ "exif-pdf-pagesize": "Размер страницы"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/rue.json b/www/wiki/extensions/PdfHandler/i18n/rue.json
new file mode 100644
index 00000000..44ad4d71
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/rue.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Gazeb"
+ ]
+ },
+ "pdf-desc": "Овладач про перегляд PDF файлів як образків",
+ "pdf_no_metadata": "Не годен обтримати метадата з PDF",
+ "pdf_page_error": "Чісло сторінкы не є в россягу"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sa.json b/www/wiki/extensions/PdfHandler/i18n/sa.json
new file mode 100644
index 00000000..860a1353
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sa.json
@@ -0,0 +1,12 @@
+{
+ "@metadata": {
+ "authors": [
+ "Shubha",
+ "NehalDaveND"
+ ]
+ },
+ "pdf-desc": "सुलेख(PDF)सञ्चिकाः चित्रदशायां दर्शनाय अपेक्षिता प्रणाली",
+ "pdf_no_metadata": "सुलेखात् मेटादत्तांशः प्राप्तुम् अशक्यः",
+ "pdf_page_error": "पृष्ठक्रमाङ्कः सीमायां न विद्यते",
+ "exif-pdf-pagesize": "पृष्ठाकारः"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sah.json b/www/wiki/extensions/PdfHandler/i18n/sah.json
new file mode 100644
index 00000000..e893873b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sah.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "HalanTul"
+ ]
+ },
+ "pdf-desc": "PDF билэлэри ойуу курдук көрдөрөөччү",
+ "pdf_no_metadata": "PDF-тан мета дааннайдарын ылар кыах суох",
+ "pdf_page_error": "Сирэй нүөмэрэ диапазоҥҥа киирбэт"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/si.json b/www/wiki/extensions/PdfHandler/i18n/si.json
new file mode 100644
index 00000000..aae61f8c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/si.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Budhajeewa",
+ "පසිඳු කාවින්ද"
+ ]
+ },
+ "pdf-desc": "PDF ගොනු රූප මාදිලියෙන් හසුරුවනය",
+ "pdf_no_metadata": "PDF ගොනුවෙන් මෙටාදත්ත ගත නොහැක",
+ "pdf_page_error": "පිටු අංකය නිවැරදි පරාසයේ නොමැත",
+ "exif-pdf-producer": "හැරවුම් වැඩසටහන",
+ "exif-pdf-version": "PDF ආකෘතියේ අනුවාදය",
+ "exif-pdf-encrypted": "ගුප්තකේතීකරණය වූ",
+ "exif-pdf-pagesize": "පිටු ප්‍රමාණය"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sk.json b/www/wiki/extensions/PdfHandler/i18n/sk.json
new file mode 100644
index 00000000..b0e0a59c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sk.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Helix84"
+ ]
+ },
+ "pdf-desc": "Obsluha zobrazovania PDF súborov v režime obrázkov",
+ "pdf_no_metadata": "nie je možné získať metadáta z PDF",
+ "pdf_page_error": "Číslo stránky nie je v intervale"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/skr-arab.json b/www/wiki/extensions/PdfHandler/i18n/skr-arab.json
new file mode 100644
index 00000000..87717a4a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/skr-arab.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Saraiki"
+ ]
+ },
+ "exif-pdf-pagesize": "ورقے دا سائز"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sl.json b/www/wiki/extensions/PdfHandler/i18n/sl.json
new file mode 100644
index 00000000..5b5895d0
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sl.json
@@ -0,0 +1,18 @@
+{
+ "@metadata": {
+ "authors": [
+ "Dbc334"
+ ]
+ },
+ "pdf-desc": "Upravljavec ogledovanja datotek PDF v slikovnem načinu",
+ "pdf-file-page-warning": "PDF je zapletena oblika, ki lahko v nekaterih primerih izpostavi nekatere vaše zasebne informacije. Prosimo, poskrbite, da imate svoj pregledovalnik PDF-jev varno konfiguriran.",
+ "pdf-file-page-warning-header": "Pomisleki o zasebnosti",
+ "pdf-file-page-warning-footer": "Zadeva se ne nanaša specifično na to datoteko, ampak je splošna težava datotečne oblike PDF.",
+ "pdf-file-page-warning-info": "Več informacij o zadevi.",
+ "pdf_no_metadata": "Ne morem pridobiti metapodatkov iz PDF",
+ "pdf_page_error": "Številka strani ni v dosegu",
+ "exif-pdf-producer": "Pretvorbeni program",
+ "exif-pdf-version": "Različica oblike PDF",
+ "exif-pdf-encrypted": "Šifrirano",
+ "exif-pdf-pagesize": "Velikost strani"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sq.json b/www/wiki/extensions/PdfHandler/i18n/sq.json
new file mode 100644
index 00000000..3ade0ae6
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sq.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Olsi"
+ ]
+ },
+ "pdf-desc": "Mbajtës për pamjen e skedave PDF në mënyrën e figurave",
+ "pdf_no_metadata": "Nuk mund të merren metadata nga PDF",
+ "pdf_page_error": "Numri i faqes nuk është në varg"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sr-ec.json b/www/wiki/extensions/PdfHandler/i18n/sr-ec.json
new file mode 100644
index 00000000..6fe25b5e
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sr-ec.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Rancher",
+ "Михајло Анђелковић",
+ "Milicevic01"
+ ]
+ },
+ "pdf-desc": "Програм за прегледање PDF докумената у сликовном режиму",
+ "pdf-file-page-warning": "PDF је сложен формат који може представљати претњу по вашу приватност у неки случајевима. Молимо Вас да ваш PDF прегледач подесите на безбедан начин.",
+ "pdf-file-page-warning-header": "Напомена у вези приватности",
+ "pdf-file-page-warning-footer": "Ово је генерално проблем са PDF форматом и није специфичан за ову конкретну датотеку.",
+ "pdf-file-page-warning-info": "Сазнајте више о овом проблему.",
+ "pdf_no_metadata": "Не могу да преузмем метаподатке из PDF-а",
+ "pdf_page_error": "Број страница ван опсега",
+ "exif-pdf-producer": "Коришћени софтвер за конвертовање",
+ "exif-pdf-version": "Верзија PDF формата",
+ "exif-pdf-encrypted": "Шифровано",
+ "exif-pdf-pagesize": "Величина странице"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sr-el.json b/www/wiki/extensions/PdfHandler/i18n/sr-el.json
new file mode 100644
index 00000000..27958584
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sr-el.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Michaello",
+ "Milicevic01"
+ ]
+ },
+ "pdf-desc": "Handler za pregled PDF fajlova kao slika",
+ "pdf-file-page-warning": "PDF je složen format koji može predstavljati pretnju po vašu privatnost u neki slučajevima. Molimo Vas da vaš PDF pregledač podesite na bezbedan način.",
+ "pdf-file-page-warning-header": "Napomena u vezi privatnosti",
+ "pdf-file-page-warning-footer": "Ovo je generalno problem sa PDF formatom i nije specifičan za ovu konkretnu datoteku.",
+ "pdf-file-page-warning-info": "Saznajte više o ovom problemu.",
+ "pdf_no_metadata": "Ne mogu se dobiti meta-podaci iz PDF-a",
+ "pdf_page_error": "Broj strane izlazi van opsega",
+ "exif-pdf-producer": "Korišćeni softver za konvertovanje",
+ "exif-pdf-version": "Verzija PDF formata",
+ "exif-pdf-encrypted": "Šifrovano",
+ "exif-pdf-pagesize": "Veličina stranice"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/stq.json b/www/wiki/extensions/PdfHandler/i18n/stq.json
new file mode 100644
index 00000000..d4cfc773
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/stq.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Pyt"
+ ]
+ },
+ "pdf-desc": "Snitsteede foar dät Bekiekjen fon PDF-Doatäie in dän Bielde-Modus",
+ "pdf_no_metadata": "Neen Metadoaten in dät PDF deer.",
+ "pdf_page_error": "Siedentaal buute Riege."
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/sv.json b/www/wiki/extensions/PdfHandler/i18n/sv.json
new file mode 100644
index 00000000..fe32c86c
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/sv.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ainali",
+ "M.M.S."
+ ]
+ },
+ "pdf-desc": "Hantering av PDF-visning i bildläge",
+ "pdf-file-page-warning-info": "Läs mer om det här problemet.",
+ "pdf_no_metadata": "Kan inte hämta metadata från PDF",
+ "pdf_page_error": "Sidnummer överstiger antal sidor i dokumentet",
+ "exif-pdf-producer": "Konverteringsprogram",
+ "exif-pdf-version": "Version av PDF-format",
+ "exif-pdf-encrypted": "Krypterad",
+ "exif-pdf-pagesize": "Sidstorlek"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ta.json b/www/wiki/extensions/PdfHandler/i18n/ta.json
new file mode 100644
index 00000000..9bd5a2f8
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ta.json
@@ -0,0 +1,14 @@
+{
+ "@metadata": {
+ "authors": [
+ "Shanmugamp7",
+ "TRYPPN",
+ "மதனாஹரன்"
+ ]
+ },
+ "pdf-desc": "PDF கோப்புகளை உருவ முறையில் பார்க்க கையாளுனர்",
+ "pdf_no_metadata": "PDF இருந்து மேல்தரவை பெற இயலவில்லை",
+ "pdf_page_error": "பக்கத்தின் எண் குறிப்பிட்ட வரையறையில் இல்லை",
+ "exif-pdf-producer": "மாற்றனிரல்",
+ "exif-pdf-pagesize": "பக்க அளவு"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/tay.json b/www/wiki/extensions/PdfHandler/i18n/tay.json
new file mode 100644
index 00000000..f45c3df6
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/tay.json
@@ -0,0 +1,11 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hitaypayan"
+ ]
+ },
+ "pdf-file-page-warning-header": "Pspngun sa zyuwaw na lnqing",
+ "exif-pdf-producer": "Iyugiy cngs’",
+ "exif-pdf-encrypted": "Wal twangan psawsu’",
+ "exif-pdf-pagesize": "Sspngan kinkrahu’ na zzngayan"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/te.json b/www/wiki/extensions/PdfHandler/i18n/te.json
new file mode 100644
index 00000000..e40216f3
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/te.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Veeven"
+ ]
+ },
+ "pdf_page_error": "పుట సంఖ్య అవధిలో లేదు"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/tk.json b/www/wiki/extensions/PdfHandler/i18n/tk.json
new file mode 100644
index 00000000..ada6e7f5
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/tk.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "Hanberke"
+ ]
+ },
+ "pdf-desc": "PDF faýllaryny görkeziş režiminde görkezmek üçin işleýji",
+ "pdf_no_metadata": "PDF-den meta-maglumat alyp bolanok",
+ "pdf_page_error": "Sahypa belgisi diapazonda däl"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/tl.json b/www/wiki/extensions/PdfHandler/i18n/tl.json
new file mode 100644
index 00000000..d736043b
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/tl.json
@@ -0,0 +1,10 @@
+{
+ "@metadata": {
+ "authors": [
+ "AnakngAraw"
+ ]
+ },
+ "pdf-desc": "Tagapaghawak para sa pagtanaw ng mga talaksang PDF na nasa modalidad na panglarawan",
+ "pdf_no_metadata": "Hindi makuha ang dato ng meta mula sa PDF",
+ "pdf_page_error": "Wala sa sakop ang bilang ng pahina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/tr.json b/www/wiki/extensions/PdfHandler/i18n/tr.json
new file mode 100644
index 00000000..08884d15
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/tr.json
@@ -0,0 +1,16 @@
+{
+ "@metadata": {
+ "authors": [
+ "Joseph",
+ "Arystanbek"
+ ]
+ },
+ "pdf-desc": "PDF dosyalarını görüntü modunda görüntülemek için işleyici",
+ "pdf-file-page-warning-info": "Bu sorun hakkında daha fazla bilgi edinin.",
+ "pdf_no_metadata": "PDF'den metadata alınamıyor",
+ "pdf_page_error": "Sayfa numarası aralıkta değil",
+ "exif-pdf-producer": "Dönüştürme programı",
+ "exif-pdf-version": "PDF formatı sürüm",
+ "exif-pdf-encrypted": "Şifreli",
+ "exif-pdf-pagesize": "Sayfa boyutu"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ug-arab.json b/www/wiki/extensions/PdfHandler/i18n/ug-arab.json
new file mode 100644
index 00000000..4010aca1
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ug-arab.json
@@ -0,0 +1,9 @@
+{
+ "@metadata": {
+ "authors": [
+ "Sahran"
+ ]
+ },
+ "exif-pdf-encrypted": "شىفىرلانغان",
+ "exif-pdf-pagesize": "بەت چوڭلۇقى"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/uk.json b/www/wiki/extensions/PdfHandler/i18n/uk.json
new file mode 100644
index 00000000..400933eb
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/uk.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Base",
+ "Prima klasy4na",
+ "Ата"
+ ]
+ },
+ "pdf-desc": "Оброблювач для перегляду PDF-файлів в режимі зображень",
+ "pdf-file-page-warning": "PDF — це складний формат, який може викрити деяку Вашу приватну в деяких випадках. Переконайтеся, що налаштували свій переглядач PDF безпечним способом.",
+ "pdf-file-page-warning-header": "Міркування конфіденційності",
+ "pdf-file-page-warning-footer": "Ця проблема є не специфічною для даного конкретного файлу, а загальною проблемою формату PDF.",
+ "pdf-file-page-warning-info": "Дізнайтеся більше про цю проблему.",
+ "pdf_no_metadata": "Не виходить отримати метадані з PDF",
+ "pdf_page_error": "Номер сторінки не в діапазоні",
+ "exif-pdf-producer": "програма конвертації",
+ "exif-pdf-version": "Версія формату PDF",
+ "exif-pdf-encrypted": "Зашифровано",
+ "exif-pdf-pagesize": "Розмір сторінки"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/ur.json b/www/wiki/extensions/PdfHandler/i18n/ur.json
new file mode 100644
index 00000000..7c3c6392
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/ur.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "පසිඳු කාවින්ද"
+ ]
+ },
+ "pdf_page_error": "صفحہ نمبر رینج میں نہیں"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/vec.json b/www/wiki/extensions/PdfHandler/i18n/vec.json
new file mode 100644
index 00000000..7345331d
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/vec.json
@@ -0,0 +1,15 @@
+{
+ "@metadata": {
+ "authors": [
+ "Candalua",
+ "GatoSelvadego"
+ ]
+ },
+ "pdf-desc": "Handler par vardar i file PDF in modalità imagine",
+ "pdf_no_metadata": "No se riesse a recuperar i metadati dal PDF",
+ "pdf_page_error": "Nùmaro de pagina mia conpreso in te l'intervalo",
+ "exif-pdf-producer": "Programa de conversion",
+ "exif-pdf-version": "Version del formato PDF",
+ "exif-pdf-encrypted": "Critigrafà",
+ "exif-pdf-pagesize": "Dimension pàjina"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/vi.json b/www/wiki/extensions/PdfHandler/i18n/vi.json
new file mode 100644
index 00000000..7e16a86a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/vi.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Minh Nguyen",
+ "Vinhtantran"
+ ]
+ },
+ "pdf-desc": "Bộ xử lý để xem tập tin PDF ở dạng hình ảnh",
+ "pdf-file-page-warning": "PDF là một định dạng phức tạp có thể lộ rõ thông tin cá nhân của bạn trong một số trường hợp. Hãy chắc chắn thiết lập trình xem PDF của bạn một cách an toàn.",
+ "pdf-file-page-warning-header": "Thông tin về quyền riêng tư",
+ "pdf-file-page-warning-footer": "Đây là vấn đề của định dạng PDF nói chung, chứ không phải tập tin này nói riêng.",
+ "pdf-file-page-warning-info": "Tìm hiểu thêm về vấn đề này.",
+ "pdf_no_metadata": "Không thấy truy xuất siêu dữ liệu từ PDF",
+ "pdf_page_error": "Số trang không nằm trong giới hạn",
+ "exif-pdf-producer": "Chương trình chuyển đổi",
+ "exif-pdf-version": "Phiên bản định dạng PDF",
+ "exif-pdf-encrypted": "Mã hóa",
+ "exif-pdf-pagesize": "Kích thước trang"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/yo.json b/www/wiki/extensions/PdfHandler/i18n/yo.json
new file mode 100644
index 00000000..52995a6a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/yo.json
@@ -0,0 +1,8 @@
+{
+ "@metadata": {
+ "authors": [
+ "Demmy"
+ ]
+ },
+ "pdf_no_metadata": "Dátà-àtẹ̀yìnwá kó ṣe é mú láti inú PDF"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/yue.json b/www/wiki/extensions/PdfHandler/i18n/yue.json
new file mode 100644
index 00000000..f9298d27
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/yue.json
@@ -0,0 +1,19 @@
+{
+ "@metadata": {
+ "authors": [
+ "Ktchankt",
+ "Yueman"
+ ]
+ },
+ "pdf-desc": "響圖像模式睇PDF檔嘅處理器",
+ "pdf-file-page-warning": "PDF係個複雜嘅檔案格式,可能會泄漏你嘅個人資料。記得設定PDF閱讀器確保安全。",
+ "pdf-file-page-warning-header": "私隱考慮",
+ "pdf-file-page-warning-footer": "呢個問題唔只係牽涉到特定檔案,而係PDF格式本身嘅問題。",
+ "pdf-file-page-warning-info": "睇多啲呢個問題。",
+ "pdf_no_metadata": "唔能夠響PDF度拎metadata",
+ "pdf_page_error": "頁數唔響範圍度",
+ "exif-pdf-producer": "轉換程式",
+ "exif-pdf-version": "PDF格式版本",
+ "exif-pdf-encrypted": "加密",
+ "exif-pdf-pagesize": "版面大細"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/zh-hans.json b/www/wiki/extensions/PdfHandler/i18n/zh-hans.json
new file mode 100644
index 00000000..e8ec8014
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/zh-hans.json
@@ -0,0 +1,20 @@
+{
+ "@metadata": {
+ "authors": [
+ "Shirayuki",
+ "Yfdyh000",
+ "Liuxinyu970226"
+ ]
+ },
+ "pdf-desc": "在图像模式中查看PDF文件的处理器。",
+ "pdf-file-page-warning": "PDF是一个复杂格式,它在某些情况下会暴露您的私人信息。确保您的PDF阅读器配置安全。",
+ "pdf-file-page-warning-header": "隐私考虑",
+ "pdf-file-page-warning-footer": "此问题不只发生在此文件上,还是PDF格式的普遍问题。",
+ "pdf-file-page-warning-info": "了解关于此问题的更多信息。",
+ "pdf_no_metadata": "无法在PDF中获取元数据。",
+ "pdf_page_error": "页数不在范围内。",
+ "exif-pdf-producer": "转换程序",
+ "exif-pdf-version": "PDF格式的版本",
+ "exif-pdf-encrypted": "加密",
+ "exif-pdf-pagesize": "页面大小"
+}
diff --git a/www/wiki/extensions/PdfHandler/i18n/zh-hant.json b/www/wiki/extensions/PdfHandler/i18n/zh-hant.json
new file mode 100644
index 00000000..b4942c89
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/i18n/zh-hant.json
@@ -0,0 +1,22 @@
+{
+ "@metadata": {
+ "authors": [
+ "Justincheng12345",
+ "Mark85296341",
+ "Simon Shek",
+ "Cwlin0416",
+ "Kly"
+ ]
+ },
+ "pdf-desc": "使用圖片模式檢視 PDF 檔案的處理程式。",
+ "pdf-file-page-warning": "PDF 是一個複雜的格式,在某些情況可能會暴露您部份的隱私資訊。 請確定您的 PDF 檢視器已使用安全的方式設定。",
+ "pdf-file-page-warning-header": "隱私考量",
+ "pdf-file-page-warning-footer": "此問題未針對特定檔檔案,是 PDF 格式的一般問題。",
+ "pdf-file-page-warning-info": "了解更多有關此問題。",
+ "pdf_no_metadata": "無法在 PDF 中取得詮釋資料。",
+ "pdf_page_error": "頁數超出範圍。",
+ "exif-pdf-producer": "轉換程式",
+ "exif-pdf-version": "PDF 格式版本",
+ "exif-pdf-encrypted": "已加密",
+ "exif-pdf-pagesize": "頁面大小"
+}
diff --git a/www/wiki/extensions/PdfHandler/includes/CreatePdfThumbnailsJob.php b/www/wiki/extensions/PdfHandler/includes/CreatePdfThumbnailsJob.php
new file mode 100644
index 00000000..65edb8ee
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/includes/CreatePdfThumbnailsJob.php
@@ -0,0 +1,130 @@
+<?php
+
+class CreatePdfThumbnailsJob extends Job {
+ /**
+ * Flags for thumbnail jobs
+ */
+ const BIG_THUMB = 1;
+ const SMALL_THUMB = 2;
+
+ /**
+ * Construct a thumbnail job
+ *
+ * @param Title $title Title object
+ * @param array $params Associative array of options:
+ * page: page number for which the thumbnail will be created
+ * jobtype: CreatePDFThumbnailsJob::BIG_THUMB or CreatePDFThumbnailsJob::SMALL_THUMB
+ * BIG_THUMB will create a thumbnail visible for full thumbnail view,
+ * SMALL_THUMB will create a thumbnail shown in "previous page"/"next page" boxes
+ */
+ public function __construct( $title, $params ) {
+ parent::__construct( 'createPdfThumbnailsJob', $title, $params );
+ }
+
+ /**
+ * Run a thumbnail job on a given PDF file.
+ * @return bool true
+ */
+ public function run() {
+ if ( !isset( $this->params['page'] ) ) {
+ wfDebugLog( 'thumbnails', 'A page for thumbnails job of ' . $this->title->getText() .
+ ' was not specified! That should never happen!' );
+ return true; // no page set? that should never happen
+ }
+
+ $file = wfLocalFile( $this->title ); // we just want a local file
+ if ( !$file ) {
+ return true; // Just silently fail, perhaps the file was already deleted, don't bother
+ }
+
+ switch ( $this->params['jobtype'] ) {
+ case self::BIG_THUMB:
+ global $wgImageLimits;
+ // Ignore user preferences, do default thumbnails
+ // everything here shamelessy copied and reused from includes/ImagePage.php
+ $sizeSel = User::getDefaultOption( 'imagesize' );
+
+ // The user offset might still be incorrect, specially if
+ // $wgImageLimits got changed (see bug #8858).
+ if ( !isset( $wgImageLimits[$sizeSel] ) ) {
+ // Default to the first offset in $wgImageLimits
+ $sizeSel = 0;
+ }
+ $max = $wgImageLimits[$sizeSel];
+ $maxWidth = $max[0];
+ $maxHeight = $max[1];
+
+ $width_orig = $file->getWidth( $this->params['page'] );
+ $width = $width_orig;
+ $height_orig = $file->getHeight( $this->params['page'] );
+ $height = $height_orig;
+ if ( $width > $maxWidth || $height > $maxHeight ) {
+ // Calculate the thumbnail size.
+ // First case, the limiting factor is the width, not the height.
+ if ( $width / $height >= $maxWidth / $maxHeight ) {
+ // $height = round( $height * $maxWidth / $width );
+ $width = $maxWidth;
+ // Note that $height <= $maxHeight now.
+ } else {
+ $newwidth = floor( $width * $maxHeight / $height );
+ // $height = round( $height * $newwidth / $width );
+ $width = $newwidth;
+ // Note that $height <= $maxHeight now, but might not be identical
+ // because of rounding.
+ }
+ $transformParams = [ 'page' => $this->params['page'], 'width' => $width ];
+ $file->transform( $transformParams );
+ }
+ break;
+
+ case self::SMALL_THUMB:
+ Linker::makeThumbLinkObj( $this->title, $file, '', '', 'none',
+ [ 'page' => $this->params['page'] ] );
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * @param UploadBase $upload
+ * @param string $mime
+ * @param string &$error
+ * @return bool
+ */
+ public static function insertJobs( $upload, $mime, &$error ) {
+ global $wgPdfCreateThumbnailsInJobQueue;
+ if ( !$wgPdfCreateThumbnailsInJobQueue ) {
+ return true;
+ }
+ $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
+ if ( !$magic->isMatchingExtension( 'pdf', $mime ) ) {
+ return true; // not a PDF, abort
+ }
+
+ $title = $upload->getTitle();
+ $uploadFile = $upload->getLocalFile();
+ if ( is_null( $uploadFile ) ) {
+ wfDebugLog( 'thumbnails', '$uploadFile seems to be null, should never happen...' );
+ return true; // should never happen, but it's better to be secure
+ }
+
+ $metadata = $uploadFile->getMetadata();
+ $unserialized = unserialize( $metadata );
+ $pages = intval( $unserialized['Pages'] );
+
+ $jobs = [];
+ for ( $i = 1; $i <= $pages; $i++ ) {
+ $jobs[] = new CreatePdfThumbnailsJob(
+ $title,
+ [ 'page' => $i, 'jobtype' => self::BIG_THUMB ]
+ );
+ $jobs[] = new CreatePdfThumbnailsJob(
+ $title,
+ [ 'page' => $i, 'jobtype' => self::SMALL_THUMB ]
+ );
+ }
+ JobQueueGroup::singleton()->push( $jobs );
+ return true;
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/includes/PdfHandler.php b/www/wiki/extensions/PdfHandler/includes/PdfHandler.php
new file mode 100644
index 00000000..fd40e4ad
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/includes/PdfHandler.php
@@ -0,0 +1,453 @@
+<?php
+/**
+ * Copyright © 2007 Martin Seidel (Xarax) <jodeldi@gmx.de>
+ *
+ * Inspired by djvuhandler from Tim Starling
+ * Modified and written by Xarax
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+class PdfHandler extends ImageHandler {
+ public static $messages = [
+ 'main' => 'pdf-file-page-warning',
+ 'header' => 'pdf-file-page-warning-header',
+ 'info' => 'pdf-file-page-warning-info',
+ 'footer' => 'pdf-file-page-warning-footer',
+ ];
+
+ /**
+ * @return bool
+ */
+ function isEnabled() {
+ global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfInfo;
+
+ if ( !isset( $wgPdfProcessor ) || !isset( $wgPdfPostProcessor ) || !isset( $wgPdfInfo ) ) {
+ wfDebug( "PdfHandler is disabled, please set the following\n" );
+ wfDebug( "variables in LocalSettings.php:\n" );
+ wfDebug( "\$wgPdfProcessor, \$wgPdfPostProcessor, \$wgPdfInfo\n" );
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @param File $file
+ * @return bool
+ */
+ function mustRender( $file ) {
+ return true;
+ }
+
+ /**
+ * @param File $file
+ * @return bool
+ */
+ function isMultiPage( $file ) {
+ return true;
+ }
+
+ /**
+ * @param string $name
+ * @param string $value
+ * @return bool
+ */
+ function validateParam( $name, $value ) {
+ if ( $name === 'page' && trim( $value ) !== (string)intval( $value ) ) {
+ // Extra junk on the end of page, probably actually a caption
+ // e.g. [[File:Foo.pdf|thumb|Page 3 of the document shows foo]]
+ return false;
+ }
+ if ( in_array( $name, [ 'width', 'height', 'page' ] ) ) {
+ return ( $value > 0 );
+ }
+ return false;
+ }
+
+ /**
+ * @param array $params
+ * @return bool|string
+ */
+ function makeParamString( $params ) {
+ $page = isset( $params['page'] ) ? $params['page'] : 1;
+ if ( !isset( $params['width'] ) ) {
+ return false;
+ }
+ return "page{$page}-{$params['width']}px";
+ }
+
+ /**
+ * @param string $str
+ * @return array|bool
+ */
+ function parseParamString( $str ) {
+ $m = [];
+
+ if ( preg_match( '/^page(\d+)-(\d+)px$/', $str, $m ) ) {
+ return [ 'width' => $m[2], 'page' => $m[1] ];
+ }
+
+ return false;
+ }
+
+ /**
+ * @param array $params
+ * @return array
+ */
+ function getScriptParams( $params ) {
+ return [
+ 'width' => $params['width'],
+ 'page' => $params['page'],
+ ];
+ }
+
+ /**
+ * @return array
+ */
+ function getParamMap() {
+ return [
+ 'img_width' => 'width',
+ 'img_page' => 'page',
+ ];
+ }
+
+ /**
+ * @param int $width
+ * @param int $height
+ * @param string $msg
+ * @return MediaTransformError
+ */
+ protected function doThumbError( $width, $height, $msg ) {
+ return new MediaTransformError( 'thumbnail_error',
+ $width, $height, wfMessage( $msg )->inContentLanguage()->text() );
+ }
+
+ /**
+ * @param File $image
+ * @param string $dstPath
+ * @param string $dstUrl
+ * @param array $params
+ * @param int $flags
+ * @return MediaTransformError|MediaTransformOutput|ThumbnailImage|TransformParameterError
+ */
+ function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
+ global $wgPdfProcessor, $wgPdfPostProcessor, $wgPdfHandlerDpi, $wgPdfHandlerJpegQuality;
+
+ if ( !$this->normaliseParams( $image, $params ) ) {
+ return new TransformParameterError( $params );
+ }
+
+ $width = (int)$params['width'];
+ $height = (int)$params['height'];
+ $page = (int)$params['page'];
+
+ if ( $page > $this->pageCount( $image ) ) {
+ return $this->doThumbError( $width, $height, 'pdf_page_error' );
+ }
+
+ if ( $flags & self::TRANSFORM_LATER ) {
+ return new ThumbnailImage( $image, $dstUrl, false, [
+ 'width' => $width,
+ 'height' => $height,
+ 'page' => $page,
+ ] );
+ }
+
+ if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) {
+ return $this->doThumbError( $width, $height, 'thumbnail_dest_directory' );
+ }
+
+ // Thumbnail extraction is very inefficient for large files.
+ // Provide a way to pool count limit the number of downloaders.
+ if ( $image->getSize() >= 1e7 ) { // 10MB
+ $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $image->getName() ),
+ [
+ 'doWork' => function () use ( $image ) {
+ return $image->getLocalRefPath();
+ }
+ ]
+ );
+ $srcPath = $work->execute();
+ } else {
+ $srcPath = $image->getLocalRefPath();
+ }
+
+ if ( $srcPath === false ) { // could not download original
+ return $this->doThumbError( $width, $height, 'filemissing' );
+ }
+
+ $cmd = '(' . wfEscapeShellArg(
+ $wgPdfProcessor,
+ "-sDEVICE=jpeg",
+ "-sOutputFile=-",
+ "-dFirstPage={$page}",
+ "-dLastPage={$page}",
+ "-dSAFER",
+ "-r{$wgPdfHandlerDpi}",
+ "-dBATCH",
+ "-dNOPAUSE",
+ "-q",
+ $srcPath
+ );
+ $cmd .= " | " . wfEscapeShellArg(
+ $wgPdfPostProcessor,
+ "-depth",
+ "8",
+ "-quality",
+ $wgPdfHandlerJpegQuality,
+ "-resize",
+ $width,
+ "-",
+ $dstPath
+ );
+ $cmd .= ")";
+
+ wfDebug( __METHOD__ . ": $cmd\n" );
+ $retval = '';
+ $err = wfShellExecWithStderr( $cmd, $retval );
+
+ $removed = $this->removeBadFile( $dstPath, $retval );
+
+ if ( $retval != 0 || $removed ) {
+ wfDebugLog( 'thumbnail',
+ sprintf( 'thumbnail failed on %s: error %d "%s" from "%s"',
+ wfHostname(), $retval, trim( $err ), $cmd ) );
+ return new MediaTransformError( 'thumbnail_error', $width, $height, $err );
+ } else {
+ return new ThumbnailImage( $image, $dstUrl, $dstPath, [
+ 'width' => $width,
+ 'height' => $height,
+ 'page' => $page,
+ ] );
+ }
+ }
+
+ /**
+ * @param File $image
+ * @param string $path
+ * @return PdfImage
+ * @suppress PhanUndeclaredProperty
+ */
+ function getPdfImage( $image, $path ) {
+ if ( !$image ) {
+ $pdfimg = new PdfImage( $path );
+ } elseif ( !isset( $image->pdfImage ) ) {
+ $pdfimg = $image->pdfImage = new PdfImage( $path );
+ } else {
+ $pdfimg = $image->pdfImage;
+ }
+
+ return $pdfimg;
+ }
+
+ /**
+ * @param File $image
+ * @return bool|array
+ * @suppress PhanUndeclaredProperty
+ */
+ function getMetaArray( $image ) {
+ if ( isset( $image->pdfMetaArray ) ) {
+ return $image->pdfMetaArray;
+ }
+
+ $metadata = $image->getMetadata();
+
+ if ( !$this->isMetadataValid( $image, $metadata ) ) {
+ wfDebug( "Pdf metadata is invalid or missing, should have been fixed in upgradeRow\n" );
+ return false;
+ }
+
+ $work = new PoolCounterWorkViaCallback(
+ 'PdfHandler-unserialize-metadata',
+ $image->getName(),
+ [
+ /**
+ * @suppress PhanUndeclaredProperty
+ */
+ 'doWork' => function () use ( $image, $metadata ) {
+ wfSuppressWarnings();
+ $image->pdfMetaArray = unserialize( $metadata );
+ wfRestoreWarnings();
+ },
+ ]
+ );
+ $work->execute();
+
+ return $image->pdfMetaArray;
+ }
+
+ /**
+ * @param File $image
+ * @param string $path
+ * @return array|bool
+ */
+ function getImageSize( $image, $path ) {
+ return $this->getPdfImage( $image, $path )->getImageSize();
+ }
+
+ /**
+ * @param string $ext
+ * @param string $mime
+ * @param null $params
+ * @return array
+ */
+ function getThumbType( $ext, $mime, $params = null ) {
+ global $wgPdfOutputExtension;
+ static $mime;
+
+ if ( !isset( $mime ) ) {
+ $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
+ $mime = $magic->guessTypesForExtension( $wgPdfOutputExtension );
+ }
+ return [ $wgPdfOutputExtension, $mime ];
+ }
+
+ /**
+ * @param File $image
+ * @param string $path
+ * @return string
+ */
+ function getMetadata( $image, $path ) {
+ return serialize( $this->getPdfImage( $image, $path )->retrieveMetaData() );
+ }
+
+ /**
+ * @param File $image
+ * @param string $metadata
+ * @return bool
+ */
+ function isMetadataValid( $image, $metadata ) {
+ if ( !$metadata || $metadata === serialize( [] ) ) {
+ return self::METADATA_BAD;
+ } elseif ( strpos( $metadata, 'mergedMetadata' ) === false ) {
+ return self::METADATA_COMPATIBLE;
+ }
+ return self::METADATA_GOOD;
+ }
+
+ /**
+ * @param File $image
+ * @param bool|IContextSource $context Context to use (optional)
+ * @return bool|array
+ */
+ function formatMetadata( $image, $context = false ) {
+ $meta = $image->getMetadata();
+
+ if ( !$meta ) {
+ return false;
+ }
+ wfSuppressWarnings();
+ $meta = unserialize( $meta );
+ wfRestoreWarnings();
+
+ if ( !isset( $meta['mergedMetadata'] )
+ || !is_array( $meta['mergedMetadata'] )
+ || count( $meta['mergedMetadata'] ) < 1
+ ) {
+ return false;
+ }
+
+ // Inherited from MediaHandler.
+ return $this->formatMetadataHelper( $meta['mergedMetadata'], $context );
+ }
+
+ /**
+ * @param File $image
+ * @return bool|int
+ */
+ function pageCount( File $image ) {
+ $info = $this->getDimensionInfo( $image );
+
+ return $info ? $info['pageCount'] : false;
+ }
+
+ /**
+ * @param File $image
+ * @param int $page
+ * @return array|bool
+ */
+ function getPageDimensions( File $image, $page ) {
+ $index = $page; // MW starts pages at 1, as they are stored here
+
+ $info = $this->getDimensionInfo( $image );
+ if ( $info && isset( $info['dimensionsByPage'][$index] ) ) {
+ return $info['dimensionsByPage'][$index];
+ }
+
+ return false;
+ }
+
+ protected function getDimensionInfo( File $file ) {
+ $cache = ObjectCache::getMainWANInstance();
+ return $cache->getWithSetCallback(
+ $cache->makeKey( 'file-pdf', 'dimensions', $file->getSha1() ),
+ $cache::TTL_INDEFINITE,
+ function () use ( $file ) {
+ $data = $this->getMetaArray( $file );
+ if ( !$data || !isset( $data['Pages'] ) ) {
+ return false;
+ }
+ unset( $data['text'] ); // lower peak RAM
+
+ $dimsByPage = [];
+ $count = intval( $data['Pages'] );
+ for ( $i = 1; $i <= $count; $i++ ) {
+ $dimsByPage[$i] = PdfImage::getPageSize( $data, $i );
+ }
+
+ return [ 'pageCount' => $count, 'dimensionsByPage' => $dimsByPage ];
+ },
+ [ 'pcTTL' => $cache::TTL_INDEFINITE ]
+ );
+ }
+
+ /**
+ * @param File $image
+ * @param int $page
+ * @return bool
+ */
+ function getPageText( File $image, $page ) {
+ $data = $this->getMetaArray( $image );
+ if ( !$data || !isset( $data['text'] ) || !isset( $data['text'][$page - 1] ) ) {
+ return false;
+ }
+ return $data['text'][$page - 1];
+ }
+
+ /**
+ * Adds a warning about PDFs being potentially dangerous to the file
+ * page. Multiple messages with this base will be used.
+ * @param File $file
+ * @return array
+ */
+ function getWarningConfig( $file ) {
+ return [
+ 'messages' => self::$messages,
+ 'link' => '//www.mediawiki.org/wiki/Special:MyLanguage/Help:Security/PDF_files',
+ 'module' => 'pdfhandler.messages',
+ ];
+ }
+
+ /**
+ * Register a module with the warning messages in it.
+ * @param ResourceLoader &$resourceLoader
+ */
+ static function registerWarningModule( &$resourceLoader ) {
+ $resourceLoader->register( 'pdfhandler.messages', [
+ 'messages' => array_values( self::$messages ),
+ ] );
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/includes/PdfImage.php b/www/wiki/extensions/PdfHandler/includes/PdfImage.php
new file mode 100644
index 00000000..0fdefc96
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/includes/PdfImage.php
@@ -0,0 +1,329 @@
+<?php
+/**
+ *
+ * Copyright © 2007 Xarax <jodeldi@gmx.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\Shell\Shell;
+use UtfNormal\Validator;
+
+/**
+ * inspired by djvuimage from Brion Vibber
+ * modified and written by xarax
+ */
+
+class PdfImage {
+
+ /**
+ * @var string
+ */
+ private $mFilename;
+
+ /**
+ * @param string $filename
+ */
+ function __construct( $filename ) {
+ $this->mFilename = $filename;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isValid() {
+ return true;
+ }
+
+ /**
+ * @return array|bool
+ */
+ public function getImageSize() {
+ $data = $this->retrieveMetadata();
+ $size = self::getPageSize( $data, 1 );
+
+ if ( $size ) {
+ $width = $size['width'];
+ $height = $size['height'];
+ return [ $width, $height, 'Pdf',
+ "width=\"$width\" height=\"$height\"" ];
+ }
+ return false;
+ }
+
+ /**
+ * @param array $data
+ * @param int $page
+ * @return array|bool
+ */
+ public static function getPageSize( $data, $page ) {
+ global $wgPdfHandlerDpi;
+
+ if ( isset( $data['pages'][$page]['Page size'] ) ) {
+ $o = $data['pages'][$page]['Page size'];
+ } elseif ( isset( $data['Page size'] ) ) {
+ $o = $data['Page size'];
+ } else {
+ $o = false;
+ }
+
+ if ( $o ) {
+ if ( isset( $data['pages'][$page]['Page rot'] ) ) {
+ $r = $data['pages'][$page]['Page rot'];
+ } elseif ( isset( $data['Page rot'] ) ) {
+ $r = $data['Page rot'];
+ } else {
+ $r = 0;
+ }
+ $size = explode( 'x', $o, 2 );
+
+ if ( $size ) {
+ $width = intval( trim( $size[0] ) / 72 * $wgPdfHandlerDpi );
+ $height = explode( ' ', trim( $size[1] ), 2 );
+ $height = intval( trim( $height[0] ) / 72 * $wgPdfHandlerDpi );
+ if ( ( $r / 90 ) & 1 ) {
+ // Swap width and height for landscape pages
+ $t = $width;
+ $width = $height;
+ $height = $t;
+ }
+
+ return [
+ 'width' => $width,
+ 'height' => $height
+ ];
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * @return array|bool|null
+ */
+ public function retrieveMetaData() {
+ global $wgPdfInfo, $wgPdftoText;
+
+ if ( $wgPdfInfo ) {
+ // Note in poppler 0.26 the -meta and page data options worked together,
+ // but as of poppler 0.48 they must be queried separately.
+ // https://bugs.freedesktop.org/show_bug.cgi?id=96801
+ $cmdMeta = [
+ $wgPdfInfo,
+ '-enc', 'UTF-8', # Report metadata as UTF-8 text...
+ '-meta', # Report XMP metadata
+ $this->mFilename,
+ ];
+ $resultMeta = Shell::command( $cmdMeta )
+ ->execute();
+
+ $cmdPages = [
+ $wgPdfInfo,
+ '-enc', 'UTF-8', # Report metadata as UTF-8 text...
+ '-l', '9999999', # Report page sizes for all pages
+ $this->mFilename,
+ ];
+ $resultPages = Shell::command( $cmdPages )
+ ->execute();
+
+ $dump = $resultMeta->getStdout() . $resultPages->getStdout();
+ $data = $this->convertDumpToArray( $dump );
+ } else {
+ $data = null;
+ }
+
+ // Read text layer
+ if ( isset( $wgPdftoText ) ) {
+ $cmd = [ $wgPdftoText, $this->mFilename, '-' ];
+ $result = Shell::command( $cmd )
+ ->execute();
+ $retval = $result->getExitCode();
+ $txt = $result->getStdout();
+ if ( $retval == 0 ) {
+ $txt = str_replace( "\r\n", "\n", $txt );
+ $pages = explode( "\f", $txt );
+ foreach ( $pages as $page => $pageText ) {
+ // Get rid of invalid UTF-8, strip control characters
+ // Note we need to do this per page, as \f page feed would be stripped.
+ $pages[$page] = Validator::cleanUp( $pageText );
+ }
+ $data['text'] = $pages;
+ }
+ }
+ return $data;
+ }
+
+ /**
+ * @param string $dump
+ * @return array|bool
+ */
+ protected function convertDumpToArray( $dump ) {
+ if ( strval( $dump ) == '' ) {
+ return false;
+ }
+
+ $lines = explode( "\n", $dump );
+ $data = [];
+
+ // Metadata is always the last item, and spans multiple lines.
+ $inMetadata = false;
+
+ // Basically this loop will go through each line, splitting key value
+ // pairs on the colon, until it gets to a "Metadata:\n" at which point
+ // it will gather all remaining lines into the xmp key.
+ foreach ( $lines as $line ) {
+ if ( $inMetadata ) {
+ // Handle XMP differently due to diffence in line break
+ $data['xmp'] .= "\n$line";
+ continue;
+ }
+ $bits = explode( ':', $line, 2 );
+ if ( count( $bits ) > 1 ) {
+ $key = trim( $bits[0] );
+ if ( $key === 'Metadata' ) {
+ $inMetadata = true;
+ $data['xmp'] = '';
+ continue;
+ }
+ $value = trim( $bits[1] );
+ $matches = [];
+ // "Page xx rot" will be in poppler 0.20's pdfinfo output
+ // See https://bugs.freedesktop.org/show_bug.cgi?id=41867
+ if ( preg_match( '/^Page +(\d+) (size|rot)$/', $key, $matches ) ) {
+ $data['pages'][$matches[1]][$matches[2] == 'size' ? 'Page size' : 'Page rot'] = $value;
+ } else {
+ $data[$key] = $value;
+ }
+ }
+ }
+ $data = $this->postProcessDump( $data );
+ return $data;
+ }
+
+ /**
+ * Postprocess the metadata (convert xmp into useful form, etc)
+ *
+ * This is used to generate the metadata table at the bottom
+ * of the image description page.
+ *
+ * @param array $data metadata
+ * @return array post-processed metadata
+ */
+ protected function postProcessDump( array $data ) {
+ $meta = new BitmapMetadataHandler();
+ $items = [];
+ foreach ( $data as $key => $val ) {
+ switch ( $key ) {
+ case 'Title':
+ $items['ObjectName'] = $val;
+ break;
+ case 'Subject':
+ $items['ImageDescription'] = $val;
+ break;
+ case 'Keywords':
+ // Sometimes we have empty keywords. This seems
+ // to be a product of how pdfinfo deals with keywords
+ // with spaces in them. Filter such empty keywords
+ $keyList = array_filter( explode( ' ', $val ) );
+ if ( count( $keyList ) > 0 ) {
+ $items['Keywords'] = $keyList;
+ }
+ break;
+ case 'Author':
+ $items['Artist'] = $val;
+ break;
+ case 'Creator':
+ // Program used to create file.
+ // Different from program used to convert to pdf.
+ $items['Software'] = $val;
+ break;
+ case 'Producer':
+ // Conversion program
+ $items['pdf-Producer'] = $val;
+ break;
+ case 'ModTime':
+ $timestamp = wfTimestamp( TS_EXIF, $val );
+ if ( $timestamp ) {
+ // 'if' is just paranoia
+ $items['DateTime'] = $timestamp;
+ }
+ break;
+ case 'CreationTime':
+ $timestamp = wfTimestamp( TS_EXIF, $val );
+ if ( $timestamp ) {
+ $items['DateTimeDigitized'] = $timestamp;
+ }
+ break;
+ // These last two (version and encryption) I was unsure
+ // if we should include in the table, since they aren't
+ // all that useful to editors. I leaned on the side
+ // of including. However not including if file
+ // is optimized/linearized since that is really useless
+ // to an editor.
+ case 'PDF version':
+ $items['pdf-Version'] = $val;
+ break;
+ case 'Encrypted':
+ // @todo: The value isn't i18n-ised. The appropriate
+ // place to do that is in FormatMetadata.php
+ // should add a hook a there.
+ // For reference, if encrypted this fields value looks like:
+ // "yes (print:yes copy:no change:no addNotes:no)"
+ $items['pdf-Encrypted'] = $val;
+ break;
+ // Note 'pages' and 'Pages' are different keys (!)
+ case 'pages':
+ // A pdf document can have multiple sized pages in it.
+ // (However 95% of the time, all pages are the same size)
+ // get a list of all the unique page sizes in document.
+ // This doesn't do anything with rotation as of yet,
+ // mostly because I am unsure of what a good way to
+ // present that information to the user would be.
+ $pageSizes = [];
+ foreach ( $val as $page ) {
+ if ( isset( $page['Page size'] ) ) {
+ $pageSizes[$page['Page size']] = true;
+ }
+ }
+
+ $pageSizeArray = array_keys( $pageSizes );
+ if ( count( $pageSizeArray ) > 0 ) {
+ $items['pdf-PageSize'] = $pageSizeArray;
+ }
+ break;
+ }
+
+ }
+ $meta->addMetadata( $items, 'native' );
+
+ if ( isset( $data['xmp'] ) && function_exists( 'xml_parser_create_ns' ) ) {
+ // func exists verifies that the xml extension required for XMPReader
+ // is present (Almost always is present)
+ // @todo: This only handles generic xmp properties. Would be improved
+ // by handling pdf xmp properties (pdf and pdfx) via XMPInfo hook.
+ $xmp = new XMPReader( LoggerFactory::getInstance( 'XMP' ) );
+ $xmp->parse( $data['xmp'] );
+ $xmpRes = $xmp->getResults();
+ foreach ( $xmpRes as $type => $xmpSection ) {
+ $meta->addMetadata( $xmpSection, $type );
+ }
+ }
+ unset( $data['xmp'] );
+ $data['mergedMetadata'] = $meta->getMetadataArray();
+ return $data;
+ }
+}
diff --git a/www/wiki/extensions/PdfHandler/phpcs.xml b/www/wiki/extensions/PdfHandler/phpcs.xml
new file mode 100644
index 00000000..97a989be
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/phpcs.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<ruleset>
+ <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
+ <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
+ <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
+ <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
+ <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
+ <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
+ </rule>
+ <file>.</file>
+ <arg name="extensions" value="php,php5,inc" />
+ <arg name="encoding" value="utf8" />
+ <exclude-pattern>vendor</exclude-pattern>
+ <exclude-pattern>node_modules</exclude-pattern>
+</ruleset>
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/ci.yml b/www/wiki/extensions/PdfHandler/tests/browser/ci.yml
new file mode 100644
index 00000000..8e5a6c9f
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/ci.yml
@@ -0,0 +1,8 @@
+BROWSER:
+ - firefox
+
+MEDIAWIKI_ENVIRONMENT:
+ - test
+
+PLATFORM:
+ - Linux
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/environments.yml b/www/wiki/extensions/PdfHandler/tests/browser/environments.yml
new file mode 100644
index 00000000..2915092e
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/environments.yml
@@ -0,0 +1,39 @@
+# Customize this configuration as necessary to provide defaults for various
+# test environments.
+#
+# The set of defaults to use is determined by the MEDIAWIKI_ENVIRONMENT
+# environment variable.
+#
+# export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
+# bundle exec cucumber
+#
+# Additional variables set by the environment will override the corresponding
+# defaults defined here.
+#
+# export MEDIAWIKI_ENVIRONMENT=mw-vagrant-host
+# export MEDIAWIKI_USER=Selenium_user2
+# bundle exec cucumber
+#
+mw-vagrant-host: &default
+ user_factory: true
+ mediawiki_url: http://127.0.0.1:8080/wiki/
+
+mw-vagrant-guest:
+ user_factory: true
+ mediawiki_url: http://127.0.0.1/wiki/
+
+beta:
+ mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/
+ mediawiki_user: Selenium_user
+ # mediawiki_password: SET THIS IN THE ENVIRONMENT!
+
+test:
+ mediawiki_url: http://test.wikipedia.org/wiki/
+ mediawiki_user: Selenium_user
+ # mediawiki_password: SET THIS IN THE ENVIRONMENT!
+
+integration:
+ user_factory: true
+ # mediawiki_url: THIS WILL BE SET BY JENKINS
+
+default: *default
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/features/pdf.feature b/www/wiki/extensions/PdfHandler/tests/browser/features/pdf.feature
new file mode 100644
index 00000000..84fb3ff2
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/features/pdf.feature
@@ -0,0 +1,11 @@
+@chrome @firefox @internet_explorer_8 @internet_explorer_9 @internet_explorer_10 @phantomjs @test.wikipedia.org
+Feature: PDF
+
+ Scenario: Check for Download as PDF link
+ Given I am at a random page
+ Then Download as PDF should be present
+
+ Scenario: Click on Download as PDF link
+ Given I am at a random page
+ When I click on Download as PDF
+ Then Download the file link should be present
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb b/www/wiki/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb
new file mode 100644
index 00000000..ce793b32
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/features/step_definitions/pdf_steps.rb
@@ -0,0 +1,9 @@
+Then(/^Download as PDF should be present$/) do
+ on(PdfPage).download_as_pdf_element.should exist
+end
+When(/^I click on Download as PDF$/) do
+ on(PdfPage).download_as_pdf_element.when_present.click
+end
+Then(/^Download the file link should be present$/) do
+ on(PdfPage).download_the_file_element.when_present(30).should exist
+end
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/features/support/env.rb b/www/wiki/extensions/PdfHandler/tests/browser/features/support/env.rb
new file mode 100644
index 00000000..c1072b26
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/features/support/env.rb
@@ -0,0 +1,3 @@
+require 'mediawiki_selenium/cucumber'
+require 'mediawiki_selenium/pages'
+require 'mediawiki_selenium/step_definitions'
diff --git a/www/wiki/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb b/www/wiki/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb
new file mode 100644
index 00000000..ceaff4ce
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/browser/features/support/pages/random_page.rb
@@ -0,0 +1,6 @@
+class PdfPage
+ include PageObject
+
+ a(:download_as_pdf, text: 'Download as PDF')
+ a(:download_the_file, text: 'Download the file')
+end
diff --git a/www/wiki/extensions/PdfHandler/tests/phan/config.php b/www/wiki/extensions/PdfHandler/tests/phan/config.php
new file mode 100644
index 00000000..f2660b8a
--- /dev/null
+++ b/www/wiki/extensions/PdfHandler/tests/phan/config.php
@@ -0,0 +1,3 @@
+<?php
+
+return require __DIR__ . '/../../vendor/mediawiki/mediawiki-phan-config/src/config.php';