Skip to content
Advertisement

Itext7 bare bones hello world example – how?

So I’ve downloaded the compiled itext jar files from https://github.com/itext/itext7/releases/latest and placed them in same folder as the iText example C01E01_HelloWorld.java but when I run

JavaScript

I get

JavaScript

I also tried

JavaScript

i.e. where the -cp points to where the iText jar’s (and C01E01_HelloWorld.java) is with same result. How do I get the import lines to know and use the iText jar files?

Or can this not be done in a simple way and need eclipse or maven or ?

So I ran the following without error

JavaScript

if I left any of the jar files out it resulted in errors related to the missing jar. but when I try

JavaScript

I get

JavaScript

I also tried

JavaScript

which gave slightly different

JavaScript

so next step yields

JavaScript

my source is

JavaScript

Advertisement

Answer

So I downloaded slf4j.api, slf4j-log4j12, and log4j using links provided in

SLF4J: Which .jar files does iText7 need exactly?

and also downloaded the compiled itext jar files from

https://github.com/itext/itext7/releases/latest

I then ran

JavaScript

and then

JavaScript

and finally I get the alleged simple hello world pdf….

I’ve tried maven, eclipse, and now IDEA and failed to get any to “just” work following tutorials or hints …. yet

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement