Constants definitions in the class are not essential for the code to run ...As i mentioned in an early post i'm rewriting the code of the lib because it's very very poorly ported from php ... so i day or to i will post it on github it should run on most fpc versions

Just some remarks:- in order to override the header function you need to add "virtual" in the declaration => procedure Header; virtual;- the same for the footer => procedure Footer; virtual;- There is a small bug in SetY. "if (cpY >= 0) then" must be replace with "if (vY >= 0) then". With this modification it's possible to use a negative value for Y.

Is it possible to change the line type? It seems that it's not possible...