My question would be: Is it possible to provide a copy of documentation in PDF format on website for downloading?
It may be helpful if you can tell us why you specifically want PDF format.
Under Documentation > Documentation Downloads you can find a number of easy-to-download formats, including "single file HTML", which should be easier to convert to PDF while maintaining navigation:
https://www.php.net/download-docs.php
Given the size of the file you'll almost certainly need to
download a html-to-pdf conversion tool rather than using a
web-based tool. Unfortunately I don't have any suggestions here. I
did try "print to PDF" in Chrome on Windows but that ran out of
memory for me generating the print preview.
(For the more adventurous) The PHP documentation is built using PHD, which lists PDF as a supported output format:
https://github.com/php/phd?tab=readme-ov-file#supported-output-formats
Altho there's a pending PR from 2022 to "fix PDF generation", suggesting this might be currently broken:
https://github.com/php/phd/pull/69
Documentation for building the PHP docs can be found in the doc-base repository:
https://github.com/php/doc-base/blob/master/docs/local-setup.md
If you need further help, I would suggest posting to the docs mailing list, or the php-doc channel on the https://phpc.chat/ community Discord