Web Print (Driver-less printing via a web browser)

Web Print is a driver-less printing service that allows users to print by uploading documents from a web browser. No client software or driver installation is required. Web Print provides a simple way to enable printing for laptop, wireless and anonymous users without the overhead of installing printer drivers and managing server authentication.

The recent growth in popularity of laptops and other small devices such as Netbooks and smart phones is changing the landscape of network printing. Where it was previously normal to only allow printing from in-house systems there is now a growing need to support casual printing from user-owned devices. Providing users with information about how to configure these devices can be inconvenient and complicated due to issues such as drivers and authentication, and in some situations may not be possible at all.

Due to this complexity many organizations opt to simply disallow printing from user-owned systems. A common workaround in these environments is for users to send themselves a document (e.g. via email, on a USB drive) and print from an in-house system. Web Print works in a similar way: it allows a user to upload their file to an in-house system (known as a Web Print server) and have this system perform the printing on their behalf.

With Web Print users are authenticated when they log into the PaperCut NG end-user web interface. Any documents they upload can then be tracked against their user name. Users have access to the standard selection of features normally available for in-house printing, including access to shared accounts.

Web Print architecture overview

Figure 21.23. Web Print architecture overview

Key Features

Some of the key features of PaperCut's Web Print solution include:

  • Simple wizard style interface, accessed from any web browser.

  • Users authenticate with their regular (network / domain) logins.

  • 100% web based. No drivers, client software, or browser plugins required.

  • File uploads with progress indicator (in the style of GMail attachment uploads).

  • Supports popular document formats including PDF, DOC/DOCX (and other Microsoft Office Word formats), XLS/XLSX (and other Microsoft Office Excel Formats), PPT/PPTX (and other Microsoft Office PowerPoint formats), and Microsoft XPS (XML Paper Specification).

  • Users select printers from an auto-generated list or a clickable printer map, which can be designed or imported using open standards and free software.

Introduction to Web Print

Web Print works in two ways.

  • It can print PDF files directly.

  • It can also accept popular file formats and convert them to print jobs using common applications. This is done by orchestrating applications such as Adobe Reader TM, Microsoft Office TM and the Microsoft XPS Viewer as background server-side tasks. Using this approach ensures that maximum print compatibility and quality is maintained.

Important

Adobe Reader, Microsoft Office and XPS Viewer are not supplied with PaperCut. It is your responsibility to purchase and conform to the licensing requirements of any third party software.

Supported Applications and File Formats

The following table lists the applications that Web Print may use to render uploaded documents into print jobs. Before a file format can be accepted as an upload its supporting application must be installed.

Note that when running Web Print on Windows in default mode Microsoft Office applications are not available due to limitations in the applications. See the section called “Setting Up Web Print” for information about the difference between Default Mode and Sandbox Mode.

ApplicationFile Format(s)

Adobe Reader 9, Adobe Reader X (10)

PDF

Native (using Xpdf library)

Microsoft Office Excel 2007, 2010

XLS, XLSX, etc.

 

Microsoft Office PowerPoint 2007, 2010

PPT, PPTX, etc.

 

Microsoft Office Word 2007, 2010

DOC, DOCX, etc.

 

Microsoft XPS Standalone Viewer (Essentials Pack) - For more information please see the section called “XPS Viewer Installation Instructions”

XPS

 

Table 21.5. Web Print Supported Applications and File Formats

Security Considerations

Before setting up Web Print it is worth considering any security implications. Because Web Print allows any user with access to the PaperCut NG user web interface the ability to upload a document for printing, it naturally increases surface area for attack.

More specifically, security vulnerabilities that might usually be considered local because they are triggered by opening a document in a Microsoft Office application or Adobe Reader can become a remote vulnerability. This is because these same applications are used to render print jobs on the server after the user has uploaded their document.

Much of the security risk can be mitigated through security best practice, such as regularly applying security updates to the orchestrated applications. Organizations that are very security conscious may with to consider the sandbox approach. Sandboxing the Web Print server provides an extra layer of protection/isolation.

Setting Up Web Print

Web Print may be configured in one of three possible modes: Default Mode, Simple Mode or Sandbox Mode.

Default mode involves running the Web Print software on the same system as the PaperCut NG primary server and uses the built-in PDF renderer. It is the fastest and easiest way to get Web Print working. (See the section called “Web Print Default Mode Setup for Windows Servers (PDF Only)”.)

Simple Mode is similar to Default Mode, but uses Adobe Reader to render PDF documents. (See the section called “Web Print Simple Mode Setup for Windows Servers (PDF Only). Adobe Reader fidelity rendering”.)

Setting up Web Print in sandbox mode involves a sandboxed or virtualized system, isolated and dedicated to the task of processing Web Print jobs. Sandbox Mode takes a little more time to configure but offers several advantages, including improved security and more supported formats. (See the section called “Sandbox Mode Setup”.)

Primary Server TypeDefault ModeSandbox Mode

Microsoft Windows

Yes (PDF only)

Yes. All formats supported

Apple Mac

Yes (PDF only)

Yes. All formats supported

Linux running CUPS

