my template is more than 1 page, and each node is printed on one template. ie, one node = 3 page PDF template, next node, same 3 page template. I can use page breaks and the PDF template to get halfway there, but the last page of the template is the only page that gets repeated. I need the entire template to be repeated (3 pages), so after the 3rd page of the template, I need the first page of the template to come next (instead of just repeated the last page over and over again). if I have a template that is 3 pages and I am trying to print 15 nodes, I would have 15 3-page templates

kind of rambling, does this makes sense?


trapper’s picture

i hacked around with views_pdf_template.php and got my answer. For those of you wanting this same funtionality, add this code at line 828

else {
          $index = min($this->mainContentPageNumber, $numberOfPages);

+        if(($this->mainContentPageNumber % $numberOfPages) == 0) {
+            $index =  $numberOfPages;
+         } else {
+             $index = ($this->mainContentPageNumber % $numberOfPages);
+         }
richH’s picture

Love it!

thanks so much for the fix. This functionality seems (to me) to make more sense than repeating the last page. Or it would be good for this to be an option in the PDF settings.


killua99’s picture

Category: support » feature
Priority: Normal » Major
Status: Active » Postponed
Issue tags: +accepted feature request

This is kinda a feature request, I'm going to evaluate this when I finish with the Critial Issue.

killua99’s picture

Version: 7.x-1.0 » 7.x-2.x-dev
Issue summary: View changes
Status: Postponed » Active
Issue tags: -accepted feature request

Moving to the next version. This could be useful for some people.

killua99’s picture