Eloquence webprint (beta) contact contact

Documentation / WEBDLG2 / webprint

Eloquence webprint (beta)

  Document revision: 2022-08-12
Refers to eloqcore version: PE83-2205130

The webprint feature, introduced with eloqcore patch PE83-2205100, supports application printer output in a web environment.

When enabled, the Eloquence PRINTER 10 output is passed through eqpcl to create PDF documents that are opened in the browser.

Please note: This is a beta test version and may not function as expected or functionality may change without notice. Please let us know how this works for you.

Eloquence configuration options

The following configuration options in the eloq.config or .eloqrc configuration file may be used to define the webprint behavior
option webprint 0
A nonzero value enables the webprint functionality. A mode 1 enables webprint for use with WEBDLG2. A mode 2 overrides the JDLG printer support to use webprint instead. A mode 0 disables webprint (the default).

option webprint_tmp "/var/spool/webprint"
This specifies the directory that is used to (temporarily) hold the printer output. If webprint_age is configured then older files will automatically be removed from this directory. Please keep in mind that this directory and its files must be accessible by a web server.

The location /var/spool/webprint is recommended on HP-UX and Linux.

Please note: When using an external web server on Linux systems with systemd, referring to the /tmp or /var/tmp directory (or a subdirectory) may not work as expected. The web server's systemd unit may have the PrivateTmp option enabled, redirecting the /tmp or /var/tmp directories to a private location.

option webprint_cmd "eqpcl -p -C EOLTERM=2"
This option may be used to specify the eqpcl command line options. Unless an absolute path is specified the Eloquence bin directory is assumed. The default should often be sufficient unless specific printer settings are required.

option webprint_url "/webprint"
This option specifies the URL prefix that is used by the web browser to access a PDF output. The web browser must be configured to refer to the directory specified in the webprint_tmp option. With WEBDLG2 a relative URL should typically be sufficient. With JDLG a protocol and host name must be specified.

option webprint_age 0
This defines the max. age of a print document in seconds in the spool directory (as specified by webprint_tmp). If present then eloqcore will automatically remove any files that are older than the specified age value. A recommended value is 300 seconds (5 minutes).

Please note: This option assumes that a dedicated directory is used that only holds eloquence print files. Any files in the directory will be deleted.

Example configuration

This shows an example configuration in the eloq.config or .eloqrc to enable webprint with a dedicated speool directory.
option webprint 1
option webprint_tmp "/var/spool/webprint"
#option webprint_url "http://localhost/webprint"
option webprint_age 30

Creating the spool directory

On Linux the commands below can be used (as root) to create the spool directory for use with webprint.
mkdir /var/spool/webprint
chown wwwrun:www /var/spool/webprint
chmod 2777 /var/spool/webprint
Spool files are created group readable so assigning them to the www group will ensure the files are readable by the web server but otherwise restricted.

Web server configuration

To integrate with the WEBDLG2 internal web server, add a [/webprint] URI configuration to the eloqwebd2.uri file, for example:
Path = /var/spool/webprint
GroupList = @auth
CacheMax = 10m

This associates the /webprint URI with the /var/spool/webprint directory, as configured for option webprint_url. The browser is allowed to cache the files for 10 minutes before revalidating with the server. The invoking user needs to be logged in.

Equivalent example configuration for Apache httpd:

# Eloquence webprint
Alias /webprint "/var/spool/webprint"
<Directory "/var/spool/webprint">
  Options None
  # Apache 2.4
  <ifModule mod_authz_core.c>
    Require all granted
  # Apache 2.2
  <ifModule !mod_authz_core.c>
    Order allow,deny
    Allow from all
  # Caching
  <ifModule mod_headers.c>
    Header Set Cache-Control "private, max-age=600, must-revalidate"

Save this in a file named webprint.conf in the Apache httpd conf.d directory, typically in one of the locations listed below:


On Windows:

The directory is typically: C:\Apache24\conf\extra

To activate the webdlg2.conf file, a line like below needs to be added to the end of the httpd.conf file:

Include conf/extra/webdlg2.conf

The web server typically needs to be restarted when its configuration has been modified.

Can I do the same with other documents?


Webprint uses the application.browser[target] method to have the browser fetch the document from the server. This is an method available in WEBDLG2 that allows to specify a target tab for a document. For printer 10 "printer" is currently used as a target.

DLG SET "application.browser[printer]","/webprint/"&Name$
With JDLG the application.browser method is used which does not allow specifying a target.

eloqcore has the option to remove old documents. This is triggered whenever a document to PRINTER 10 is started. Alternatively a cron job or cgi script could be used as well.

It is not difficult to create a functionality that works the same for other application documents and/or integrates with webprint.

We appreciate your feedback. Please send your feedback to support@marxmeier.com.

The Eloquence Team

  Privacy | Webmaster | Terms of use | Impressum Revision: 2022-08-12  
  Copyright © 1995-2022 Marxmeier Software AG