Yes (PDF only)

Yes. All formats supported

Novell OES Linux

No. Default Mode not supported

Yes. All formats supported

Table 21.6. Web Print Setup Options (by platform)

Default Mode Setup

Default Mode involves running the Web Print software on the same system as the PaperCut NG primary server. It is the fastest and easiest way to get Web Print working. It is suitable for testing Web Print functionality or where only PDF support is required.

In Default Mode the Web Print software runs as a service (background process or daemon) that is responsible for watching a directory for documents (e.g. PDFs) submitted by users. When a new document is detected the background process opens the document and prints it.

Web Print Default Mode Setup for Windows Servers (PDF Only)

This section describes how to configure Web Print on the same Windows system as the PaperCut primary server. This is the fastest and easiest way to get Web Print up and running on a Windows system. Due to the inability of Microsoft Office or XPS Viewer applications to run as a system service, these file formats are only available on Windows when Web Print is configured in sandbox mode. See the section called “Sandbox Mode Setup” for more information.

Web Print Default Mode supporting printing of PDF documents is configured by default on on Windows systems. No additional configuration should be required.

Important

Check that the Web Print service is configured to be automatic startup in Windows Services and start it if necessary.

To confirm that everything is configured correctly, check the Web Print Status section under OptionsMobile & BYODWeb Print. The status should be listed as OK. The Web Print option will also need to be enabled on at least one printer. If there are any status issues, or if basic Web Print testing produces some errors, please consider these limitations/requirements:

  • The printers targeted for use in via Web Print must be configured as print queues on the Primary PaperCut Server.

  • If you wish to print to remote printers then the PaperCut NG Web Print server needs to run under a user account that has permission to access these printers.

    Create a new user account called webprint (or equivalent). If it is not possible to create a domain user or the system is not a member of a domain then create a local user account instead. The password for this account should be set to never expire. At a minimum this account needs access to all the printers you wish to print to.

  • The printers (as setup on the server) must have working compatible drivers.

  • Administrators may find the following log file useful in diagnosing issues: [app-path]/providers/web-print/[platform]/logs/web-print.log

Web Print Simple Mode Setup for Windows Servers (PDF Only). Adobe Reader fidelity rendering

This section describes how to configure Web Print on the same Windows system as the PaperCut primary server and print with Adobe Reader. It is possible to print without Adobe Reader (see the section called “Web Print Default Mode Setup for Windows Servers (PDF Only)”). You should use Simple Mode only if you specifically require Adobe Reader printing.

Simple Mode ensures that Web Print will produce the same printed pages as when printing from Adobe Reader. We are not aware of any visible differences in printed pages created by Web Print Default Mode and Adobe Reader but subtle differences may exist.

  1. Install the latest version of Adobe Reader on the system running PaperCut NG.

  2. The PaperCut NG Web Print server needs to run under a user account so that it has permission to access printers and use the locally installed Adobe Reader.

    1. Create a new user account called webprint (or equivalent). If it is not possible to create a domain user or the system is not a member of a domain then create a local user account instead. The password for this account should be set to never expire. At a minimum this account needs access to the printers and the ability to run local programs.

    2. Test Adobe Reader as the webprint user: Log into the PaperCut primary server as the newly created account. Open a number of different PDF files in Adobe Reader and print to several different printers, ensuring that all works as expected. IMPORTANT Make sure you permanently acknowledge any license agreement and customer experience program dialogs during this process.

      Adobe Reader X introduced a Protected Mode setting which prevents printing from the command interface used by Web Print. Web Print to Adobe Reader therefore requires the Protected Mode feature to be disabled and Web Print will automatically disable Protected Mode for your webprint user. (You may also disable Protected Mode manually by unchecking the Enable Protected Mode at startup setting in Adobe Reader under EditPreferences.)

    3. Test that the user has write access to [app-path]/server/data/web-print-hot-folder/, e.g. by creating a new empty text file in that folder.

    4. Log in as an administrator level user again.

      Open the Windows Services dialog (StartControl PanelAdministrative ToolsServices).

    5. Right-click the service named PaperCut Web Print Server and select Properties.

    6. From the Log On tab select This account: and enter the credentials for the newly created webprint service account.

    7. From the General tab change the Startup type to Automatic.

    8. Press Apply.

    9. Press Start to start the service.

  3. Log into the PaperCut NG admin interface and navigate to OptionsMobile & BYODWeb Print.

  4. In the section titled Web Print Server ensure that the Status is OK. If the status indicates an error see the section called “Troubleshooting Web Print Problems” for assistance.

    Web Print Server status OK

    Figure 21.24. Web Print Server status OK

  5. The Web Print setup is now complete and ready for testing. Continue at the section called “Web Print Testing and Feature Tour” to test printing and functionality.

Web Print Default Mode Setup for Mac and Linux Servers (PDF Only)

