Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
cburlon7 Absent Member.
Absent Member.
1622 views

Print graphics from Linux

I’m looking for some alternatives to printing documents with graphics/logos from Linux, and I’m interested in what other people out there are using?

 

Currently we are using thin client to windows clients with a Linux data server.

 

For printing we’ve always stayed internal to runtime, printing graphics and logos by using win$printer commands passed to the windows print spooler. As our output has become more complex we’ve run into speed issues with this approach. So we are now looking into alternatives. We do not have any issues getting the output  converted to PDF, or in front of the client’s eyes but with generating the graphical elements themselves outside of win$printer.

 

Initial thoughts are to generate a HTML report on the server side, or start exporting data in a flat format to be picked up and output by a report writer.

 

But I was wondering if anyone else has already crossed this bridge or has other insights as well?

 

Chris

0 Likes
3 Replies
Knowledge Partner
Knowledge Partner

RE: Print graphics from Linux

Hi Chris,

One very useful approach is to use Apache FOP, in combination with XML Extensions (available in recent versions of AcuCOBOL).

Apache FOP is an open source product that produces PDF (and PCL and other format) directly from XSL Formatting Objects.  It is implemented in Java and is available for Linux, Windows and a host of other platforms.  It is licensed under the Apache License, which has very favorable terms.

Printing graphics and logos is quite easily accomplished.  There are several WYSIWYG design tools available at a reasonable cost (including at least one that is free).  If you need to do graphics that are data-dependent, then you can use SVG - an XML-based graphics capability.  Both PDF and SVG can be scripted with JavaScript, so the capabilities for your 'printed' documents are almost endless.

There is a set of examples here, including a simple Apache FOP example (an envelope with a logo and Postnet barcode) and some dynamic SVG widgets (bar chart, pie chart, dashboard gauge, USPS barcode).

My company uses the RM version of XML Extensions throughout our application. XML is the data-moving language of the net, and there are a plethora of useful (and typically free or inexpensive) tools available.  Integrating these tools with your COBOL applications will lead to more flexible and robust applications, when compared to the 'everything in COBOL' approach.

Tom Morrison
Hill Country Software


Tom Morrison
Consultant

0 Likes
areymond Contributor.
Contributor.

RE: Print graphics from Linux

Hello,

Apache FOP is certainly a solution.

If the client are under Windows, an easy way is to use RPV Reports from RPV Software. It is very easy to create reports with logos and images, and has some graphic possibilities.

With gnuplot, it is quite easy to create standard graphs (bars, pies, etc) save them as jpeg to be integrated in a report (rpv or any other) or even with pdf documents (using pdflib f.e.).

AR

0 Likes
cburlon7 Absent Member.
Absent Member.

RE: Print graphics from Linux

Thank you for the feedback. I'm looking into both of these paths.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.