Cookie consent settingsAccept all
  • Skip to header bar
  • Skip to main navigation
  • Skip to page tools
  • Skip to work area
  • New process
  • Overview
    • Files
    • Processes
    • Ratings
    • Recommendations
    • WikiExplorer
    • Workflows
  • Login
Main navigation contains tabs, main links and MediaWiki sidebar
Entrypoints
  • Main Page
  • Pages
  • Books
  • Blogs
  • Recent changes
Quick Links
  • All topics
  • Video-Tutorials
  • Templates download
Documentation
  • Security Advisories
  • Installation
  • Releases
  • Software catalog
  • Trust & Safety
Books
  • User manual
  • Admin manual
  • Semantic MediaWiki basics
Participate
  • BlueSpice community
You are viewing an old version of this page. Return to the latest version.
This is the version of 1 February 2024, 11:29 by Redaktion
PreviousNext
  • Manual
  • Extension
    • BlueSpiceUniversalExport
      • PDF templates
      Last edited one year ago
      by Redaktion

      PDF templates

      • Deutsch
      Revision as of 11:29, 1 February 2024 by Redaktion (talk | contribs)
      (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

      If you have server access, you can customize the PDF templates for your wiki. If your wiki is hosted in the BlueSpice cloud, basic customizations can be made directly in the wiki. These instructions refer to the PDF single page export and the book export. Please note that the book export is only available inBlueSpice pro.

      Contents

      • 1 Directory paths for templates
        • 1.1 Standard BlueSpice templates
        • 1.2 Safe directories for your own templates
      • 2 Editing the templates
        • 2.1 Creating your own templates
        • 2.2 Directory structure of the templates
        • 2.3 Customization of the templates
          • 2.3.1 template.php
          • 2.3.2 template.html
        • 2.4 Customization of the style sheets
      • 3 Configuring the templates

      Directory paths for templates

      Standard BlueSpice templates

      • Common: extensions/BlueSpiceUEModulePDF/data/PDFTemplates/common
      • Single page: extensions/BlueSpiceUEModulePDF/data/PDFTemplates/BlueSpice
      • Book: extensions/BlueSpiceUEModuleBookPDF/data/PDFTemplates/BlueSpice Book
      The Common directory contains common files such as page.css that defines the page margins.


      Safe directories for your own templates

      The PDF templates may not be customized in the directories mentioned above. An update will overwrite the changes!

      Examples of safe directories:

      • extensions/<MyPDFTemplates>
      • skins/<MyPDFTemplates>
      • images/<MyPDFTemplates>
      • extensions/BlueSpiceFoundation/data/PDFTemplates

      Editing the templates

      The PDF templates for single pages and books are very similar.

      Creating your own templates

      The contents of the directories

      • extensions/BlueSpiceUEModulePDF/data/PDFTempates
      • extensions/BlueSpiceUEModuleBookPDF/data/PDFTempates

      Copy to "extensions/BlueSpiceFoundation/data/PDFTemplates" and rename it

      • "common" => "common" (remains)
      • "BlueSpice" => "MyPageTemplate"
      • "BlueSpice Book" => "MyBookTemplate"

      The template names must be changed later in the associated template.php.

      Directory structure of the templates

      data/PDFTemplates
          |_ common
          |     |_ stylesheets (page.css -> Settings for page margins)
          |
          |_ MyPageTemplate
          |     |_ template.php
          |     |_ template.html
          |     |_ images
          |     |_ stylesheets (styles.css -> Logo in Page Header)
          |
          |_ MyBookTemplate
                |_ template.php
                |_ template.html
                |_ images
                |_ stylesheets (styles.css -> Logo in Page Header)
      

      Customization of the templates

      template.php

      The file template.php contains the description or definition of the template. All css files and, if applicable, fonts that are to be used in the template must be specified here.

      The images must also be specified, for example the images that should be used in the header.


      Special requirements for the book:

      The PDF template for the book accesses the common directory of the single page template. For this reason, the template.php contains a variable $sCommonDir that points to the directory. If the templates are copied into their own directory, this path must be adjusted.


      Important changes in the sections:

      Section info:

      • name => name of the template (e.g. MyPageTemplate). MUST match the directory name

      Section resources:

      • STYLESHEETS => if necessary, specify additional style sheets here. These must also be specified in the template.html. If you use other fonts, they must also be specified here.
      • IMAGES => enter the images you want to use here. Example 'images/bs-header.jpg'

      Section messages:

      • Here, texts can be assigned to so-called msg keys. These msg keys can be used in the template.html, e.g. the disclaimer.
      • en, de, de-formal are the languages. Unlike texts written in template.html, these msg keys are used depending on the language.

      template.html

      Basic structure of the page. Here, the page number, for example, can be removed from the footer. If you want to include your own css files, they must be specified here in the <head>.

      Example:

       <link href="stylesheets/styles.css" type="text/css" rel="stylesheet" />
      

      Customization of the style sheets

      The display can be changed in the style sheets. This concerns e.g.

      • Margins
      • Header with logo
      • Headings
      • Text colors
      • ...


      The most important examples:

      Page margins:

      File: common/stylesheets/page.css

      The @page area is the normal page in portrait format. The page margins are set in the "margin" line (order: top right bottom left).


      Background image:

      File: common/stylesheets/page.css

      The @page area is the normal page in portrait format. The background image is set in the “background” line.

      The background image must be specified in the template.php. (Only used for the single page at BlueSpice.)


      Header (logo):

      File: MyPageTemplate/stylesheets/page.css

      or

      File: MyBookTemplate/stylesheets/page.css

      With #bs-runningheaderfix, the logo for the header is set in the "background" line.

      The logo must be specified in the template.php.

      The size of the header and logo can be influenced with the parameters “margin”, “background-size” and “height”. The “width” line should remain at 21cm (entire page width).

      Configuring the templates

      PDF templates cannot be configured via the Wiki.

      The following lines must be added to LocalSettings.php:

      • Example for single page:
       $GLOBALS['bsgUEModulePDFTemplatePath'] = 'extensions/BlueSpiceFoundation/data/PDFTemplates';
       $GLOBALS['bsgUEModulePDFDefaultTemplate'] = 'MyPageTemplate';
      
      • Example for book:
       $GLOBALS['bsgUEModuleBookPDFTemplatePath'] = 'extensions/BlueSpiceFoundation/data
      



      PDF exclude - start

      To submit feedback about this documentation, visit our community forum.

      PDF exclude - end
      Retrieved from "https://en.wiki.bluespice.com/w/index.php?title=Manual:Extension/BlueSpiceUniversalExport/PDF_templates&oldid=8130"
      No categories assignedEdit
      Page actions and tools navigaiton contains tabs, toolbox and actions
      Actions
      • Refresh
      • Copy URL
      • E-Mail
      • QR code
      Details
      • View history
      • Page information
      • Browse properties
      • ... all actions
      • Privacy policy
      • Terms of service
      • Disclaimer
      • Imprint
      • Accessibility
      • About
      • Analysis service
      • Edit preview settings
      • Powered by MediaWiki
      • Powered by BlueSpice
      • Powered by Semantic MediaWiki
      • Creative Commons License