Web Print Default Mode supporting PDF documents is enabled and configured by default on Mac and Linux systems (running CUPS). No additional configuration should be required. To confirm that everything is configured correctly, check the Web Print Status section under OptionsMobile & BYODWeb Print. The status should be listed as OK. The Web Print option will also need to be enabled on at least one printer. If there are any status issues, or if basic Web Print testing produces some errors, please consider these limitations/requirements:

  • The printers targeted for use in via Web Print must be configured as print queues on the Primary PaperCut Server.

  • The printers (as setup on the server) must have working compatible drivers.

  • Linux: The Primary Server must be running CUPS version 1.2 or higher.

  • Administrators may find the following log file useful in diagnosing issues: [app-path]/providers/web-print/[platform]/logs/web-print.log

Default Mode for Novell OES Linux and iPrint is not available. Novell OES users should implement the Sandbox Mode (following section).

Sandbox Mode Setup

Sandbox Mode is different to Default Mode and Simple Mode in that the Web Print software runs as a standard GUI application on a dedicated Windows system (often a virtual machine). The dedicated system is configured to be always logged on and running the Web Print software. This software watches a mapped network share hosted on the PaperCut primary server for the arrival of new documents submitted by users. These documents are then opened in the appropriate application and printed.

Sandbox Mode takes a little more time to configure but offers several advantages, such as support for Microsoft Office formats and improved security. Improved security is gained by opening and printing documents on an isolated system, separate from the PaperCut primary server, with the only connection between the two being via a simple file share / mapped drive.

Prerequisites:

  • A dedicated, standalone, cleanly installed system or virtual machine.

  • Windows operating system (suggested: 7, Vista or XP).

  • Adobe Reader 9, Adobe Reader X (10)

  • Microsoft Office 2007, 2010 and 2013 (to support Office formats)

  • Microsoft Standalone XPS Viewer / XPS Essentials Pack (to support Microsoft XPS) - download here

To set up Web Print in Sandbox Mode:

Important

