Generates printer-friendly HTML for a node.
\Drupal\Core\Entity\EntityInterface $node: The node that will be output.
$children: (optional) All the rendered child nodes within the current node. Defaults to an empty string.
The HTML generated for the given node.
function book_node_export(EntityInterface $node, $children = '') {
  $build = node_view($node, 'print');
  unset($build['#theme']);
  // @todo Rendering should happen in the template using render().
  $node->rendered = drupal_render($build);
  $book_node_export_html = array(
    '#theme' => 'book_node_export_html',
    '#node' => $node,
    '#children' => $children,
  );
  return drupal_render($book_node_export_html);
}