Jul 2, 2018

    Set Printer Version to Use mode 2

    Canvas v3 introduced a new printer version. By default, Canvas will now use this new printer version but if you prefer to go back to the first version of the printing you can change the printer version in your application Admin section:

    Printer version mode 1 is the native printing version (Canvas v2 and previous versions) and Printer version 2 is the new printer.

    This new printer is much faster and support better Canvas charts. It uses in the backend Headless Chromium. This printer version comes with a set of new parameters which you can find in the WEB-INFconfigsettings.json file:

    • printerPath – location of the Chromium executables.

    • printerOnPageNavigationWaitForKeyword – keyword it waits from the printer engine to indicate completion of rendering of a web page. Default is ‘networkIdle‘.

    • printerPauseBeforePrint – timeout before issuing the request to generate the PDF.

    • printerPauseBeforeShutdown – On closing down the printer engine, sometimes it will need a longer wait time to wrap up and execute other clean up tasks. Default for this is 500ms.

    • printerPollerInterval – interval in millisecond to check for incoming messages from Chromium.

    • printerPollerIntervalMaxRetry – number of times the poller will try to check for incoming messages assuming a certain keyword has not been received yet.

    • printerScale – as per Chrome Print PDF settings, this is 50. But you can change it up to 200.

    • printerStartingPort – the starting port where Chromium can listen too. The number of instances that will be launch needs to have a unique port.

    • printerMaxInstance – the port that will be used will be incremented until this count has been reached. If you have port 9000 as set in printerStartingPort for example and you have in here a value of 10, then it means first instance will have 9000 as port, then 9001, and so on. What this is also means is that there can only be this printerMaxInstance value running at a time.

    • printerMaxPageSizeInMB – Maximum size, in MB, which helps the printer engine in allocating memory on the expected PDF output.

    • printerBaseUrl – if provided, this will be used to get the protocol and the host to use for accessing Chromium. Default is localhost.

    Related content

    Loading related content