First before setting up Web Print in Sandbox Mode ensure Web Print in Simple Mode is disabled as follows:

  • On Windows, stop and disable the PaperCut Web Print Server System Service (set its Startup type to Disabled).

  • On Mac and Linux, use a text editor to edit the file [app-path]/providers/web-print/[platform]/web-print.conf and change setting enabled to enabled=off.

    Remove the Web Print status files (named web-print-server.activity and web-print-server.status) located in the hot-folder /Applications/PaperCut NG/server/data/web-print-hot-folder.

    Restart the server (or services) to ensure the change is applied.

  1. Make sure Default Mode and Simple Mode are disabled (see Important box above).

  2. Set up a new virtual machine (e.g. using VMware Server, Microsoft Virtual Server or VirtualBox) or a standalone system (e.g. a dedicated desktop PC). This system will house the Web Print server software and any required printing applications, and will be termed the Web Print server.

    This system does not need access to all network resources, but will need access to printer shares and the hot folder share (created later in step 7).

    Important

    Ensure that the system clocks on the primary server and the web print sandbox are synchronized to a common clock. Time differences between these systems may cause problems with the web print system.

  3. Create a new user account called webprint (or equivalent). The password for this account should be set to never expire. At a minimum this account needs access to the printers, the ability to run local programs and the ability to access the hot folder share (created in step 7).

  4. Log in as the webprint user. Add print queues for the printers that should be made available to users via Web Print. The print queues should be added in the same way that they would be added to a workstation. They should point to the print queues hosted on the print server, i.e. a Network Printer mapped to \\server\printer-share. It is important that the jobs pass via the queue on the server - do not add a Local Printer. You should also use add the printers using the print server's machine name and not an IP address.

  5. Install one or more of the applications listed in Table 21.5, “Web Print Supported Applications and File Formats”. The applications installed will determine which file formats are available to users for upload and printing.

    As the webprint user, open a file in each of the installed applications and print to several different printers, ensuring that all works as expected. IMPORTANT Make sure you permanently acknowledge any license agreement screen, initial-run wizard, or customer experience program dialog during this process.

    Tip

    • When installing Microsoft Office applications choose all optional components for installation. This will prevent printing issues occurring due to missing components.

    • Adobe Reader X introduced a Protected Mode setting which prevents printing from the command interface used by Web Print. Web Print to Adobe Reader therefore requires the Protected Mode feature to be disabled and Web Print will automatically disable Protected Mode for your webprint user. (You may also disable Protected Mode manually by unchecking the Enable Protected Mode at startup setting in Adobe Reader under EditPreferences.)

  6. Configure the Web Print server to automatically log in as the webprint user on startup. This system will permanently stay running and logged in as this user.

  7. The primary server and the software on the sandboxed Web Print server communicate via a standard network file share. On the PaperCut primary server, share the folder web-print-hot-folder located at [app-path]\server\data\web-print-hot-folder\ and name the share PCWebPrint. The hot folder facilitates communication between the primary server and the Web Print server.

    Adjust both the Sharing and Security (NTFS/file) permissions of the PCWebPrint share to allow the webprint user read and write access.

    Tip

    By default Web Print will use this folder, not a sub-folder. You do not need to create a sub-folder in this folder.

    If you are using a Linux PaperCut primary server then the following Samba configuration settings may be useful.

        [PCWebPrint]
              comment = PaperCut Web Print Hot Folder
              path = /home/papercut/server/data/web-print-hot-folder/
              public = no
              writeable = yes
              read only = no
              valid users = webprint
              

    You will also need to add the webprint username to Samba via the smbpasswd -a [username] and you should consider disabling the [home] shares in your smb.conf.

  8. Log in to the Web Print server as the webprint user. Map the W: drive to the PCWebPrint share. Ensure that the option Reconnect at logon is selected when mapping the drive.

  9. Test that the file share can be accessed and written to from the Web Print server (e.g. by creating a new text file on W:). It is also recommend to test in the other direction as well and confirm that files created on the primary server in the folder web-print-hot-folder be opened/seen from the Web Print server.

  10. Run the main PaperCut NG installer on the Web Print server and select the Web Print server installation (sandbox mode) install option.

  11. Configure the webprint user to run [app-path]\providers\web-print\win\pc-web-print.exe at login (e.g. by adding a shortcut to the user's Startup folder).

  12. Reboot the system. Ensure that the system automatically logs in as the webprint user when it starts up, and that the PaperCut Web Print dialog is displayed shortly afterwards.

    The PaperCut Web Print dialog

    Figure 21.25. The PaperCut Web Print dialog

    See the section called “Troubleshooting Web Print Problems” for assistance if the dialog indicates an error.

  13. Log into the PaperCut NG admin interface and navigate to OptionsMobile & BYODWeb Print.

  14. In the section titled Web Print Server ensure that the Status is OK. If the status indicates an error see the section called “Troubleshooting Web Print Problems” for assistance.

    Web Print Server status OK

    Figure 21.26. Web Print Server status OK

  15. The Web Print setup is now complete and ready for testing. Continue at the section called “Web Print Testing and Feature Tour” to submit a test print job and test functionality.

Web Print Testing and Feature Tour

This section covers the usage and main features of Web Print. For detailed configuration see the section called “Web Print Configuration”.

  1. Log into the PaperCut NG user interface and click the Web Print link in the navigation menu.

    Web Print link in the user interface

    Figure 21.27. Web Print link in the user interface

  2. The front page contains a list of active and recently submitted Web Print jobs for the logged in user. At first the list will be blank. Later the list will show the status of submitted jobs.

    The front Web Print page before any jobs have been submitted

    Figure 21.28. The front Web Print page before any jobs have been submitted

    The message at the top of this page may be customized, e.g. to include site specific information or other details that users may need to know. See the Introductory message option in Figure 21.36, “Web Print settings in the admin interface”.

    Customizable Web Print introductory message

    Figure 21.29. Customizable Web Print introductory message

    The administrator may restrict access to the Web Print feature by group, by IP address/range or disable the feature entirely. See the section called “Advanced Web Print Configuration” for details.

  3. Click Submit a Job to start the Web Print wizard.

  4. The first step of the Web Print wizard is selecting a printer. This is the printer that the uploaded document will print to.

    Web Print wizard step 1: list of printers available for Web Print

    Figure 21.30. Web Print wizard step 1: list of printers available for Web Print

    The printers available for Web Print are chosen by the administrator. See the section called “Web Print Configuration” for details.

    The printer list may be replaced with a clickable map or other custom content. See the section called “Designing Printer Maps / Custom Printer Selection Lists” for details.

    Tip

    Web Print works great in conjunction with hold/release queues and Find Me Printing (print job redirection / load balancing).

  5. After selecting a printer the second step is to select the print and/or account selection options. Most users will simply see an option to select the number of copies to print:

    Web Print wizard step 2: selecting the number of copies for a Web Print job

    Figure 21.31. Web Print wizard step 2: selecting the number of copies for a Web Print job

    The maximum number of copies a user may submit is configurable via the user.web-print.max-copies config editor key. See the section called “Advanced Web Print Configuration” for details.

    Users with print account selection options (i.e. users who are using an account selection popup) will see additional options on this page, equivalent to what they would see on their popup:

    Web Print wizard step 2: account selection options

    Figure 21.32. Web Print wizard step 2: account selection options

    Note

    The developers hope to be able to support grayscale and duplex print options in the near future.

  6. After selecting the print options and/or account selection settings, the third and final step in the Web Print wizard is to upload a document to print. This page lists the applications and associated file extensions that are supported.

    Web Print wizard step 3: upload a document

    Figure 21.33. Web Print wizard step 3: upload a document

    If a supported application/file extension that is listed in the section called “Supported Applications and File Formats” is not shown on this page but you expect that it should be, see the section called “Troubleshooting Web Print Problems” for assistance.

    Once a document has been selected and Upload & Complete » is pressed the file will begin uploading to the server.

    Web Print wizard step 3: document upload in progress

    Figure 21.34. Web Print wizard step 3: document upload in progress

    The maximum file size a user may upload is configurable, with a default of 100MB. See the option Maximum document/file upload size in the section called “Advanced Web Print Configuration” for details.

  7. Once the document upload is complete the user is returned to the front Web Print page. The table now displays the status of the user's job. The status will change to indicate the progress of the job from rendering to printing, and job details such as cost and number of pages will be populated when known. The user may stay at this page to track the status of the job or navigate away / close their browser - the job will not be affected.

    List of active Web Print jobs

    Figure 21.35. List of active Web Print jobs

    At this stage the PaperCut application server accepts the uploaded document and sends it to the Web Print server. The Web Print server renders the document into a print queue by automating the process of opening the application (e.g. Adobe Reader) and printing to the target printer.

Web Print Configuration

Administrators must nomininate which printers are available for use with Web Print. Smaller organizations may wish to make all printers available. Larger organizations may wish to restrict to a subset, e.g. limiting access to printers located in public areas. A printer may be enabled for use with web print via Printers[select printer]Advanced ConfigurationEnable Web Print (users may upload documents to print).

Tip

To easily enable all printers for use with Web Print:

  1. Select Enable Web Print functionality on the [Template printer].

  2. Copy the setting to all other printers using Copy settings from printer to printer.

General Web Print configuration settings can be found in the admin interface at OptionsMobile & BYODWeb Print.

Web Print settings in the admin interface

Figure 21.36. Web Print settings in the admin interface

SettingDescription

Enable Web Print (allow users to uploads documents for printing)

When enabled a Web Print item will appear in the navigation menu of the user web interface, and users will be able to use Web Print functionality. When disabled this item will not be visible and Web Print functionality will not be available to users.

Maximum document/file upload size

If a user uploads a document greater than the specified size (in MB) their upload will be rejected.

Only allow uploads from users in this group

This option may be used to restrict Web Print access to a particular group of users. When this option is enabled users not in the specified group will not see the Web Print item in the navigation menu.

Allowed user IP addresses

This option may be used to restrict Web Print access to a select IP address range. For example, access might be limited to systems on a wireless network (i.e. force users on the wired network to use standard print queues).

Address ranges may be entered in the format: 1.2.3.0/255.255.255.0.

Introductory message

This message appears on the first page after a user clicks the Web Print item, and can be used to explain the service, offer site-specific advice or other information to assist the user.

HTML is supported, e.g. <p> tags may be used to start a new paragraph, or an <a> tag may be used to provide a link.

Table 21.7. Web Print Settings

Print Options for Web Print Jobs

The print options selected during the Web Print wizard are currently limited to the number of copies to print. Other print options such as grayscale, duplex, paper size etc. are selected based on the default options on the print queue.

If it is important to provide the user with a print option choice, e.g. when the same printer has trays for Letter and Legal paper, two print queues may be created and set up with different default settings. E.g. one print queue called Library Printer (Letter) that defaults to the Letter size and tray, and a second print queue (pointing to the same physical printer) called Library Printer (Legal) that defaults to the Legal size and tray.

Note

The developers hope to be able to support grayscale and duplex print options in the near future.

Designing Printer Maps / Custom Printer Selection Lists

Part of the Web Print wizard involves selecting the target printer from a list. This is fine in most environments, but organizations with many printers or large sites may prefer something that provides users with more context about the printer they are selecting.

Web Print: selecting a printer from the list, which may be replaced with a map or custom list

Figure 21.37. Web Print: selecting a printer from the list, which may be replaced with a map or custom list

Using a graphical map can assist users to find the most convenient printer. A map allows a user to select a printer by location, rather than guessing the printer's location based on its name. Using printer maps or other types of custom printer lists in PaperCut NG does not require any special or proprietary software - they can easily be implemented using open standards and free software.

Web Print: printer selection map with a simple floor plan

Figure 21.38. Web Print: printer selection map with a simple floor plan

Custom content is loaded in place of the printer list by placing the appropriate file at [app-path]/server/custom/web/ as described in the following table:

File NameDescription

printer-map.html

If this file exists it will be loaded as an HTML page and displayed in an iframe in place of the printer selection list. The HTML may contain any content or images including links to other pages (which will also be loaded in the iframe by default).

printer-map.svg

If this file exists it will be loaded as a SVG page and displayed in an iframe in place of the printer selection list. The SVG may contain links to other pages or other SVGs. An SVG may be created using software such as Microsoft Visio or the free/open source Inkscape, and is a convenient way of displaying a map or floor plan with clickable links.

Table 21.8. Files used for custom printer selection in the Web Print wizard

Tip

Any custom content placed in [app-path]/server/custom/web/, such as additional images, can be accessed via a URL beginning with /custom/. For example if a file named floor-plan.png is placed in [app-path]/server/custom/web/ it can be accessed via the URL /custom/floor-plan.png.

Tip

The custom printer map is displayed in an iframe with dimensions 776px x 400px. If the content is larger than this then scrollbars will be visible (the area will not be expanded to fit the content).

Example 1: Creating a Printer Map Using an HTML Image Map

This example runs through the process of creating a printer map using HTML with image maps. This method is most suitable if you have floor plan images and/or arial photos of your site (e.g. in PNG or JPEG format). If you have a plan in SVG/vector graphic format then the section called “Example 2: Creating a Printer Map Using SVG” may be more suitable.

The source for this example can be found at [app-path]/server/examples/printer-maps/html-image-map/.

For this example we will create a printer selection map with two layers: a site plan and floor plans. Users first choose a building from the site plan, then choose a printer from the building's floor plan. We have two buildings: Building A and Building B. Each building has one floor of interest with identical floor plans and five selectable printers.

Web Print: printer selection map with a simple site plan

Figure 21.39. Web Print: printer selection map with a simple site plan

  1. The first step is to create a file named printer-map.html at [app-path]/server/custom/web/. This file will be loaded as an HTML page in an iframe in place of the default printer selection list, and may contain any content you choose, including links to further pages. Open this file in a text editor.

  2. We then add the site plan image:

    <img src="site-plan.png" usemap="#buildings"
           style="width: 422px; height: 190px; border: none;" />

    The usemap="#buildings" attribute tells the image to look for an image map with the name buildings. Image maps allow you to make parts of an image "clickable". For more information about the HTML <map> element see xhtml.com's map element reference.

  3. Now we define the image map.

    <map name="buildings">
        <area shape="poly" coords="" href="building-a.html"
              alt="Building A" title="Building A" />
        <area shape="poly" coords="" href="building-b.html"
              alt="Building B" title="Building B" />
      </map>

    Here we have defined a new image map called buildings with two clickable areas. These areas are polygon shapes (shape="poly"), which means we can specify a list of points that will form the outline of the clickable area (i.e. the area inside the points will be clickable).

    Clicking the first area will load the page building-a.html. The alt and title tags provide information about the link and display a tooltip when the user hovers over the area.

  4. We have defined two areas and the pages they will link to but we have not yet defined the coordinates for these areas. This is done using the coords attribute of the two area tags. Using an image editor we can find coordinates for the outline of the two areas. Most image editors, including MS Paint, display pixel coordinates when hovering the mouse over the image.

    Using the image editor we find the following points for Building A (the lefthand building), starting from the top left corner, in (x,y) format: (0,48), (84,0), (143,34), (143,142), (60,190), (0,155). Pixels are counted from the top left corner of an image, so the coordinate (60,190) means "60 pixels from the top, 190 pixels from the left".

  5. We repeat the previous step for the second building to get coordinates similar to: (242,50), (320,4), (422,63), (422,135), (332,190), (226,131).

  6. Now that we have the clickable area coordinates we can define them in our image map.

    The definition for the area tag when using a poly type shape tells us that the coordinates are specified in a list of x,y coordinates (i.e. "x1,y1,x2,y2...xn,yn"), so we enter the coordinates in the coords attributes as follows:

    <map name="buildings">
        <area shape="poly"
              coords="0,48,84,0,143,34,143,142,60,190,0,155"
              href="building-a.html" alt="Building A"
              title="Building A" />
        <area shape="poly"
              coords="242,50,320,4,422,63,422,135,332,190,226,131"
              href="building-b.html" alt="Building B"
              title="Building B" />
      </map>

  7. Opening printer-map.html in a web browser should now display the site plan image. Hovering the mouse over each building should display the link cursor and indicate a link to the respective pages.

  8. The next step is to create the building-a.html page. Using a similar process to the existing page we add floor-plan.png and create an image map for it:

    <img src="floor-plan.png" usemap="#printers"
           style="width: 600px; height: 362px; border: none;" />
    
      <map name="printers">
        <area shape="rect" coords="4,289,22,307" href=""
              alt="building-a\Printer 1"
              title="building-a\Printer 1" />
        <area shape="rect" coords="33,342,51,360" href=""
              alt="building-a\Printer 2"
              title="building-a\Printer 2" />
        <area shape="rect" coords="58,342,76,360" href=""
              alt="building-a\Printer 3"
              title="building-a\Printer 3" />
        <area shape="rect" coords="521,7,566,23" href=""
              alt="building-a\Plotter 1"
              title="building-a\Plotter 1" />
        <area shape="rect" coords="571,88,592,129" href=""
              alt="building-a\MFP 1"
              title="building-a\MFP 1" />
      </map>
    
      <div>Building A (<a href="printer-map.html">back</a>)</div>

    This map is mostly similar to the previous one, except that we have defined five rectangle shapes (shape="rect") and provided a link back to the main site plan (printer-map.html).

    Rectangle shapes in an <area> element are defined with the coordinates of top left and bottom right corners ("x1,y1,x2,y2").

  9. Now we have the images and shapes in place for the site plan and one building's floor plan. To finish off this building we now need to define what happens when each printer is clicked. This is done using a JavaScript function selectPrinter. Calling selectPrinter('my-server', 'Library Printer') will submit the form on this step of the Web Print wizard, selecting the printer called Library Printer, hosted on the print server called my-server.

    We can call this JavaScript function when one of the defined areas is clicked by setting the href attribute as follows:

    <area shape="rect" coords="4,289,22,307"
            href="javascript:parent.selectPrinter('building-a',
                                                  'Printer 1');"
            alt="building-a\Printer 1"
            title="building-a\Printer 1" />

  10. Repeat the previous step for the remaining printers, taking care that the server and printer names are entered correctly. Note that the printer name is the printer's unique name on the print server, and may be different to the printer's "share name".

  11. Repeat the steps to create building-a.html to create building-b.html (or simply copy the file and modify to suit).

  12. Test the Web Print wizard to ensure that clicking on a building takes you to that building's floor plan, and clicking on a printer submits the form to select that printer. Note that if the names you've used for the printers don't actually exist in your PaperCut NG server then you'll see an error message about the printer not being available. You may like to modify the details for one of the printers to match a real printer so that the wizard can be tested end-to-end.

    The source for this example contains some additional tweaks to improve browser consistency, such as removing the border and white background of the iframe in Internet Explorer.

