1. This issue http://drupal.org/node/194783 clarifies that Panel Pages are not nodes.

2. The Print module expects an NID to process to PDF (link = printpdf/nid)

3. I have a beautiful and very functional Panel Page set up (thanks Merlin and crew...fantastic extension for Drupal!), and now have come to face the problem that my users cannot simply hit a "print ot PDF" link and get their page sent to a file.

Any ideas/workarounds?

Comments

merlinofchaos’s picture

Panels doesn't support any PDF stuff and probably won't on its own. It would take another module to do this, and I'm not sure that anyone has put any effort into doing this. In short this may not be plausible without some development work from somebody.

boabjohn’s picture

Thanks M'C...

I am not sure that the PDF issue is the central focus. I think it's really more about how to provide a portable container for a Panel page.

The Print module will accept a custom template, but again, this depends on being able to address a particular "container" and the elements inside it.

The PDF example calls up a set of specifics. Here's what can be done now, I think:

1. We can look at the Panel page and see all the content elements on it...views, nodes, blocks, etc...
2. Then we open up a new tpl and hand-build a reference for each element
3. Then call this template when the user clicks on "Print to PDF" from the nice panels page.

Of course this is:
a: tedious
b: creates a content/presentation "fork" between what we build/maintain through the Panel interface vs the tpl elements

That appears to be "just the way it is...", but I appreciate you having a think and confirming that's the case from your high-level architect's perspective.

Thanks.

esmerel’s picture

Category: support » feature
merlinofchaos’s picture

Can you tell me more about what is meant with a portable container? Is this an HTML construct that is well-identified or is this a code thing where you can get the content of a panel page easily from a function call?

boabjohn’s picture

G'Day and thanks for the clarifying comment...

You will have a far deeper view of these matters than I, but "portable container" is my own abbreviation for a way to pass a panel assemblage to another rendering agent. And, aside from sending it to a printer (webkit HTML to PDF in this case), I can't think of another situation where this capability might be useful.

You'll appreciate the inelegance of a fork in the content that occurs because I happen to need my panel page rendered in a PDF. The content of the panel page is painstakingly replicated in a static print template. Any change to the panel page content means a round of manually mirrored changes to the pdf template.

I've solved my immediate problems and accept that the world is still a hard place...

Thanks heaps for your work and magnificent modules.

merlinofchaos’s picture

I admit I'm still struggling to make sense of what you need. You use a lot of words that don't really match the terms I use for parts of a panel, so I don't understand how they map to the code or the constructs in your mind.

Let me break this down for you:

Page
A page, from the page manager perspective, is everything all assembled, and eventually sent as $content to page.tpl.php, which may add more stuff to it, such as the header, sidebar, footer, etc.
Panel Display or just Panel
These 3 terms get used fairly interchangably: Display, Panel display, Panel. Generally a page is made up of a single panel display, but thanks to mini panels, there can be other displays embedded within it. Also, panel nodes use displays as well.
Layout
The layout is the actual template that a display is made up of. There's the flexible layout, which you can control with the UI, and fixed layouts, that are unchangeable in the UI but can be created very precisely.
Region
A specific region for placing panes within a layout.
Panes, content panes
A specific piece of content that is placed in a panel region.

When you say assemblage, I don't know if what you want is the full set of panes in their regions prior to the layout being rendered for the display, or if you just want the whole thing packaged up and sent to a different template than page.tpl.php.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)
roginald’s picture

not sure if this is appropriate but the print module will work if you just prepend 'print' before the url alias of your panel page. i've tested both 'print' and 'printpdf' for generating a pdf from a panels page and both work fine. of course, the css needs tweaking, but it wouldn't be too much to make something work i don't think.

boabjohn’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks for all the feedback: I've coded a pdf template to 'solve' the problem. Closing ticket.

bjmiller121’s picture

Prepending the URL with "print" or "printpdf" seems to work for me as well, but an even simpler solution is to go to the Printer, e-mail and PDF versions configurations page (admin/settings/print) and in the box labeled "Show link in system (non-content) pages", just put in the url alias for any page including any panels page that you want a print link on. You can do this for each each print type you want to include (printer friendly webpage, PDF, send to friend).

smiletrl’s picture

hi, boabjohn,
Could you give me some hints about how to make the pdf tpl recognized by its pdf url?
Saying, there's a panel page about-us, and it's print url could be print/about-us. This page has a default page. I guess that is from print.tpl.php too. Now I want to override that page with a pdf tpl. So, what's name this tpl, should be?
Thank you very much.

smiletrl’s picture

Hi ,roginald,
Currently, I want to print some panel pages and views pages into pdf. I know default print url looks like this "print/". But how can we override that page with a print pdf template? Or more specificly, what's name we should assign to pdf tpl, so this tpl will be used for that panel print page? I know the naming convention for node page is kind of like this "print__node__{$type}__{$nid}".
When you were saying "css needs tweaking", could it be tweaking the default print page? I checked the default print page for a panel page. I think it uses the default print.tpl template from print module to create this page.
Any help will be appreciated. Thank you.

liquidcms’s picture

we couldn't get printpdf/mypanelpage to create a pdf. once we unchecked "Disable Drupal blocks/regions" for the panel; it worked fine.