Hi guys this will probably be obvious, but I can't think how to solve it!
I'm using TCPDF and the code for generating the PDF looks like:
class CUSTOM_1 extends TCPDF {
// custom header etc
}
The problem is that I'd like to generate many PDF files in one script and I use a while loop, to go through my queue of documents that need to be generated.
Some documents need CUSTOM_1, CUSTOM_2 or other classes.
When a document is about to be generated, where the custom class has been used once before, then I get an error:
Fatal error: Cannot redeclare class CUSTOM_1 in...
How can I reset all CUSTOM class information so that when re-declared they work ok?