Printing

PDF printing

Enhanced PDF printing experience

The Citrix PDF Universal Printer driver enables users to print documents that are opened with hosted applications. Many a times it can be applications that run on virtual desktops delivered by Citrix Virtual Apps and Desktops. When a user selects the Citrix PDF Printer option, the driver converts the file to PDF and transfers the PDF to the local device. To print the document, the Print dialog box appears within your Citrix Workspace app session.

Note:

This enhancement is fully supported and enabled by default in the Google Chrome and Mozilla Firefox browsers.

To disable it in the Google Chrome and Mozilla Firefox browsers, set the value of supportedBrowsers to false in the configuration.js file. The configuration.js file is located under C:\program Files\Citrix\<actual path>\HTML5Client.

    'pdfPrinting' : {
        'directPrint' : {
           'supportedBrowsers':false,
                }
            }
<!--NeedCopy-->

Optimized resolution

In earlier versions, content in a document appeared blurry when you attempted to print the document using the Citrix PDF printer.

We now introduce optimizations to improve the user experience. The printResolution value defaults to 150. Also, for crisper content, you can change the value in the configuration.js file to 300 or 600 depending on your requirement:

    'pdfPrinting' : {
        'directPrint' : {
            'printResolution' :150 }
    }
<!--NeedCopy-->

Limitations:

This enhancement isn’t supported for sessions that are launched through the HTML5 HDX SDK.

To suppress the Continue print dialog

When the enhanced printing experience feature is disabled, you can print a PDF by suppressing the appearance of the Continue print dialog.

By default, the printDialog property of the hide object is set to false.

The configuration.js file is located under C:\program Files\Citrix\<actual path>\HTML5Client.

To print, set the printDialog property of the hide object to true.

Note:

  • Citrix recommends that you back up the configuration.js file before modifying it.
  • Citrix recommends using this method only if Citrix Workspace app for HTML5 is repackaged for users.
  • Administrator-level credentials are required to edit the configuration.js file; after editing the file, repackage the app for the changes to take effect.
    {
       'ui' : {
         'hide':{
            'printDialog': true
         }
       }
     }
<!--NeedCopy-->

Blocking PDF printing

As an administrator, you can now block PDF printing on the following browsers across platforms: Google Chrome, Mozilla Firefox, Apple Safari, and Microsoft Edge (including Microsoft Edge Chromium).

By default, PDF printing is allowed across all browsers. To prohibit PDF printing, follow these steps:

  1. Navigate to the configuration.js file, available at C:\Program Files\Citrix\Receiver StoreFront\HTML5Client.
  2. Edit that file and set the value of disableForBrowsers to ‘ALL’.

    • To disable PDF printing on specific browsers, set the value of disableForBrowsers to ‘Chrome’, ‘FIREFOX’, ‘SAFARI’, ‘CHROMIUMEDGE’, or ‘MSEDGE’.
    'pdfPrinting' : {
        'disableForBrowsers' : ['All']
    }
<!--NeedCopy-->

or

    'pdfPrinting' : {
        'disableForBrowsers' : ['Chrome', 'CHROMIUMEDGE', 'MSEDGE']
                    }
<!--NeedCopy-->

The following describes each of the values in detail:

  • ‘MSEDGE’: All the versions of Microsoft Edge
  • ‘CHROMIUMEDGE’: All the versions of Microsoft Edge Chromium
  • ‘Chrome’: All the versions of Google Chrome
  • ‘FIREFOX: All the versions of Firefox
  • ‘SAFARI’: All the versions of Safari

To configure PDF printing

Note:

The following section explains the old behaviour about how to configure PDF printing.

The Citrix PDF Universal Printer driver enables users to print documents that are opened with hosted applications. Many a times it can be applications that run on virtual desktops delivered by Citrix Virtual Apps and Desktops. When a user selects the Citrix PDF Printer option, the driver converts the file to PDF and transfers the PDF to the local device. You can now open the PDF in a new browser tab to view and print from a locally attached printer.

If you want to Auto‑create PDF Universal Printer users to print documents that are opened with hosted applications or applications that run on virtual desktops delivered by Citrix Virtual Apps and Desktops, do the following:

  1. In Citrix Studio, select the Policy node in the left pane and either create a policy or edit an existing policy. For more information about configuring Citrix Virtual Apps and Desktops policies, see Policies.
  2. Set the Auto-create PDF Universal Printer policy setting to Enabled.

Note:

When you use a Citrix PDF printer in a session launched from Citrix Workspace app for HTML5, set the Client printer names setting as default or select Standard printer names. Select Legacy printer names to use old-style client printer names and to preserve backward compatibility with legacy printer names as present in the Citrix Virtual Apps and Desktops of the product. You can use this option with the current Citrix Virtual Apps and Desktops and Citrix DaaS versions of the product.

To configure with the CSP header added

PDF printing works, unless a Content-Security-Policy (CSP) header is added for users.

The CSP response header is a combination of policies that a browser uses to avoid Cross-site scripting attacks.

If the CSP header is added to Citrix Gateway Rewrite Policies, PDF printing doesn’t work.

Configure as follows:

img-src \'self\' data: blob:

(blob: This parameter allows print preview to load and continue with printing functionality)

Printing