Getting error when trying to include wkhtmltopdf in WordPress custom php file

Solution:

You’re using the wrong function to get the path to your phpwkhtmltopdf library.

From the documentation:

Retrieve stylesheet directory URI for the current theme/child theme.

(…)

If you want to include a local file in PHP, use get_stylesheet_directory() instead.

(emphasis mine.)