Search code examples
phpmetadatawkhtmltopdf

Adding Title, Author, Subject, Keywords metadata with wkhtmltopdf


Is there a way to add metadata (e.g. Title, Author, Subject, Keywords) to a PDF when creating it with wkhtmltopdf from the command line via PHP?


Solution

  • The many command line options for wkhtmltopdf are documented at http://wkhtmltopdf.org/usage/wkhtmltopdf.txt (also available by running wkhtmltopdf -H). You can set the title of a PDF via the --title global option. Currently there does not appear to be support for specifying author, subject, or keywords metadata.