Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jcnventura CreditAttribution: jcnventura commentedNo.. 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.
Comment #2
kevinquillen CreditAttribution: kevinquillen commentedprint/entity/id seems to work.
Comment #3
jcnventura CreditAttribution: jcnventura commentedYes, 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.
Comment #4
kevinquillen CreditAttribution: kevinquillen commentedOkay. Didn't see that.
Comment #5
Simon Georges CreditAttribution: Simon Georges commentedhttp://drupal.org/sandbox/davereid/1349802
Comment #6
jcnventura CreditAttribution: jcnventura commentedInteresting, 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.
Comment #7
Marc-Antoine CreditAttribution: Marc-Antoine commentedhello, 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?
Comment #8
Marc-Antoine CreditAttribution: Marc-Antoine commentedchanging the status
Comment #9
Stan Turyn CreditAttribution: Stan Turyn commentedYes, 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.
Comment #10
jcnventura CreditAttribution: jcnventura commentedMarc-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.
Comment #11
kaido.toomingas CreditAttribution: kaido.toomingas commentedHey 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..
Comment #12
nigelw CreditAttribution: nigelw commentedJust 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.
Comment #13
kaido.toomingas CreditAttribution: kaido.toomingas commented#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.
Comment #14
nigelw CreditAttribution: nigelw commentedThanks kaido24, but I also need the email and print features included in the Print module too for commerce.
Comment #15
deardagny CreditAttribution: deardagny commented@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.
Comment #16
rcodina CreditAttribution: rcodina commented@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.
Comment #17
jcnventura CreditAttribution: jcnventura commented@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.
Comment #18
bisonbleu CreditAttribution: bisonbleu commentedI 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 aGlobal: 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.
Comment #19
Sam152 CreditAttribution: Sam152 at PreviousNext commentedEveryone should be using entity_print.
Comment #20
bisonbleu CreditAttribution: bisonbleu commentedHey @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)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. :-)