Skip to main content
Skip table of contents

Create ZUGFeRD template

When generating ZUGFeRD files, either an existing PDF must be combined with an XML file, or a PDF is generated during the conversion process.

Use existing PDF

If a PDF for a ZUGFeRD invoice to be generated already exists, the complete path to this file must simply be entered in the HTPDF parameter of the ZF23INVHT interface. When creating the ZUGFeRD files, this PDF is automatically picked up and merged with the existing PDF. See also General configurations

Generate a PDF with standard templates

The scope of delivery includes ready-made templates in the folder /home/ieffect/zugferd/templates/comfort_zf23 and /home/ieffect/zugferd/extended_zf23.

These templates are always used when the HTTEMPLDIR field is not filled in the interface file.

Create your own templates

The templates provided can be used as examples to create your own templates with the help of Jaspersoft Studio.

Currently, it is necessary to compile the templates with version 6.10 so that they can be used with i-effect for ZUGFeRD creation.

The templates provided can serve as examples and can be customised.

Please note that you need an Arial Font Jar to use our templates. See Create Font JAR (The created Font jar must be copied to the '/home/ieffect/current/mapper/lib' folder and then the EDI subsystem must be started.)

Changing the demo templates

After starting Japsersoft Studio, a new JasperReports Project can be created by right-clicking on Project Explorer -> new → Project → Jaspersoft Studio → JasperReports Project.

One of the templates provided in /home/ieffect/zugferd/templates/ can be selected as a sample and copied into the newly created JasperReport project.
Both the .jasper and .jrxml files located in the folder and the resource and subreports subfolders are required.

The final structure of the JasperReport workspace looks as follows

The next step is to create a new DataSource Adapter called ZUGFeRD Adapter in the Repository Explorer.

Clicking on Create DataAdapter initiates the following dialogue.

Now select Database JDBC Connection from the list and press Next.

Now set the name of the data adapter to ZUGFeRD Adapter.

Now go to Driver Classpath and click on Add. Navigate to the Jaspersoft Studio installation folder and select jt400.jar.

In meinem Fall wäre das TIBCOJaspersoftStudio-6.3.0.final-windows-x86_64 → jaspersoftstudio → jt400.jar.

Now go back to Database Location and enter the following information there.

JDBC Driver

com.ibm.as400.access.AS400JDBCDriver

JDBC URL

jdbc:as400://SystemName/ieffect

Username

Your user name on the AS400

Password

Your password on the AS400

Now check whether you have successfully established the connection by pressing Test. If the message Successful appears, you have successfully set up the data adapter.

Now you can start modifying the Jaspersoft templates. If you have never worked with Jaspersoft Studio before, we recommend reading the Jaspersoft Getting Started Guide.

Once you have made the changes, copy all the customised templates back to your system. It is important that you compile the templates beforehand, as the *ZUGFeRD module requires the pre-compiled report files (.jasper).

If you only want to customise the logos, simply replace the logo.png and logo_footer.png files in the resources folder.

Where should my report templates be stored?

Please save your templates in a separate folder under /home/ieffect/zugferd/templates. Please note that there can only be one .jasper file in the main folder.

Example:

Where do I select which template is used for ZUGFeRD generation?

You can do this by calling RUNMAP or entering the template directory directly in the data record. For more information, see ZUGFeRD Tutorial 1 , Creation of a ZUGFeRD PDF

What should my resource bundles be called and where should they be located?

The naming convention for a Resource_Bundle must be as follows:

The language of the current Java instance is used automatically.

Your resource bundles must be located at /home/ieffect/zugferd/templates/"your template folder"/resources.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.