Does Print module -only- support a node? Meaning you can't print Taxonomy, Profiles, Products, Users, or anything else with Print module? I tried using print/id and it only worked on node content.

Comments

jcnventura’s picture

Version: 7.x-1.1 » 7.x-2.x-dev
Category: support » feature
Status: Active » Postponed

No.. Only nodes and system-generated pages like views, or you can simply use print/entity/id, that should work.

Drupal 7 has been out for a year, and this is the first time someone asks about generic entity support.

kevinquillen’s picture

print/entity/id seems to work.

jcnventura’s picture

Yes, print/node/id also works. It uses a different generation path that doesn't use the print view mode, other than that it's the same.

kevinquillen’s picture

Okay. Didn't see that.

Simon Georges’s picture

jcnventura’s picture

Interesting, I'd never seen that.. It's a pretty thorough rewrite of the innards of the module.. And yes, it does seem to support generic entities.

Marc-Antoine’s picture

hello, I also want to solve that problem.

I see that writing the path with the entity type works (i.e. print/file/fid) but the print button still doesn't show on these entities' pages.

Is there a way to show the print button anyway? Is this a 7.x-2.x feature?

Marc-Antoine’s picture

Status: Postponed » Active

changing the status

Stan Turyn’s picture

Yes, having good entity support in Print would be great. Drupal Commerce and supporting modules use entities all over the place - this module could be really useful for orders, invoices etc.

jcnventura’s picture

Status: Active » Postponed

Marc-Antoine: some status are for me as module maintainer to decide.. This is not a 'bug' per se.. It's a feature that I will implement when I (or someone else) has the time.

kaido.toomingas’s picture

Hey a bit fun with this one. printpdf/user/1/orders/34 gave me pdf :) Used drupal commerce for that but you can download any page like that..

nigelw’s picture

Just chiming in here to see if anyone has worked on this. The ability to use this on any entity, especially the order entity in commerce would be killer.

kaido.toomingas’s picture

#12 http://drupal.org/project/commerce_pdf_invoice this should work for you. I did create order2pdf module really this is not the same but may help http://drupal.org/project/commerce_order2pdf.

nigelw’s picture

Thanks kaido24, but I also need the email and print features included in the Print module too for commerce.

deardagny’s picture

@nigelw @Stan

I had a related issue regarding Commerce – I wanted visitors to be able to email a product variation, but the email link was only sending the product display node. Not sure if it'll help in your cases, but I solved it by creating a custom view and embedding it in my print.tpl. The view returns product variation fields using a relationship and argument. I then embedded it in the tpl like so:

<?php print views_embed_view('product_quickview_content','page', $node->title); ?>

This way, the views results (actual product variation information) is passed to my emails. Hopefully this is useful to people in similar spots.

rcodina’s picture

Issue summary: View changes

@jcnventura When do you plan to support generic entities? This feature would be great for many users now that we see Entities everywhere on drupal.

I'm using EntityForm module and I want to print the confirmation page as PDF. I tried the URL "print/entityform/id" and it prints only the submitted data and the footer. But it doesn't printout the "Submission reply" textarea and the header and I need to print that too.

jcnventura’s picture

@rcodina: I believe that will happen when the D8 print module gets backported into D7.. I don't plan to change the architecture so radically for the existing D7 module.

bisonbleu’s picture

I had a similar issue. I wanted my customers to be able to save/print their orders to PDF.

In the end the only easy viable solution for me was print.module combined with mPDF.

In admin/structure/views/view/commerce_line_item_table, I added excluded fields (uid & order_id) and a Global: Unfiltered text in the header with this:

<a href="/printpdf/user/[uid]/orders/[order_id]">Save order as PDF</a>

Works for me.

I also tried with commerce_packing_slip, which is really nice but only works in admin pages.

Sam152’s picture

Everyone should be using entity_print.

bisonbleu’s picture

Hey @Sam152, I didn't mention it but I did test entity_print... with high hopes.

I currently have 1 issue and 1 blocker with entity_print:

  • printing accents is broken (2718427)
  • and the fact that the installation is non-standard, one needs to install a package on the server (I have yet to try this on shared server)

The blocker is, I admit, a psychological one i.e. momentarily despicable laziness.

[Update: The accent issue has been resolved. I was able to setup entity_print up on Pantheon.io.]

I found the Quick start info a bit arcane. But kudo for the documentation!

I'll see how things go. :-)