-1

I have a form that's calculated on the go. (below picture) enter image description here

So that table gets created with jQuery & Ajax working with PHP. I want to implement a PDF library that can print that correctly. The tricky part is that I don't know the best way to send that whole table (along with CSS of it in header) to an another PHP file through POST method so that file takes it in and places it inside where it needs to go to PDF get created correctly. What's the best way to go about this?

Process for the table is, first enter dates then select company then click view. At this point, the table gets created, once you click to report it is supposed to create a pdf.

Note to whomever marked this question duplicate: Whoever marked this duplicate, did you really read that other ticket? The other one pure HTML + CSS. I am talking here a page created HTML + CSS and manipulated using AJAX and jQuery! I really don't get people who don't read questions and randomly mark them as duplicate, this has nothing to do with that other question!

Extelliqent
  • 1,760
  • 5
  • 32
  • 51
  • Whoever marked this duplicate, did you really read that other ticket? The other one pure HTML + CSS. I am talking here a page created HTML + CSS and manipulated using AJAX and jQuery! I really don't get people who don't read questions and randomly mark them as duplicate, this has nothing to do with that other question! – Extelliqent Oct 03 '17 at 22:10

1 Answers1

1

you have to send your table data to server and in server side create your pdf and style it again. for create pdf you need to work with somthing like tcpdf. search for tcpdf.

hamed
  • 54
  • 1
  • 7
  • I have TCPDF. How do I send it to server that's the question... – Extelliqent Oct 03 '17 at 22:07
  • you cant send css codes to the server you can only send the table values with post method or get using form or ajax and then put it in a template pdf file that you created. – hamed Oct 03 '17 at 22:17
  • I can't create a hidden input to send all this, it's not appropriate. Ajax seems to be only way to go but then still CSS is not in it. – Extelliqent Oct 03 '17 at 22:21