Example 2: Creating a Printer Map Using SVG

This example explains how to use an SVG image for a clickable printer map. This method is most suitable if you have plans or drawings in a vector format that can be saved as SVG. Otherwise the section called “Example 1: Creating a Printer Map Using an HTML Image Map” may be more suitable.

An example SVG floor plan with clickable printers can be found at [app-path]/server/examples/printer-maps/html-image-map/.

Modern web browsers are capable of displaying an SVG file in a similar way to displaying a web page. Mozilla Firefox and Opera can display SVGs "out of the box", and Microsoft Internet Explorer can display SVGs using the Adobe SVG Viewer add-on. In addition to drawing the image parts of the image may be made "clickable" to provide links to other pages or, as in this case, to call a JavaScript function that selects a printer.

In this example we will describe how to take an existing SVG image and make parts of it clickable so that a printer may be selected.

Tip

A Microsoft Office Visio drawing can be saved as SVG and used in this example.

  1. Download and install Inkscape, the free/open source vector graphics editor, and use it to open your SVG.

  2. Select the object that should be made "clickable". You should see a dotted background around the object.

  3. Right-click the object and select Create Link.

  4. Right-click the object and select Link Properties.

  5. In the Link Properties dialog that appears, enter a value for the Href field like: javascript:parent.selectPrinter('server', 'printer');, where server is the name of the print server and printer is the name of the print queue.

  6. Repeat to create links for each printer in the image.

  7. Select FileSave As... and choose a file type of Plain SVG (*.svg). Save the image to [app-path]/server/custom/web/printer-map.svg on the PaperCut NG server.

  8. Try the Web Print wizard to test. The SVG should be visible on the first step of the Web Print wizard in place of the printer list. Clicking a print should move on to the next step.

