I want to add a captcha to the PDF generator from the Print Module so that my server doesn't waste time generating a PDF for robots and to prevent DOS attacks.

There is a similar question asked, but the accepted answer doesn't actually answer my question (the PDF Version part), but rather only the E-mail part.

Since the PDF Version doesn't link to a form, there isn't a form ID I can add to the Captcha module. Is there a way to require a CaPTCHA to download/generate a PDF?


1 Answer 1


First you should avoid captcha, their are not user friendly. But good new, in this case you don't need it :).

Print module generate the pdf once and cache it https://drupal.org/node/516466#comment-6390678. So DOS are not possible on pdf generation.

You can still have DOS by requesting a pdf thousand of time, saturating your bandwidth. If you are really worried about that you can for example configure Apache with mod_evasive http://systembash.com/content/how-to-stop-an-apache-ddos-attack-with-mod_evasive/

By robot I suppose you mean search engine robot. You can add that in your robot.txt (But I think is not necessary):

User Agent: *
Disallow: /*.pdf$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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