Unable to PDF print full variant content

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
windtrader's picture

I'm having trouble printing a panel variant composed of several rows, some with multiple regions. It displays properly on the website but when viewing the PDF version, some region data does not show. I would like to print all the components in the variant, including the multiple rows/regions in a single PDF file, not individual regions.

I am using the PDF option of print module, dompdf module, and dompdf lib. When I test on a simple view displaying a single node I see the PDF-version link and it displays the node content properly.

There are actually two issues. One is the need to configure the panel variant so when it displays there is a single PDF version link that displays all the variant content. Second issue is getting all regions in the variant to display its region content as some come up empty.

Attached are snapshots of the variant layout for reference.

The top row includes a row and region using EXISTING NODE that displays a node with a given nid. This region shows the content.

The next couple rows contain regions that reference views and pass arguments from the panel to the view. These show on the web page but do not show up or show the PDFversion link.

The last row is like the first and displays OK.

Really out of ideas at this point after trying many different ideas. I am thinking if all fails, I can create one single view containing all the variant regions and have one panel row with one region call that view and pass the arguments and hopefully that will print the entire variant content but lots of work if there is a better way to get variant panel page with multiple regions to pdf print properly.

AttachmentSize
2011-02-15_1710.png82.63 KB
2011-02-15_1712.png56.93 KB

Comments

In relation to your first

Tafa's picture

In relation to your first issue, you can add a print section to your panel by adding the ready-made option of the print module in panel.

In relation to your second issue, you would need to do some tweaking beforehand. In effect, you can configure the module to a certain extent. However, if you want to customise it and display specific fields as mentioned, you would need to look at customising the template itself. In other words, you would need to do some HTML/PHP related custom work. If you are not versed into that, then your options are to:
a- rely on the print version of the module--- which renders the view/panel okay and frankly serve a better purpose than PDF as you can re-use the data at hand
b- try the viewspdf module and go from there (http://drupal.org/project/views_pdf). In particular, you can combine all views you want to display in a single big view using the embed view module ( http://drupal.org/project/views_field_view). And then, output this view as a pdf. Now, to be frank with you, I have been struggling with this so I am not sure this would be okay for me to recommend this to you. However, if you are good at it, then have a go.

Regardless of what you decide, you would need to do some work upfront to make it work.

As for me, I settled for the print version of the print module because it renders the panel page the way I want. There are other pdf generators out there but somehow i think these serve a specific purpose, i.e. more suited to those wanting to output graphics and so on.

In any case, you can wait and see whether new modules come up.
T