扩展:PDF嵌入
Appearance
发行状态: 稳定版 |
|
|---|---|
| 实现 | 标签, 媒体 |
| 描述 | 允許將PDF文件嵌入頁面 |
| 作者 | Alexia E. Smith, Wolfgang Fahl, Mark A. Hershberger, Chris Koerner and Spas Z.Spasov (Alexia E. Smith留言) |
| 最新版本 | 3.0.1 (2023-01-24) |
| MediaWiki | >= 1.40.0 |
| PHP | 7.3+ |
| 数据库更改 | 否 |
| 许可协议 | GNU較寬鬆公共授權條款3.0 |
| 下載 | |
|
$wgPdfEmbed (width, height) |
|
|
pdf |
|
|
embed_pdf |
|
PDFEmbed擴展允許PDF文件(上傳到Wiki)可以使用<pdf></pdf>標籤嵌入到Wiki頁面中。
將自動添加PDF文件擴展,並且必須配置默認權限。
安裝
- 下载文件,并将其放置在您
extensions/文件夹中的PDFEmbed目录内。 - 請新增下列代码到您的LocalSettings.php文件的底部:
wfLoadExtension( 'PDFEmbed' );
- 在您方便的时候配置即可
完成 – 請导航至您的wiki上的Special:Version,以验证此扩展已成功安装。
配置
If the default configuration needs to be altered add these settings to the "LocalSettings.php" file below the require:
// Default width for the PDF object container.
$wgPdfEmbed['width'] = 800;
// Default height for the PDF object container.
$wgPdfEmbed['height'] = 1090;
// Allow user the usage of the pdf tag
$wgGroupPermissions['*']['embed_pdf'] = true;
使用示例
The PDF to be embedded must first be uploaded to the wiki through "Special:Upload".
<pdf>File:Example.pdf</pdf>
具有可選的寬度和高度。
<pdf width="500" height="300">File:Example.pdf</pdf>
呈現文檔後滾動到第10頁。
<pdf page="10">File:Example.pdf</pdf>
參見
| 此扩展在以下wiki农场/托管网站和/或软件包中提供: 這不是一份權威名單。 即使某些wiki农场/托管网站和/或软件包未在这里列出,它们也可能提供此扩展。 请检查你的wiki农场/托管网站或软件包以确认提供情况。 |
Categories:
- Stable extensions/zh
- Tag extensions/zh
- Media handling extensions/zh
- LGPL licensed extensions/zh
- Extensions in GitHub version control/zh
- Extensions which add rights/zh
- ParserFirstCallInit extensions/zh
- All extensions/zh
- Extensions included in Fandom/zh
- Extensions included in Miraheze/zh
- Extensions included in MyWikis/zh
- Extensions included in wiki.gg/zh
- Document viewer extensions/zh
- PDF extensions/zh
