Difference between revisions of "Manual:Extension/BlueSpiceUniversalExport"

[unchecked revision][quality revision]
(Tag: 2017 source edit)
 

Contents

1 What is


BlueSpiceUniversalExport

?
  • 2 Exporting pages
  • 3 Modules
  • 4 Configuration
  • 5 Printing from Export menu
  • 6 Related info
  • What is BlueSpiceUniversalExport?[edit | edit source]

    BlueSpiceUniversalExport allows for exporting wiki page content pages to various formats. It incorporates various modules, each serving as exporter for a particular format or type of export.

    Exporting pages

    export type.

    The export menu[edit | edit source]

    Export options

    Every content page on the wiki is exportablecan be exported. Export fuction can be found in the right navigation, under "Tools" tab (wrench icon). In "Export" section of this tab, all availble export formats can be found. Particular set of formats available depends on the 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 provided options will download links downloads the page content in the selected format.


    Export options
    Export options

    Modules[edit | edit source]

    As mentined above, The extension BlueSpiceUniversalExport contains several modules:

    • BlueSpiceUEModulePDF - : module for exporting pages in PDF (.pdf) format. It offers downloading single page that is currently being viewed (option downloads the current page (PDF single page), or the current page including all its subpages (option 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 in HTML format as an html zip-archive (option HTML single page).
    • BlueSpiceUEModuleBookPDF - : module for exporting books. This module is only availble if BlueSpiceBookmaker is installed. It provides exporting exports entire books in PDF format (available from BookManagerin the Book Manager).

    Configuration[edit | edit source]

    Configuration options

    Configuration of BlueSpiceUniversalExport UniversalExport (and its modules) can be done using BlueSpiceConfigManager. BlueSpiceUniversalExport and each of the modules provide separate entries in list of extensionsin the Config manager in the Export section. Available settings include:

    • Table of content - provided by BlueSpiceUEModuleBookPDF export and therefore contents: only applies to exporting books. Select how the ToC should be constructed (as a ToC for the entire book or by for each page individualyindividually).
    • Hide namespace prefix in HTML - should : removes namespace prefixes be shown when displaying page titles in HTML exports.
    • Hide namespace prefix in PDF - should : removes namespace prefixes be shown 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).

    Printing from Export menu[edit | edit source]

    MediaWiki by default provides
    Configuration options
    Configuration options

    Tags[edit | edit source]

    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 brea[edit | edit source]

    You can insert the following tag on a wiki page anywhere you want to force a manual page break in the PDF:
                        <bs:uepagebreak ></div>
    
                    
    In visual editing mode, a marker is displayed where the page breaks have been inserted.


    Marker for page breaks in visual editing mode
    Marker for page breaks in visual editing mode


    Landscape printing[edit | edit source]

    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.

    Note: This tag only works for the PDF single page export.

    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.

    Note: Display of header and footer areas could be problematic when using these tags.

    These css classes also work for the book export.

    PDF-specific styling[edit | edit source]

    Important! The tag is only taken applied in the single page export (including linked pages and subpages). The tag from individual pages is ignored in the book export. The tag can, however, be inserted on the corresponding book page in the Book: namespace and is then applied to all pages in the book.

    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

    1. Insert the tag <bs:uemeta body-class=bg-grey bg-yellow no-header-image no-footer-text/> at the top of your wiki page.
    2. To define the page background, add the following CSS to MediaWiki:Common.css ein (admin rights needed):
                                  /*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*/
      
                              
      Compare the page before inserting the tag and after inserting the tag:

    Exclude content from PDF export[edit | edit source]

    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[edit | edit source]

    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.
    
                


    Display of email addresses[edit | edit source]

    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.

    Email link on wiki page
    Email link on wiki page


    PDF link in PDF output
    PDF link in PDF output


    Printing[edit | edit source]

    MediaWiki, by default, provides a print view for the pages. This command is also availble from "Export" available in the Export menu (option "Print").


    Related info


    Attachments

    Discussions