Reviewed & tested by the community
Project:
Pdfview
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2007 at 09:01 UTC
Updated:
17 Oct 2007 at 20:42 UTC
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 commentedThanks!!!
Comment #2
rconstantine commentedWorks well.