Hi,
I am habving problem with tcpdf library.I am using Version: 5.9.162.I have a table format structure and the user writes in the table format and add the data and creates the pdf but my pdf file is not creating as i wish to create them some of the data is displayed and some is not.I am using writeHtml() function of tcpdf library and the error it gives me in the error log is PHP Warning: array_push() [<a href='function.array-push'>function.array-push</a>]: First argument should be an array in tcpdf\tcpdf.php on line 21713.The line is

// store the TR elements IDs on table element
                            array_push($dom[($dom[$key]['parent'])]['trids'], $key);

I cant get why the file is not creating as I want. Some of the files are creating successfully. And if I apply strip_tags on my notes and create the pdf. The pdf is created successfully.I think there is some issue with my html tags but cant get it.I have placed this question on tcpdf library support but no reply from there. Please help if anyone can. Thanks in advance.I am using table format html for pdf generation

Member Avatar for LastMitch

@saadi06

TCPDF library issue pdf not creating correctly

I'm not sure if you solve your issue yet. Maybe you have already find the solution on their forum.

I never heard or try TCPDF at all.

But I read it now. Since you are using their product there's a forum where you can ask questions:

http://sourceforge.net/p/tcpdf/discussion/435311/

This kind of libraries usually are very strict, so if there's something wrong in your HTML then it will break with an error like yours. It will be more useful if you paste here the code of your page.

In addition, as suggestion, get the HTML output and try to validate it:

http://validator.w3.org/

bye!

Member Avatar for diafol

never heard or try TCPDF at all.

It's a very nice package - easy to learn and use. Also supports many extended characters - unlike many of the other text/html->pdf packages.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.