Printing

PDF printing

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 enable 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)

Enhanced PDF printing experience

In earlier versions, when you try to print a PDF, a Continue print dialog appeared, prompting your confirmation to print.

Now, the Print window appears within your Citrix Workspace app session. You can directly print the document from the Print window.

This enhancement is fully supported and enabled by default in Chrome and Firefox. To disable it in Chrome and Firefox, 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.

This enhancement is partially supported in Internet Explorer 11 with some known limitations, and disabled by default. To enable this feature in Internet Explorer, set the value of IE to true in the configuraton.js file. The configuration.js file is located under C:\program Files\Citrix<actual path>\HTML5Client.

    'pdfPrinting' : {
                  'directPrint' : {


     'supportedBrowsers':true,


                                          'IE':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:

  • In Internet Explorer, the content of a printed PDF is scaled down and doesn’t fit the page.
  • In Internet Explorer, when you print a large file or a file with many pages, the browser might stop responding or the print operation might fail intermittently.
  • 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: Internet Explorer, Google Chrome, Firefox, 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 ‘MSIE’, ‘Chrome’, ‘FIREFOX’, ‘SAFARI’, ‘CHROMIUMEDGE’, or ‘MSEDGE’.
    'pdfPrinting' : {
        'disableForBrowsers' : ['All']

    or

        'disableForBrowsers' : ['MSIE', 'Chrome', ‘CHROMIUMEDGE’, 'MSEDGE']

                    }

<!--NeedCopy-->

The following describes each of the values in detail:

  • ‘MSIE’: All the versions of Internet Explorer
  • ‘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
Printing