WP-3596 Added code to set the has_pdf during the node presave