0

I have a custom select query data and i want to export those data in to downloadable pdf
How can i do this? Those selected query data changes according to the users. This data is like invoice any idea about this?

I used below code but i can't open the pdf.

 $filename = "tender_report_" . date('Ymd') . ".pdf";

  header("Content-Disposition: attachment; filename=\"$filename\"");
  header("Content-Type: application/pdf");
vimuth
  • 5,064
  • 33
  • 79
  • 116
  • 1
    Possible duplicate of [How could you dynamically create a pdf within wordpress?](https://stackoverflow.com/questions/13133066/how-could-you-dynamically-create-a-pdf-within-wordpress) – Zsmaster May 15 '19 at 07:54
  • Is the file already a PDF? If it's not, you need te create a PDF first using a tool like Dompdf https://github.com/dompdf/dompdf – Sjors May 15 '19 at 08:50

0 Answers0