Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I looked online to figure out a way to remove the book navigation from the generated PDF and couldn't find anything, so I thought I'd share how I did this... might not be the best way to do it, but it works quite well for me.
in pdfview.module, function theme_pdfview_node , I added the following after the line that says $content = drupal_render($node->content);
if($node->type == 'book'){ // Remove the book-navigation links from the PDF
$begin_remove = stripos($content,'<div class="book-navigation">');
$end_remove = stripos($content,'</div></div>',$begin_remove);
$content = substr_replace($content,"",$begin_remove,$end_remove-$begin_remove+strlen('</div></div>'));
}
This was just a quick workaround which worked for me... hope it's useful for someone.
Comments
Comment #1
rconstantine CreditAttribution: rconstantine commentedThanks!!!
Comment #2
rconstantine CreditAttribution: rconstantine commentedWorks well.