Advanced Web Print Configuration

The following advanced configuration options are available via the config editor. See the section called “Using the Config Editor” for information about using the config editor.

Config NameDescription

web-print.job-idle-timeout-mins

If a Web Print job remains unchanged for longer than this period of time it is considered finished and is "cleaned up". The document and associated files are removed, and the job will no longer appear in the user's list of current Web Print jobs.

The default idle job timeout is 20 minutes.

web-print.job-rendering-timeout-mins

The Web Print server is given this length of time to render a Web Print document. If a print job has not been generated from the document after this time the job is marked as errored and associated files are removed.

The default job rendering timeout is 5 minutes.

web-print.max-copies

This is the maximum number of copies a user may print via Web Print. This option exists to prevent users accidentally (or thoughtlessly!) printing too much.

web-print.hot-folder

When a user uploads a file via the Web Print interface is it written into the "hot folder" along with a .metadata file containing information about how to print the job (data selected by the user in the Web Print wizard). The Web Print server looks for new files in this folder and prints them as required. The default hot folder location is [app-path]/server/data/web-print-hot-folder/. An alternate location can be specified using this config key. The location must be local to the PaperCut NG primary server (it cannot be a network share or mapped drive due to Windows denying share access to the SYSTEM account).

Table 21.9. Web Print Config Editor Keys

