简体   繁体   中英

Is it possible to load another page when you're creating a pdf with tcpdf?

I'm trying to change the page, when you are downloading a pdf. Otherwise you can download a lot of pdfs. I'm trying to make something against the spam.

What I got now: I create a id for a session . This session is named by idPDF . I create the idPDF by getting the current date and time . When you're creating the pdf, the idPDF will go to an online database . When the idPDF is found in the online database , then you're no longer able to create a pdf.

Then it will delete a part of the page and create a button with a php function isset . With this button you can create a new session and start creating a new pdf.

But I need to reload the page, before it is giving me this button. So how can I reload the page (that my page can check the id) or start a javascript function on the html page( fadeIn with jquery )? Does anyone understand my question?

PS : For the output of the pdf, I'm using 'FD'

pps. I'm new with TCPDF

I solved it!

I used a jquery onclick function. It was that simpel.. First I had some problems with the required fields, but I changed it with a function that I used as a filter. I could load another page or button when the function returned true. With the button I could created another session.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM