扩展:PDF嵌入

![]() 發佈狀態: 穩定版本 |
|
---|---|
实现 | 标签 , 媒體 |
描述 | 允許將PDF文件嵌入頁面 |
作者 | Alexia E. Smith, Wolfgang Fahl, Mark A. Hershberger, Chris Koerner and Spas Z.Spasov (Alexia E. Smith讨论) |
最新版本 | 3.0.0 (2022-07-11) |
MediaWiki | 1.29.x - 1.38.x (1.30+僅在某些瀏覽器上有效) |
PHP | 7.0+, 7.3 for 1.35.x |
数据库更改 | 否 |
许可协议 | GNU較寬鬆公共授權條款3.0 |
下載 | Legacy version |
$wgPdfEmbed (width, height) |
|
pdf |
|
embed_pdf |
|
PDFEmbed擴展允許PDF文件(上傳到Wiki)可以使用<pdf></pdf>
標籤嵌入到Wiki頁面中。
將自動添加PDF文件擴展,並且必須配置默認權限。
將來的功能將允許此擴展充當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>
Filing issues
As of 2020-10 there are two repositories for this extension. The original gitlab one at https://gitlab.com/hydrawiki/extensions/PDFEmbed and a "pseudo fork" at https://github.com/WolfgangFahl/PDFEmbed. For current issues, please use https://github.com/WolfgangFahl/PDFEmbed/issues.
參見
![]() | 此擴充功能包含在以下包或/和wiki農場: 這不是一份權威名單。即使一些wiki農場/託管者沒有被列在這裡,他們也可能包含這個extension。請以各wiki農場/託管者或包的狀態為準。 |
Categories:
- Stable extensions/zh
- Tag extensions/zh
- Media handling extensions/zh
- LGPL licensed extensions/zh
- Extensions in GitHub version control/zh
- Extensions in GitLab 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 WikiForge/zh
- Document viewer extensions/zh
- PDF extensions/zh