No edit summary Tag: 2017 source edit |
No edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
Every content page on the wiki can be exported. Export fuctions are located in the general [[Manual:Extension/BlueSpiceDiscovery#Page_tools|page tools]] under the menu item ''Export''. The available export options depend on your wiki configuration. Clicking one of the links downloads the page content in the selected format. | Every content page on the wiki can be exported. Export fuctions are located in the general [[Manual:Extension/BlueSpiceDiscovery#Page_tools|page tools]] under the menu item ''Export''. The available export options depend on your wiki configuration. Clicking one of the links downloads the page content in the selected format. | ||
<br /> | <span /><span /><br /> | ||
[[File:Manual:pageexport | [[File:Manual:pageexport.png|alt=export options menu in the page tools|center|thumb|348x348px|Export options]] | ||
==Configuration== | ==Configuration== | ||
Line 18: | Line 18: | ||
*'''Hide namespace prefix in PDF:''' removes namespace prefixes when displaying page titles in PDF exports. | *'''Hide namespace prefix in PDF:''' removes namespace prefixes when displaying page titles in PDF exports. | ||
*'''Metadata (standard, JSON)''' : additional data to be passed to the rendering template in JSON format. This data will be avalible for usage in the template (advanced users). | *'''Metadata (standard, JSON)''' : additional data to be passed to the rendering template in JSON format. This data will be avalible for usage in the template (advanced users). | ||
*'''Metadata (override, JSON)''': offers overriding standard data sent to the rendering template. Values that are set by default can be overriden by using this option (JSON format) (advanced users).<br /> | *'''Metadata (override, JSON)''': offers overriding standard data sent to the rendering template. Values that are set by default can be overriden by using this option (JSON format) (advanced users).<span /><span /><br /> | ||
[[File:Manual:UniversalExport2a.png|link=link=link=https://en.wiki.bluespice.com/wiki/File:UniversalExport2a.png|alt=|center|thumb|372x372px|Configuration options]] | [[File:Manual:UniversalExport2a.png|link=link=link=https://en.wiki.bluespice.com/wiki/File:UniversalExport2a.png|alt=|center|thumb|372x372px|Configuration options]] | ||
<br /> | <span /><span /><br /> | ||
==Tags== | ==Tags== | ||
Line 27: | Line 27: | ||
===Manual page breaks=== | ===Manual page breaks=== | ||
You can insert the following tag on a wiki page anywhere you want to force a manual page break in the PDF:<syntaxhighlight lang="text"> | You can insert the following tag on a wiki page anywhere you want to force a manual page break in the PDF:<syntaxhighlight lang="text"> | ||
<bs:uepagebreak | <bs:uepagebreak /> | ||
</syntaxhighlight>In visual editing mode, a marker is displayed where the page breaks have been inserted. | </syntaxhighlight>In visual editing mode, a marker is displayed where the page breaks have been inserted. | ||
<br /> | <span /><span /><br /> | ||
[[File:pdf-pagebreak-marker.png|center|thumb|750x750px|Marker for page breaks in visual editing mode|link=Special:FilePath/pdf-pagebreak-marker.png]] | [[File:pdf-pagebreak-marker.png|center|thumb|750x750px|Marker for page breaks in visual editing mode|link=Special:FilePath/pdf-pagebreak-marker.png]] | ||
<br /> | <br />To hide the page break marker in read mode, you can add the following rules to the page ''MediaWiki:Common.css'':<syntaxhighlight lang="css"> | ||
/*PDF-Seitenumbruch im Anzeigemodus ausblenden*/ | |||
.bs-universalexport-pagebreak {display:none} | |||
.ve-init-mw-desktopArticleTarget-originalContent .bs-universalexport-pagebreak {display:block;} | |||
</syntaxhighlight> | |||
=== Landscape printing === | === Landscape printing === | ||
To print a PDF page in landscape format, the following tag can be inserted in the wiki page in source editing mode at any position: | To print a PDF page in landscape format, the following tag can be inserted in the wiki page in source editing mode at any position: | ||
Line 51: | Line 56: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<span><span /><br /></span> | |||
Example''': Changing background, header, and footer settings''' | Example''': Changing background, header, and footer settings''' | ||
Line 61: | Line 66: | ||
.no-header-image #bs-runningheaderfix { background:none;} /*removes the PDF header*/ | .no-header-image #bs-runningheaderfix { background:none;} /*removes the PDF header*/ | ||
.no-footer-text #bs-runningfooterleft, .no-footer-text #bs-runningfootercenter, .no-footer-text #bs-runningfooterright { display:none;} /*removes the text from the PDF footer*/ | .no-footer-text #bs-runningfooterleft, .no-footer-text #bs-runningfootercenter, .no-footer-text #bs-runningfooterright { display:none;} /*removes the text from the PDF footer*/ | ||
</syntaxhighlight>Compare the page before inserting the tag and after inserting the tag: <br /> | </syntaxhighlight>Compare the page before inserting the tag and after inserting the tag: <span /><span /><br /> | ||
<gallery widths="250" heights="400"> | <gallery widths="250" heights="400"> | ||
File:Manual:250px-pdf-class-output-vorher.png | File:Manual:250px-pdf-class-output-vorher.png | ||
Line 88: | Line 93: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<span><span /><br /></span> | |||
A block element or an inline element can now be created for the PDF export. This content is not rendered on the wiki page in display mode. Source code examples: | A block element or an inline element can now be created for the PDF export. This content is not rendered on the wiki page in display mode. Source code examples: | ||
<span class="p" style="box-sizing: inherit;"><</span><span class="nt" style="color: rgb(0, 128, 0)">div</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"only-pdf"</span><span class="p" style="box-sizing: inherit;">></span>This block is only shown in the PDF.<span class="p" style="box-sizing: inherit;"></</span><span class="nt" style="color: rgb(0, 128, 0)">div</span><span class="p" style="box-sizing: inherit;">></span> | <span class="p" style="box-sizing: inherit;"><</span><span class="nt" style="color: rgb(0, 128, 0)">div</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"only-pdf"</span><span class="p" style="box-sizing: inherit;">></span>This block is only shown in the PDF.<span class="p" style="box-sizing: inherit;"></</span><span class="nt" style="color: rgb(0, 128, 0)">div</span><span class="p" style="box-sizing: inherit;">></span> | ||
The adjective <span class="p" style="box-sizing: inherit;"><</span><span class="nt" style="color: rgb(0, 128, 0)">span</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"no-pdf"</span><span class="p" style="box-sizing: inherit;">></span>beautiful<span class="p" style="box-sizing: inherit;"></</span><span class="nt" style="color: rgb(0, 128, 0)">span</span><span class="p" style="box-sizing: inherit;">><</span><span class="nt" style="color: rgb(0, 128, 0)">span</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"only-pdf"</span><span class="p" style="box-sizing: inherit;">>small</</span><span class="nt" style="color: rgb(0, 128, 0)">span</span><span class="p" style="box-sizing: inherit;">></span> is shown differently on the page and in the PDF. | The adjective <span class="p" style="box-sizing: inherit;"><</span><span class="nt" style="color: rgb(0, 128, 0)">span</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"no-pdf"</span><span class="p" style="box-sizing: inherit;">></span>beautiful<span class="p" style="box-sizing: inherit;"></</span><span class="nt" style="color: rgb(0, 128, 0)">span</span><span class="p" style="box-sizing: inherit;">><</span><span class="nt" style="color: rgb(0, 128, 0)">span</span> <span class="na" style="color: rgb(125, 144, 41)">class</span><span class="o" style="color: rgb(102, 102, 102)">=</span><span class="s" style="color: rgb(186, 33, 33)">"only-pdf"</span><span class="p" style="box-sizing: inherit;">>small</</span><span class="nt" style="color: rgb(0, 128, 0)">span</span><span class="p" style="box-sizing: inherit;">></span> is shown differently on the page and in the PDF. | ||
<br /> | |||
== Do not display the page TOC in the PDF == | |||
If you do not want the table of contents from the wiki pages displayed in the exported PDF (single page export or book export), you can enter the following CSS on the page ''MediaWiki:Common.css'' . This will exclude the table of contents of all pages in the book from the export. | |||
/* Remove page toc in pdf */ | |||
.bs-page-content .toc { display: none !important; } | |||
It is also possible to suppress the table of contents at the beginning of the PDF when exporting a book: | |||
/* Remove book toc in pdf */ | |||
.bs-tableofcontentspage .toc { display: none !important;}<br /> | |||
<span /><span /> | |||
==<span class="mw-headline" id="Darstellung_von_Email-Adressen">Display of email addresses</span>== | ==<span class="mw-headline" id="Darstellung_von_Email-Adressen">Display of email addresses</span>== | ||
If an email link has an additional label on a wiki page, the email address will be listed separately in the PDF after the link label. | If an email link has an additional label on a wiki page, the email address will be listed separately in the PDF after the link label. | ||
<br /> | <span /><span /><br /> | ||
[[File:Manual:750px-pdf-email-wikipage-EN.png|link=link=Special:FilePath/pdf-email-wikipage-EN.png|alt=|center|thumb|479x479px|Email link on wiki page]] | [[File:Manual:750px-pdf-email-wikipage-EN.png|link=link=Special:FilePath/pdf-email-wikipage-EN.png|alt=|center|thumb|479x479px|Email link on wiki page]] | ||
<br /> | <span /><span /><br /> | ||
[[File:Manual:750px-pdf-email-output-EN.png|link=link=Special:FilePath/pdf-email-output-EN.png|alt=|center|thumb|478x478px|PDF link in PDF output]] | [[File:Manual:750px-pdf-email-output-EN.png|link=link=Special:FilePath/pdf-email-output-EN.png|alt=|center|thumb|478x478px|PDF link in PDF output]] | ||
<br /> | <span /><span /><br /> | ||
==Printing== | ==Printing== | ||
MediaWiki, by default, provides a print view for the pages. This command is also available in the ''Export'' menu (option ''Print''). | MediaWiki, by default, provides a print view for the pages. This command is also available in the ''Export'' menu (option ''Print''). |
Latest revision as of 15:50, 2 December 2024
BlueSpiceUniversalExport allows exporting wiki pages to various formats. It incorporates various modules, each serving as exporter for a particular export type.
Every content page on the wiki can be exported. Export fuctions are located in the general page tools under the menu item Export. The available export options depend on your wiki configuration. Clicking one of the links downloads the page content in the selected format.
Configuration
Configuration of UniversalExport (and its modules) can be done in the Config manager in the Export section. Available settings include:
- Table of contents: only applies to exporting books. Select how the ToC should be constructed (as a ToC for the entire book or for each page individually).
- Hide namespace prefix in HTML: removes namespace prefixes when displaying page titles in HTML exports.
- Hide namespace prefix in PDF: removes namespace prefixes when displaying page titles in PDF exports.
- Metadata (standard, JSON) : additional data to be passed to the rendering template in JSON format. This data will be avalible for usage in the template (advanced users).
- Metadata (override, JSON): offers overriding standard data sent to the rendering template. Values that are set by default can be overriden by using this option (JSON format) (advanced users).
Tags
If the following tags are included in a page, they are usually applied both to the PDF book export and to the PDF single page export unless otherwise noted.
Manual page breaks
You can insert the following tag on a wiki page anywhere you want to force a manual page break in the PDF:
<bs:uepagebreak />
In visual editing mode, a marker is displayed where the page breaks have been inserted.
To hide the page break marker in read mode, you can add the following rules to the page MediaWiki:Common.css:
/*PDF-Seitenumbruch im Anzeigemodus ausblenden*/
.bs-universalexport-pagebreak {display:none}
.ve-init-mw-desktopArticleTarget-originalContent .bs-universalexport-pagebreak {display:block;}
Landscape printing
To print a PDF page in landscape format, the following tag can be inserted in the wiki page in source editing mode at any position:
<bs:ueparams template="BlueSpice_Landscape" />
To make it easier for the user to add this tag with the visual editor, this tag can be added to a wikitext-template, for example, {{LandscapeFormatExport}}
. The element can be inserted anywhere on the page.
Within a wiki page, individual areas can be marked separately (e.g. wide tables). This way, the output in the export can be landscape or extra-wide. This is possible using the following css classes:
- "bs-rotated" -> landscape format
- "bs-narrow" -> 0,33 x A4 portrait
- "bs-ultrawide" -> 2 x A4 landscape
These classes can also be combined. Example:
<div class="bs-rotated bs-ultrawide">...</div>
The start and end div tags can also be added to templates (e.g., {{LandscapeStart}}
and {{LandscapeEnd}}
) to allow users to insert the tags using the visual editor.
These css classes also work for the book export.
PDF-specific styling
To style classes or IDs only in the PDF output, you can include the following tag at the beginning of a page:
<bs:uemeta body-class=class-name-here/>
Example: Changing background, header, and footer settings
- Insert the tag
<bs:uemeta body-class=bg-grey bg-yellow no-header-image no-footer-text/>
at the top of your wiki page. - To define the page background, add the following CSS to
MediaWiki:Common.css
ein (admin rights needed):Compare the page before inserting the tag and after inserting the tag:/*PDF output*/ .bg-grey { background-color:#EDEDED !important;} /*sets the page background. There will be a white margin around it.*/ .bg-yellow .bs-page-content { background-color:#F7F0C6; padding:10px;} /*sets the background color for the content and adds padding*/ .no-header-image #bs-runningheaderfix { background:none;} /*removes the PDF header*/ .no-footer-text #bs-runningfooterleft, .no-footer-text #bs-runningfootercenter, .no-footer-text #bs-runningfooterright { display:none;} /*removes the text from the PDF footer*/
Exclude content from PDF export
To exclude the content of a page from the PDF export, it can be inserted via the visual editor under Insert> No PDF. The text is then marked accordingly in the source text:
<bs:uenoexport>Dieser Text wird nicht ins PDF exportiert.</bs:uenoexport>
Show content in PDF only
If content should only be displayed in the PDF, but not on the wiki page, this content can be marked manually via the source text. First, a wiki administrator needs to add the following code to the page MediaWiki: Common.css:
.bs-page-content .no-pdf {
display: none;
}
.bs-page-content div.only-pdf {
display:block;
}
.bs-page-content span.only-pdf {
display:inline;
}
.only-pdf {
display: none;
}
A block element or an inline element can now be created for the PDF export. This content is not rendered on the wiki page in display mode. Source code examples:
<div class="only-pdf">This block is only shown in the PDF.</div> The adjective <span class="no-pdf">beautiful</span><span class="only-pdf">small</span> is shown differently on the page and in the PDF.
Do not display the page TOC in the PDF
If you do not want the table of contents from the wiki pages displayed in the exported PDF (single page export or book export), you can enter the following CSS on the page MediaWiki:Common.css . This will exclude the table of contents of all pages in the book from the export.
/* Remove page toc in pdf */ .bs-page-content .toc { display: none !important; }
It is also possible to suppress the table of contents at the beginning of the PDF when exporting a book:
/* Remove book toc in pdf */ .bs-tableofcontentspage .toc { display: none !important;}
Display of email addresses
If an email link has an additional label on a wiki page, the email address will be listed separately in the PDF after the link label.
Printing
MediaWiki, by default, provides a print view for the pages. This command is also available in the Export menu (option Print).
- Metadata (standard, JSON): Additional data to be passed to the rendering template in JSON format. This data can be used in the export template. The template itself is maintened server-side.
- Metadata (override, JSON): Allows overriding standard data sent to the rendering template in JSON format. Values that are set by default can be overriden with this option.
Modules
The extension BlueSpiceUniversalExport contains several modules:
- BlueSpiceUEModulePDF: module for exporting pages in PDF (.pdf) format. It downloads the current page (PDF single page), the current page including all its subpages (PDF page with subpages), or the current page and the pages that are linked from that page (PDF page with linked pages).
- BlueSpiceUEModuleHTML: module for exporting pages as an html zip-archive (option HTML single page).
- BlueSpiceUEModuleBookPDF: module for exporting books.