Hello,

I needed to merge a pdf generated with the Print module (from a Views display ) with pdf files attached to the node from which the display was composed, so I tried using the Views Append submodule. While it does seem to recognize tokens / Views rewrite patterns although it does NOT list them, the problem is that the same attachment is printed 3 times: the first time it's also only partially displayed in a a4 page, the other two times it is displayed in full in a wider format page.

I also wonder about the name of the module. To "append" means to add at the end, so a more appropriate name wouldn't perhaps be Views PDF Embed?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tuccio’s picture

Title: View Append displays external pdf files multiple times and erratically » Views Append displays external pdf files multiple times and erratically
Issue summary: View changes
vegansupreme’s picture

Including views seems to have similar problems.

#2072889: Include View Duplicates Content

killua99’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
vegansupreme’s picture

Status: Active » Needs review
FileSize
2.08 KB

I think this patch fixes it. So far I've only done one test.
It mostly just adds this variable $this->view->pdf->render_flag[$index] and an if statement to check if this variable has been set. Quick and dirty.

killua99’s picture

Assigned: Unassigned » vegansupreme
Status: Needs review » Needs work
  1. +++ b/modules/views_append/views_append_handler_append_view.inc
    @@ -52,33 +52,41 @@ class views_append_handler_append_view extends views_handler_field {
    +    if (isset($this->view->pdf->render_flag)) {
    

    We should use

    if (empty($this->view>pdf->render_flag)) { ... }
    
  2. +++ b/modules/views_append/views_append_handler_append_view.inc
    @@ -52,33 +52,41 @@ class views_append_handler_append_view extends views_handler_field {
    +    // Do nothing.
    

    Wat? (typo I know)

kevster’s picture

First of all many thanks for this very useful and needed module and also thx for supplying the patch file.

Ive just applied it against 7.x-1.4 ok but Ive noticed that although its fixed the duplication the appended view has been added before the main view and the layout is off only showing half the page?

If I run both views separately they work fine so I know its not a layout issue.

Attached screenshots below of pdfs.

kevster’s picture

killua99’s picture

Status: Needs work » Closed (outdated)