icCube

Documentation

Printing

Printing a report is about adding an action (e.g., a button) within the report. This action has to generate the ' ic3-print-report ' event. Note that a ' single page ' report only is supported for the time being.

Hiding a Widget When Printing

Use the ' No Print ' advanced configuration property to hide widgets when printing.

Note that hiding a widget is internally performed using the CSS class ' ic3-no-print ' that is added to the widget. When printing, the ' body ' element has the ' ic3-print ' CSS class set.

Server Configuration

The printing support is activated and configured on the server side with the ' printComponentConfiguration ' section in the icCube.xml file. Note that section is de-activated by default. As this section is self documented please refer to the actual file for up to date information.

Paper Sizes

Available paper size are configured within this section as well. Here are for example the definition of A4 and Letter formats:


            <paperSize name="A4" width="210mm" height="297mm"/>
            <paperSize name="Letter" width="8.5in" height="11in"/>
    

The underlying WebKit engine might need some tweak to setup the actual zoom and DPI configuration to ensure the report is fully printed within the page using the whole available space (www). Those settings are depending on the operating system configuration. Here is for example the settings for Windows and Linux machines :


            <fix os="windows" zoom="1" dpi="96"/>
            <fix os="linux" zoom="0.78"/>
            <fix os="mac" zoom="0.78"/>
    

The Web Reporting administration menu (top right corner) contains a ' Print Test Page ' item to help you setup those values if the default configuration does not work properly for your actual installation. Do not hesitate to contact us if you need more details.

wkhtmltopdf

icCube is using wkhtmltopdf as its printing engine. So you'll need first to download and install it. Please refer to this project's page for more information.

Note that on Linux machine with no X/Server installed (more likely for cloud/server installations) you might need to install XRender and Font Config as well. Here are the command lines for Ubuntu/Debian machines:


        sudo apt-get install libxrender1
        sudo apt-get install libfontconfig1
    

It is more likely as well that you would need the Microsoft Core Fonts. Here is a page explaining how to do that : www.