I use the following script :
https://www.html2pdf.fr/en/home
This script convert my php file to pdf file.
Example the url : mywebsite.com/pdf/url.php?id=8 will generate a PDF file. Another example : https://github.com/spipu/html2pdf/blob/master/examples/example01.php
I don't want the google robot to index these pages.
I added the code below in my htaccess file but it doesn't prevent google from crawling the page because it's in PHP : #Block indexing of Word and PDF files <files ~ ".(doc|docx|pdf)$"> Header Set X-Robots-Tag "noindex, nofollow
I can't block it how do I do it?