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 9 June 2023, 07:47 by Redaktion
PreviousNext
  • Setup
  • Installation Guide
    • Advanced
      • Maintenance scripts
        • CreatePDF
        Last edited 2 weeks ago
        by Redaktion

        CreatePDF

        Revision as of 07:47, 9 June 2023 by Redaktion (talk | contribs)
        (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

        Contents

        • 1 Running the script
        • 2 Creating a page list for the export
        • 3 Setting up a CronJob

        Running the script

        The script to export wiki pages to PDF is executed from:

        php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file=spec.json
        

        The specification file spec.json can have the following content:

        {
            "module": "pdf",
            "attachments": 1,
            "recursive": 1,
            "title": "MyPDF",
            "target": "localfilesystem",
            "target-file-name": "All.pdf",
            "target-file-path": "/path/to/target-file"
        }
        
        Key Value Description
        module pdf Output type
        attachments 1

        0

        Attachments will be included in the export
        recursive 1

        0

        Linked pages (one level deep) will be included.
        title string Title of the wiki page that contains the list of pages to be exported. The pages need to be links.
        target localfilesystem
        target-file-name Name of the exported PDF file
        target-file-path Target file location

        Creating a page list for the export

        The export list is defined in the wiki page that is shown as the title in the json-file. (In the example above, this is the page MyPDF .)

        The page MyPDF now needs to list all pages that will be exported to PDF.

        This list can be created with an SMW inline query (BlueSpice free) or with a DPL3 list (BlueSpice free). Example of an SMW query to create an export for all pages in the categories Process and Work instruction:

        You would add the following to your MyPDF page in the wiki:

        ==All processes==
        {{#ask:[[Process:+]]|format=ul|limit=99999}}
        
        ==All work instructions==
        {{#ask:[[Work instruction:+]]|format=ul|limit=99999}}
        

        The same list can be created with the following DPL3 syntax:

        ==All processes==
        {{#dpl:category=Process}}
        
        ==All work instructions==
        {{#dpl:category=Work instruction}}
        

        Setting up a CronJob

        To automate the export, the following CronJob is available:

        php {MW_ROOT}/extensions/BlueSpiceUniversalExport/maintenance/export.php --specification-file={MW_ROOT}/extensions/BlueSpiceFoundation/data/spec.json
        



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

        Retrieved from "https://en.wiki5.bluespice.com/w/index.php?title=Setup:Installation_Guide/Advanced/Maintenance_scripts/CreatePDF&oldid=6247"
        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
        • Edit preview settings
        • Powered by MediaWiki
        • Powered by BlueSpice
        • Powered by Semantic MediaWiki
        • Creative Commons License