support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Web Enablement > isCOBOL EIS > How do you handle printing from the WebClient?
Question Title How do you handle printing from the WebClient?

There are four options for printing in WebClient:

  • from the WebClient to the browser in a separate tab
  • from the WebClient to the client's download folder
  • from the WebClient to a server printer
  • from the Application Server to a server printer

Printing to the client's browser window:
The WebClient's default printing method follows a user's familiar experience when accessing a document from the web browser.
If you print to "-P SPOOLER" the document will open in a new page of the browser as a pdf document, and the user will be given the option to print.

Downloading to the client's download folder:
If you print to "-P PDF" the document will be put onto the WebClient server, and you can use C$EASYOPEN or C$DESKTOP to move the document to the client machine, where it will download within the browser to the download folder set up in the browser settings.

We often get asked how to print a page directly to the client's printer. This isn't possible from the WebClient, because executing client processes and accessing client resources from a browser is a security risk and blocked by all browsers. The Application Server communicates with the browser, not directly with the user.
However, it's common practice for a web user to click on a request to print a document from a web page, and see that document either displayed on a separate tab as a PDF document or downloaded. The user is used to clicking on the print button at this point.
Attached is a sample program that shows the difference between option #1 (opening a document in a new browser window) and #2 (downloading it as a pdf to the users' desktop).

If you want to print to a printer installed on the server where the WebClient is running, you have two options. Note however that the client's local printers are not available unless those printers are also installed on the WebClient's server.

Printing from the WebClient server:
In the WebClient console's configuration window, one of the last options available is "Allow Server Printing". If you turn this on, the program can print to any printer installed on the WebClient process's server.

Application Server to a server printer:
The last WebClient printing option is to bypass the WebClient completely, and handle the printing from the Application Server.

    set wprt-as-server to true
    call "WIN$PRINTER" using winprint-set-printer-as 
                             winprint-as
The printers on the Application Server's server are available with this option. You can see more code to handle this type of printing in our ISCONTROLSET sample:
   %ISCOBOL%/sample/iscontrolset/PRINTGUI.cbl

Authored by: Veryant Support This question has been viewed 8239 times so far.
Click Here to View all the questions in isCOBOL EIS category.
File Attachments File Attachments
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Working with isCOBOL, is there a native support for REST and SOAP Web Services?
  2. How can I control or restrict access to my WebClient applications and see the user name displayed in the WebClient console?
  3. Consuming a webservice returns error 500 because of the lack of a Header property
  4. Guide to update the isCOBOL runtime libraries on isCOBOL Web Applications running on Tomcat
Article Information Additional Information
Article Number: 318
Created: 2021-02-15 2:32 AM
Rating: 5 Stars
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.