use query in htmlToPDF