Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
I did a search for printer-friendly views, and there seems to be a lot of confusion surrounding the combination of these two modules (Print and Views).
Can the Print module do this? If not, can someone suggest a viable solution? Thanks.
Comment | File | Size | Author |
---|---|---|---|
#24 | print_printing-views_1421724-24.patch | 4.04 KB | adriancid |
#22 | interdiff-15-22.txt | 1.63 KB | dinarcon |
#22 | printer_friendly_views_22.patch | 3.16 KB | dinarcon |
#20 | page-view.jpg | 43.45 KB | wesleybpereira |
#15 | printer_friendly_views_2.patch | 3.17 KB | DevElCuy |
Comments
Comment #1
smscotten CreditAttribution: smscotten commentedI'm not sure exactly what you're asking. If you want to know whether you can use the Printer, email and PDF versions module with pages made by a View with display type Page, then the answer is yes. You might have to add your own links (/print/whatever) but it will just work.
Comment #2
haopei CreditAttribution: haopei commentedThanks for the reply, smscotten. I think you have answered my question.
I had wanted to know if this module can print a view. You're saying I can simply create a view with a 'page' display, and print the page instead.
Thanks again.
Comment #3
jcnventura CreditAttribution: jcnventura commentedComment #4
drupalina CreditAttribution: drupalina commentedHi, I'm also interested in making some of my Views printable, because my end-users narrow down their selections trough filters, and once they have the list that they are interested in, they would often like to print it on their printer.
I googled for some documentation on how to make this work, but couldn't find anything. So , how can we make Views printable?
Comment #5
jcnventura CreditAttribution: jcnventura commentedYou add the view path to the module's system page visibility settings.
Comment #6
drupalina CreditAttribution: drupalina commentedinside Show link in system (non-content) pages I selected Show on only the listed pages entered the following:
blog
blog/latest
blog*
and I can't see the Print link anywhere!
Maybe I need to enter something in View's header?
Comment #7
drupalina CreditAttribution: drupalina commentedplease ignore my previous comment #6. I forgot to set the permissions. All working perfectly now.
Comment #10
ressa CreditAttribution: ressa commentedI think this could be added to the module's description:
Comment #11
DevElCuy CreditAttribution: DevElCuy commented(Sorry for resurrecting this issue)
Got a use case where a bit deeper integration with views is needed. Some themers hate to have the "Printer-friendly version" link rendered somewhere else than within the actual views header/footer. It will be nicer to have a global views field that could be attached into the views header and plays well along with other options like custom texts and page numeration.
Comment #12
DevElCuy CreditAttribution: DevElCuy commentedPatch for comment at #11 attached.
Comment #13
DevElCuy CreditAttribution: DevElCuy commentedGot to fix file paths from previous patch.
Comment #14
DevElCuy CreditAttribution: DevElCuy commentedThis new version adds the missing QUERY_STRING (v1=val1&v2=val2) to the print link.
Comment #15
DevElCuy CreditAttribution: DevElCuy commentedNew patch that adds the static val: PRINT_PATH and adds the missing printlinks.css file on the view page, along with the print-link class into the anchor, so the link inherits predefined CSS rules.
Comment #16
zilla CreditAttribution: zilla commentedi read about another option on some other site that encountered this and what they did was insert some code into GLOBAL HEADER for the view, as PHP on input filter - and this way it will fully respect ANY filters that you apply to the view (very useful if you expose filters.
my only problem is that i'd like to style it a bit more (e.g. remove the filter from the printer-friendly iteration and so on)
here's the snippet for D7:
Comment #17
jmev CreditAttribution: jmev commentedHow do you theme a view that's rendered with this print module? Is there a naming convention that will enable the module to use the template, perhaps print--html--node--viewname.tpl.php, or something similar?
Comment #18
kumkum29 CreditAttribution: kumkum29 commentedHello,
I use the "views admin" module to manage users via a view.
I want to use a link to print results from this view in a pdf. This view includes a display page.
How do I include a link on this view to print the results? (the default path of this view is admin/people)
I have tested with admin/people/print/pdf (in path of the view) without success.
Thank you for your help.
Comment #19
dbourrion CreditAttribution: dbourrion commentedHad the same need here.
I simply put in the footer of the view a php code :
Comment #20
wesleybpereira CreditAttribution: wesleybpereira commentedGood evening to all!
First of all, I want to say that my English is bad and so I'm using Google translator (I'm from Brazil) and I also want you to forgive me if you're posting in the wrong place.
Friends, I need your help with the following: I created a page view with nodes of a particular content type. In this view created a table that displays the type, the title and author of the nodes. Can you help me insert a link Print the entire contents of that view? I want to generate a PDF / Print with Title and Body of all nodes listed in this view.
Note: Attached following image of my page view. I do not know to program in PHP, so if someone could put the code that is needed will be very happy! :)
Regards,
Comment #21
fgjohnson@lojoh.ca CreditAttribution: fgjohnson@lojoh.ca commentedwesleybpereira,
You could also use Views Data Export to export the contents of the currently filtered view to .CSV (Excel) and print from there.
Comment #22
dinarcon CreditAttribution: dinarcon commentedThis is an update to @develCuy's patch at #15 with the following change: !current_path does not include the website's base path nor PRINT_PATH. By doing this, it is possible to override in the Views UI which print format I want to use by setting the link anchor tag to: "/print/!current_path", "/printpdf/!current_path", etc.
Comment #23
dureaghin CreditAttribution: dureaghin commentedPatch #22 doesn't working as expected. Still can't print view block.
Comment #24
adriancidThis is an update to @develCuy's patch at #15 with the following change:
Add multilingual support.
And add a pdf image to the link
Comment #25
basya82 CreditAttribution: basya82 as a volunteer commentedI have a problem with printing view. Prints the link to page instead contents.
Тhis is my code.
a href="http://portalmam.com/print/103" title="Display a printer-friendly version of this page." class="print-page" onclick="window.open(this.href); return false" rel="nofollow"
Comment #26
basya82 CreditAttribution: basya82 as a volunteer commentedI have problem. Page created using views printing as a link of page instead the contents of this page.
Comment #27
redhatusr CreditAttribution: redhatusr commentedI can't print block created from views
I have tried with domPDF and with the mPDF
I have tried to print the block with php from page.tpl.php or just to set it visible from drupal block mamagment
I have tried the patch #24 and #22 and the footer code of #19
any solution ?
Comment #28
adriancid@redhatusr If you use the patch #24 Add in the Footer of your Views this: Global: Printer-friendly version an you will see the link
Comment #29
redhatusr CreditAttribution: redhatusr commented@adriancid the problem is not the link.
The problem is the code in page.tpl.php that print a views block is ignored by this module.
Comment #30
adriancid@redhatusr read this:
http://drupal.stackexchange.com/q/183499/28275
Comment #31
redhatusr CreditAttribution: redhatusr commented@adriancid the _views_ block that i print with php in the page.tpl.php is working fine when i view the page (node/11).
The problem is only in print (print/11) and pdf (printpdf/11)
Comment #32
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedit no longer applies:
patch -p1 < print_printing-views_1421724-24.patch
patching file includes/print_views_handler.inc
patching file print.info
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file print.info.rej
patching file print.views.inc
Hunk #1 succeeded at 16 (offset -1 lines).
Hunk #2 succeeded at 117 (offset -4 lines).
more print.info.rej
--- print.info
+++ print.info
@@ -3,5 +3,12 @@
core = 7.x
package = "Printer, email and PDF versions"
files[] = print_join_page_counter.inc
+files[] = includes/print_views_handler.inc
dependencies[] = node
configure = admin/config/user-interface/print
+
+; Information added by Drupal.org packaging script on 2014-04-02
+version = "7.x-2.0"
+core = "7.x"
+project = "print"
+datestamp = "1396426766"