Extension:ConvertPDF2Wiki
![]() リリースの状態: 安定 |
|
---|---|
実装 | 特別ページ , API |
説明 | Allows users to import a PDF and convert it to a wiki page, including embedded images |
作者 | Bertrand Gorge (BertrandGorgeトーク) |
最新バージョン | 1.0 (2024-12-09) |
互換性の方針 | master は後方互換性を維持しています。 |
MediaWiki | 1.39+ |
PHP | 8.1+ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | https://github.com/neayi/mw-convertPDF2Wiki/blob/main/README.md |
The ConvertPDF2Wiki extension allows a PDF to be imported as a wiki page, extracting images and text as much as possible.
使用法
This extension adds a special page, "Special:Import_PDF", that allows you to upload a PDF file (or point to the URL of a PDF file somewhere on the web) and then converts the PDF to a wiki, creating a new page.
The process is as follows:
- Go to the new special page: "Special:Import_PDF"
- Select the PDF file
- Choose the images you want to keep (get rid of logos or other nonessential images)
- Rotate images that might be upside down
- Select a title for the new page in the wiki (a default title is guessed from the PDF document)
- Edit your page to polish the details (tables might need to be recreated, etc...)
The selected images are imported with a name that matches the page title and added at the bottom of the page in case they do not appear in the text's flow.
If the title matches an existing page, the converted text is added at the bottom of the existing page.
インストール
- Install the software required for this extension to work.
- Downloadして、ファイルを
extensions/
フォルダー内のConvertPDF2Wiki
という名前のディレクトリ内に配置します。 - 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'ConvertPDF2Wiki' );
- 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
依存関係
The extension relies on the following three utilities that must be installed as well:
ImageMagick
ImageMagick is used to rotate the images. See: https://imagemagick.org/
To install:
$ pecl install imagick
pdftohtml
PDFtoHTML is used to convert the PDF to an HTML document. See: https://poppler.freedesktop.org
To install:
$ apt-get install poppler-utils
Pandoc
Pandoc is used to convert from HTML to Wikitext. See https://pandoc.org/installing.html
To install:
$ apt-get install pandoc
関連項目
Here are some other extensions that do a similar job with Docx documents (PDF can also easily be converted to docx):