Creating Customised Header and Footers using Blank Application and TCPDF

I’m trying to create customised headers and footer using code examples from the tcpdf website (https://tcpdf.org/examples/example_003/) which requires creating a php class.

when running it on a blank application, I get the following error…Fatal error: Class declarations may not be nested.

Anyone knows a solution to this problem?

Thank you

Ok after searching though the forum, problem solved, had to create the class in the internal libraries.

Hi Alex, could you explain to me, what you solve your problem please. I have the same problem but I don’t know where write the code.