The following configuration options are available in the Web Print server configuration file, located at [app-path]/providers/web-print/[platform]/web-print.conf.

Config NameDescription

hotfolder

The location of the Web Print hot folder. This is generally a mapped drive letter (Windows) or a mount point that maps to a file share (Mac, Linux). It may also be a local path, if the Web Print server software is running on the same system as the PaperCut NG primary server.

debug

Set to on to enable debug logging.

options.pdf

Set to xpdf to force PDF printing to use built-in PDF printing.

Set to acrobat to force PDF printing to use Adobe Reader.

Table 21.10. Web Print Server Config File

Troubleshooting Web Print Problems

Q: Why are some file formats not available? (Supported file formats listed in are not listed under OptionsMobile & PrintWeb PrintStatus page or not accepted when uploading a file.)
Q: The status in the admin interface or on the Web Print dialog is indicating an error. What can I do?
Q: The Web Print service is running as the SYSTEM account and does not have access to render print jobs.
Q: Where is the Web Print logs folder?
Q: Why is my print queue "currently not available"?
Q: Why are some file formats not available? (Supported file formats listed in are not listed under OptionsMobile & PrintWeb PrintStatus page or not accepted when uploading a file.)
Q: The status in the admin interface or on the Web Print dialog is indicating an error. What can I do?
Q: The Web Print service is running as the SYSTEM account and does not have access to render print jobs.
Q: Where is the Web Print logs folder?
Q: Why is my print queue "currently not available"?
Q:

