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

  • 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

  • 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

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