Posts for Tag: J4L Components

The easy way to convert XML into PDF

J4L FO Designer is a productivity tool that helps you to convert XML files into PDF by using Apache FOP, the open and free implementation of the XLS-FO standard.

As a productivity tool, our product intends to save you a significant amount of your time, and spare you the difficulties of a manual process. As explained in my previous post “How to create PDF files from XML with Apache-FOP”, XSL-FO and Apache-FOP provide a free and standard way to create PDF files in a language independent manner.

But there are a number of disadvantages with that approach, e.g.:

  • you have to learn XSL-FO (and therefore also XPath and XSL).
  • even if you know XSL-FO you do not want to be writing FO templates using a text editor.
  • there is some logic that cannot be easily defined using XSL-FO. For example, grouping of data requires you to use the so called Muenchian method , which isn't straightforward to understand.

In order to overcome these drawbacks, at J4L Components we have developed J4L FO Designer. The designer is a Visual (WYSIWYG) editor that will generate XSL-FO files for you. This makes the start into the XSL-FO world very easy, and it is also a useful tool for experienced developers since you can create and test XSL-FO files very quickly.

Additionally, it will also implement the algorithms for data grouping and running subtotals. Even though the tool has been created and tested for Apache FOP, the generated XSL-FO files would work with other FOP implementations.

Last but not least, we have added additional features to the FOP server (this is outside the standard) such as digital signatures and creation of PDF interactive forms.

You can download the evaluation version here.


In the previous post we have seen how to create a "Hello World" PDF file by using XSL-FO files. The following instructions explain how the same PDF file can be created using J4L FO Designer:

1) We use the same persons.xml file:

<?xml version="1.0"?>





2) Open the designer, select the "Test Data" section on top of the left column and load persons.xml

the content of the file will be shown in the tool

3) We will now create an XML schema. In the XML schema you will see the structure of your file. Select the "XML Schema" section on the left column then use also the persons.xml file to create it on the fly.
4) In the next step we associate the detail section to the /persons/person node, so we will get one line for each person. Click on the Detail area header, then set XML node property to /persons/person.
5) As last step we add a field in the detail area. Click on the "Aa" button on top to select the field tool, then click somewhere in the detail area to add the field there. Finally we set the Xpath property. In this example we use the concat function to concatenate the text ‘Hello’ and the name of the current person (this could also be done with two separate fields):
6) Click on the PDF button
and the report.pdf file will be created.

J4L Barcodes 1D for Ruby

I was intrigued about all the buzz around the Rails framework and the Ruby language, so I thought it was the time to check it out by myself and start by learning Ruby. So, as I usually do, I assigned myself some specific learning task: in this case porting the J4L barcoding software from PHP (which in turn was ported from Java).

Here's the result
(only 1D barcodes at the moment)

From a commercial point of view, I wonder if this product will work well because there are already some open source solutions, most notably Barby, and the Ruby community appears to be very focused on open source and have do-it-yourself attitude.

If you're a Rubist and have considered to use this product and/or some other alternative, I'd appreciate your thoughts. These are the advantages that I think this product offers, compared to Barby:

  • Most importantly, you don't need to struggle to make this component work: it should work out of the box and if it doesn't you will have direct support from me.
  • Low non-Ruby requirements: only the GD libray
  • More complete feature set:
    • More supported symbologies
    • It generates not only the barcode itself but also the "human readable interpretation", this is, the text/code in plan ASCII characters below (or above) the bars.
    • You can specify: bar measures, margins, colors, and other parameters for the graphic output.
    • Better support of the symbologies characteristics.
      • For instance length optimization: in Code 128 (and GS1-128) it will select the appropiate code set (A, B or C) and switch between them in order generate the shortest possible symbol, depending on the data to be encoded. In Barby you have to pre-select a code set that will be used for all the data.
      • Or in GS1-128, J4L Barcodes will recognize the "Application Identifiers" and interpret the data accoding to their length as per specification. E.g. "11654321" will show as "(11)654321", this is A.I. 11, data 654321.

A few things that I do or did

  • WebbyFiles is one of my own projects. What is it?. Discover by yourself: enter the demo and waste some of your time playing with it in the “Tests” folder.
  • In recent years I worked in the development of the server software that provides content to the TomTom HOME desktop software . If you have a TomTom, it’s quite likely that you have been using this software to manage and update your device. If you did, know that millions have done so, but from now on you’re part of the selected group that know that I did something for them!.
  • I occasionally develop web sites, this is one that I’m proud of, in collaboration with a friend graphical designer.
  • Besides my own software, I also distribute software from others. Most of it is under the J4L components brand. Of those, I ported all barcoding components from Java to PHP. These are: multiple 1D barcodes, PDF147, DataMatrix, MaxiCode, AztecCode and QRCode (you have on-line demos of them all).