Silent Printing on client’s printer is considered to be security hazard and is not recommended to general applications. It would not sound great when you are browser a web page, the browser sending document to your printer without your confirmation.

But with advanced web applications, other than regular websites, such as your web based CRM application, there are requirements for silent printing. The users don’t like clicking the buttons to start printing time and time again.

I came across such requirement recently where I need to print a pdf report generated by Jasper to client computer silently. I am discussing here the example code snippets for this mechanism. The example discussed here uses GTD Printing Tools. This example elaborates the method of sending pdf directly to a printer from the web server without opening it into clients Acrobat Reader. This example has been tested successfully on Windows 8 with IE11 and Acrobat Reader DC.

How it works.

Send request to web server, the server will generate to PDF report.

The web server returns web page with the link to PDF file generated on step 1.

The web page returned on above contains script written with Javascript, it will send the request to local GTD Printing Tools Web Server automatically (http://localhost:47865/), and the link to PDF file is passed to GTD Printing Tools as a parameter.

GTD Printing Tools received the link, and cookie if exists, and send request to web server, by this means to download the PDF file.

3. After the PDF file downloaded, GTD Printing Tool will choose printer according to report name (Named “sample” in the example). If no rule associated with report name, it will choose default printer.

If you are developer of web-based application (browser/server architecture), you may have trouble on printing invoice, ticket etc. The users need to select printer, paper size, and setup the margins, so the user need to click many times.

How to print invoice without selecting printer, paper size etc.? Can I control the printer just by Javascript? Here I will introduce a dedicated printing tool for web page only.

3. Setup your email account.

Before send email, you should have an email account. In this article, we use the free Gmail account. You are better off using your own business email account, and the smtp server is owned by your company.

Please run sendmail.exe -setup

Fill in account information and click OK.

Note:

Your Name: Name of sender

Email Address: Email address of sender

Outgoing SMTP Server: Name or IP address of the SMTP server. For example: smtp.live.com

Server requires authentication: check it in most case, because most smtp server requires authentication.

SSL/TLS enabled: Instructs the program to send the email using SSL. Using the ssl switch can often solve problems where the server expects a STARTTLS command.

User Name and password: User name and password used for authentication. The pasword will be encrypted and saved to file system.

Rep2excel is tool that can convert oracle reports in to native Microsoft excel format. The Win32-Rep2excel support CGI interface, and then customer deploy it in cgi-bin folder of Apache server. The Rep2excel can be called by other computers via browser, and return the excel file.

HTTP 500 Error

Some customers report problem when Rep2excel converts large oracle report file. In the browser, the end users see the http 500 error page:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, user@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

The administrator of apache check the error log, it shows message similar to:

Troubleshooting

First I suggest the users run Rep2excel by command line, and convert the same oracle report file. If the excel file is generated without error, and it takes more than 5 minutes to generate the excel file, you are better off configuring the TimeOut directive in httpd.conf of Apache server.

The java-Rep2excel is web-based application, although you can control it via Win32 GUI application. You may want the java-Rep2excel to be running even though you log off the Windows desktop. So you need to run java-Rep2excel as service.

How TO

The following steps guide you through the installation of Windows service.

Open java-Rep2excel GUI manager, click Server, and then “Install/Uninstall Service”.

The service will be installed. And in case the server has been installed before, and the server will be uninstall if you click the button again.

Run services.msc, you will see the entry of java-rep2excel server in the list of service (local). You can start/stop the service by this command:

net start “j-Rep2excel Server”

net stop “j-Rep2excel Server”

Note

Please upgrade the version 1.60 or above in case you need the feature. Because there is bug in the version prior to version 1.60.

I want to create a mechanism to monitor growth of our oracle tablespaces and how much space is used in them.

Step by Step Guide

1. Configure JDBC connections.

Provided you have install the free version of EasyHA, before you monitor your databases and business data (like tablespace usage), you should please create JDBC database connection to your Oracle database.

3. View the tablespace growth a few days later.

Perhaps you are using web-based oracle reports. Generally speaking, you will call Oracle Reports Server from your Web-based Oracle Forms or other application, the oracle form (or your application) will open the http link, then the default browser of client computer will open the link, and the report output is displayed in browser. The http link looks similar to:

http://server-name:7777/dev60cgi/rwcgi60?….

http://server-name/reports/rwservlet/getjobid….

As RepExpert is professional printing tool for oracle reports. So you are better off using RepExpert as default viewer/printer of Oracle Report output.

The RepExpert can be launched by web-based forms and web pages.

How it works

The RepExpert contains an add-on for IE named RepExpert IEHelper, you can see this add-on in IE.

Repexpert IEHelper add-on will monitor the navigation activity of IE (Internet Explorer), and analyze the URL and determine whether the URL is link to a file of report output.

If the URL contains all pre-defined keywords, the Repexpert IEHelper add-on will execute RepExpert and it will download the file and open it instead of IE.

Requirements

1. The default browser should be IE (Internet Explorer v6/7/8/9/10/11).
2. The RepExpert IEHelper add-on should be enabled.
3. The URL should contain predefined keywords.

How to set Internet Explorer as the default browser:

Internet Explorer is the default browser on Windows computers. If you click a link in another program on your computer, like an email client, it will open in Internet Explorer. If you've set another web browser as the default, you can choose to switch back to Internet Explorer.

Click the Tools button in the top-right corner of the browser, then select Internet Options.

The Internet Options dialog box will appear. Select the Programs tab.

Locate and select Make Internet Explorer the default browser, then click OK. Any link you open on your computer will now open in Internet Explorer.

FAQ

Q: Does RepExpert support Windows 10?

A: RepExpert supports Windows 10 (both 32 & 64bit). However, the default browser should be set as Internet Explorer (IE). Perhaps you use Microsoft Edge as default browser.

Q: Does RepExpert support IE11?

A: Yes.

Q: Does RepExpert support other browser except for IE? Such as Chrome and firefox.

A: Not support other browser till now. You can also contact the vendor support@lv2000.com if you have any special needs. We will develop new features according the customer’s needs.