Jump to content

Extension:PDF Creator/ja

From mediawiki.org
This page is a translated version of the page Extension:PDF Creator and the translation is 15% complete.
MediaWiki 拡張機能マニュアル
PDF Creator
リリースの状態: 安定
説明 Creates PDF files from wiki pages
作者 Hallo Welt! GmbH
メンテナー Hallo Welt! GmbH
最新バージョン 5.0
互換性の方針 長期間サポート リリースであるすべての MediaWiki リリースについて、拡張機能に対応するブランチが存在します。
MediaWiki 1.43 (LTS)
データベースの変更 はい
  • $wgPDFCreatorCoverbackground
  • $wgPDFCreatorOpenHtml2PdfUploadThresholdCount
  • $wgPDFCreatorToolbarOffset
  • $wgPDFCreatorOpenHtml2PdfUploadThresholdSize
  • $wgPDFCreatorTemplateProvider
  • $wgPDFCreatorDefaultTemplate
  • $wgPDFCreatorBackend
  • $wgPDFCreatorOpenHtml2PdfServiceUrl
ライセンス GNU 一般公衆利用許諾書 3.0 のみ
ダウンロード
translatewiki.net で翻訳を利用できる場合は、PDF Creator 拡張機能の翻訳にご協力ください
 Community Forum

PDF Creator allows users to export wiki content to professionally styled PDF documents. It supports both individual pages and multi-page exports (books).

使用法 / 機能

  • Pages can be exported individually or together with subpages or linked pages.
  • Users can choose between different templates for their PDF layout (e.g., with or without cover sheets).
  • PDF export is available directly from the page tools menu via an intuitive export dialog.
  • Content droplets allow users to add quick-export links or previews directly on a page.
  • Templates are customizable, including headers, footers, styles, and metadata.

インストール

  • ダウンロードして、ファイルをextensions/フォルダー内のPDFCreatorという名前のディレクトリ内に配置します。
    開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PDFCreator
    
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'PDFCreator' );
    
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

Exporting a page or a book

To print a page to PDF, click on the page-icon in the page tools. This opens the export dialog field. dialog with dropdown menus for selecting export mode and template

Dialog with dropdown menus for selecting export mode and template

Select the export settings.

  • Mode:
    • Page: Prints the page.
    • Page with subpages: Prints the page and all its subpages. This option is only shown if the page has subpages.
    • Page with linked pages: Prints the page and the pages that are linked directly from this page
  • Template:
    • StandardPDF: This prints the page or pages without a cover sheet (unless the template has been edited).
    • StandardBookPDF: This adds a cover sheet to the PDF (unless the template has been edited).

Whether linked pages should be considered in the PDF export is defined in the chosen export template.

By default, the template StandardPDF shows the wiki's logo (from the skin settings page). If there are no custom settings, the default BlueSpice logo is used.

By default, media links (=links that point directly to the file on the server) will add an attachment to the exported PDF File. This is independent of the chosen export mode (Page, Page with linked pages).

This is also true for PDF files that are embedded via Content Droplet PDF preview.

If no attachments should be added, this has to be defined in the Properties of the PDF template.

Exporting pages with linked pages

When pages are exported with their linked pages, link types are processed as follows:

  • Media links will add an attachment to the exported PDF File
  • File links are clickable and forward to the corresponding file page
  • Mentions are clickable and forward to the user page

If no attachments should be added, this has to be defined in the Properties of the PDF template.

If no links to pages that are not included in the PDF should be added, this has to be defined in the Properties of the PDF template.

新テンプレートの追加

By default, the wiki provides two PDF templates:

  • StandardPDF: Template without a cover page for the single-page export.
  • StandardBookPDF: Template with a cover page for the book export.

Starting with BlueSpice 5.1, PDF templates can be created from the page Special:PDF templates.

既存のテンプレートのコピー

To create a new PDF template:

  1. Go to the page Special:PDF_templates.
  2. Copy an existing template.

special page "PDF templates" with selected standard book pdf to be copied

special page "PDF templates" with selected standard book pdf to be copied
  1. Enter a name for the new template.
  2. Click Copy.

Click Edit template to start customizing your template. PDF templates page with the edit link of the new template

PDF templates page with the edit link of the new template

Select general template properties

  1. Select the page orientation and the general export properties (for example, whether to show the Table of Contents for each page or whether to include links to pages that are not exported in the PDF itself).
  2. Click Next.

Select the template elements

Select the checkboxes for each element you want to include in your template:

  • Header: Page header for the template pages
  • Footer: Page footer for the template pages
  • Document preface: Cover page
  • Document appendix: Additional page that is added at the end of the pdf. It is formatted like the content pages (with header and footer) and adds to the PDF page count.

Click Configure for each template element to design the layout.

ヘッダーの設定

The header elements can consist of a header image (usually your logo) and some text (which can be a combination of predefined parameters and your own text). Edit dialog for the header section

Edit idalog for the header section

If you want to show an image that is different from your wiki logo, you can select "Use custom logo" and enter an existing image name or upload a new image.

By default, the wiki provides localization system messages for each footer section. Use system messages if you want to support the language settings of your users. For example, in an English wiki, the English system message for ⧼pdfcreator-pdf-disclaimer⧽ can be changed on the page MediaWiki:pdfcreator-pdf-disclaimer. The German language version on page MediaWiki:pdfcreator-pdf-disclaimer/de.

Alternatively, you can simply type your own text if the PDF export does not have to consider user languages. Or leave the section blank if you don't want to print text.

PDF template locations

All templates are saved as subpages of MediaWiki:PDFCreator.

設定

Konfiguration for the default page export template and default cover image
  • Default export template for pages: The default template is shown when users select an export template in "Page" mode. It is also used when clicking on the PDF link for the Content Droplet PDF Link.
  • Default cover background image

Admins can also set a default cover background image. It is applied whenever the document preface of the template contains the standard "intro"-wrapper

出力:

Image of an enlarged keyboard key with book symbol

Alternatively, an uploaded image file can be specified (without a namespace prefix), for example: industry.jpg

Example default image on an exported cover sheet.

セマンティックMediaWiki

The books in which a page exists can be queried via the semantic property Books (Property:Books).

Display of values for property "book" of a wikipage

外部リンク


Installation

.git) as a "vcs repository" and the package name (mediawiki/PDF Creator) and version to the require section of your composer.local.json. Example:

{
	"repositories": [
		{
			"type": "vcs",
			"url": "https://github.com/wikimedia/mediawiki-extensions-PDF Creator
.git"
		}
	],
	"require": {
		"mediawiki/PDF Creator": "PDF Creator"
	}
}
  • Run the following command in your MediaWiki installation path
composer update --no-dev
wfLoadExtension( 'PDF Creator' );
  • Yes 完了 Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Bluespice のアイコン

この拡張機能は当初は BlueSpice 向けに作成されました。 BlueSpice は、企業や組織向けの MediaWiki ディストリビューションです。 これは MediaWiki を強化し、特に品質管理、プロセス支援、管理、編集、およびセキュリティの分野で機能を向上させます。 この拡張機能は BlueSpice free とともにダウンロードできます。

BlueSpice: