I am working on a requirement where I have a link "get report". When User clicks it, the information is fetched from DB and a PDF report is generated. Finally the PDF file will be shown to the User to download or view in browser. I want to know what is the better way of implementing the link, onclick functionality. Do I have to use Ajax module or something else. Please help.


That should prove easy to do with Views PDF. It is easily customisable compared to other PDF modules. However if you're planning yo do complex reports that is one thing drupal doesn't excel in.


I'm using Views PDF with the TCPDF library (as suggested) and it is AWFUL. The comments mention rendering will be slow, and that is an understatement. It is ATROCIOUS.

I'm looking for a better solution myself, but be wary. Generating a PDF is not only time consuming with the Views PDF/TCPDF combo, but it is practically unusable and offers a horrendous user experience.


Have you tried the Fill PDF module. This may be the one you are looking for.

  • Thank you for the answers. Generating PDF is part 2. I think I did not give proper subject. First step is to have a link on the existing page and implement ajax or some other logic to call a function which generates the PDF content. It would be helpful if some one explains better way of implementing the first part. – Gururaj Dec 15 '12 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.