Why are some file formats not available? (Supported file formats listed in the section called “Supported Applications and File Formats” are not listed under OptionsMobile & PrintWeb PrintStatus page or not accepted when uploading a file.)

A:

First check the section called “Supported Applications and File Formats” to see that the file format is supported in the mode that the Web Print server is running in. Some file formats are only supported in sandbox mode.

Next ensure that the associated application is installed and working. If running in sandbox mode, log in as the webprint user, open and print a document with the application to ensure the user has the correct permissions.

The next step is to check the Web Print log files. The Web Print server has a handler for each supported application. Each handler has a log file, which may provide more information about why the file format is not available. The handler log files are named web-print-handler-*.log, where * is the name of the application. See Q: for the location of the Web Print logs folder.

Open the log file that matches the application of interest (e.g. web-print-handler-mso-word.log for Microsoft Office Word documents) in a text editor. Check the log file for any obvious errors, such as not being able to find the application or problems launching it.

For further assistance contact support.

Q:

The status in the admin interface or on the Web Print dialog is indicating an error. What can I do?

A:
The Web Print server is not running or could not be contacted

When running in Simple Mode:

  • The service PaperCut Web Print Server should be running.

When running in sandbox mode:

  • The Web Print dialog should be visible on the Web Print server, and the Status should not indicate any error.

  • While logged onto the Web Print server as the webprint user, ensure that the mapped W: drive is accessible and maps to [app-path]/server/data/web-print-hot-folder/ on the PaperCut NG primary server.

  • Open [app-path]/providers/web-print/[platform]/web-print.conf on the Web Print server in a text editor and ensure that the hotfolder= option is set to W:.

For further assistance contact support.

Q:

The Web Print service is running as the SYSTEM account and does not have access to render print jobs.

A:
Default Mode

If running Web Print in Default Mode, check if the printer being printed to is running on the local computer. The SYSTEM account will not have privileges for printing to remote printers.

If the printer is remote then check the steps listed in the section called “Default Mode Setup” to ensure that the service has been correctly configured to run as the webprint user account.

If the printer is local then check the printer's privileges allow the SYSTEM account to print to it.

If the above steps do not fix the problem then the failure should be logged in [app-path]/providers/web-print/[platform]/logs/web-print-handler-pdf.log. Tech support will be able to analyze this file and help you find out the cause of the failure.

Sandbox mode

If running Web Print in Sandbox Mode this error may indicate that the service PaperCut Web Print Server is running. This service is not required in sandbox mode and should be disabled.

No valid handler programs installed/defined

See Q:.

The configured hot folder location is not writable.
  • Check that the location indicated by Hot folder on the Web Print dialog is correct.

  • As the webprint user, navigate to the drive/directory that is mapped to the PCWebPrint share (W: on Windows). Try creating an empty text file. If this action fails there is a problem with permissions. Check the Sharing and Security (NTFS/file) permissions for the PCWebPrint share on the PaperCut primary server. The webprint user should be allowed read and write access.

  • For further assistance contact support.

Other error messages

Check the Web Print server log file web-print.log. See Q: for the location of the logs directory. For further assistance contact support.

Q:

Where is the Web Print logs folder?

A:

The logs folder is located on the system running the Web Print server software.

On Windows the location of the logs folder depends on configuration and the Windows edition. Logs may be written to [app-path]\providers\web-print\win\logs\, or to %USERPROFILE%\web-print-logs\ (e.g. C:\Users\[username]\web-print-logs\ on Windows Vista/2008. For a definitive answer open the file [app-path]\server\data\web-print-hot-folder\web-print-server.status on the primary PaperCut NG server in a text editor and check the line beginning server.log-file=.

Q:

Why is my print queue "currently not available"?

A:

When using the Web Print interface, some print queues are giving me an error message: Errored: Printer '\\servername\queuename' is currently not available.

This can be caused by trying to use Web Print on a print queue that has been deleted or by trying to print to a print queue that is not installed on the Web Print Sandbox. Please confirm this by logging into the Web Print Sandbox as the Web Print user and attempting to print to the above print queue.

Note

It is important that the jobs pass via the queue on the server - do not add a Local Printer. You should also use add the printers using the print server's machine name and not an IP address.

XPS Viewer Installation Instructions

Microsoft Windows XP and Server 2003 administrators can easily install the Microsoft XML Paper Specification Essentials Pack (XPSEP), which contains the XPS viewer, from the Microsoft website. Versions for both 32bit and 64bit are available. By default, Windows Vista and Windows 7 will include a compatible XPS Viewer if .NET Framework 3.0 is already installed.

Customers running Microsoft Windows Server 2008 must install the XPS Viewer from the Features module of the Server Manager MMC snap-in.

  1. Load the Server Manager MMC snap in via Start menuAdministrative ToolsServer Manager

  2. Right Click on Features and select Add Feature

  3. Check the tickbox for "XPS Viewer", click Next

    Installing the XPS Viewer for Windows Server 2008

    Figure 21.40. Installing the XPS Viewer for Windows Server 2008

  4. Click Install on the Confirm Installation Selections dialogue box.

  5. Click Close when the installation is complete.

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this manual page. Please don't use this for support requests.