PrintFriendy & PDF module is a wrapper around printfriendly & PDF button (see: http://www.printfriendly.com) that allows a drupal user to automatically create printer friendly and PDF versions of drupal content without the hassle of having to create a print CSS file.

The administrative configuration options are very basic and currently allow users to pick content type for which printfriendly button will appear and how the button will actually look when displayed (icon image).

Project page: http://drupal.org/sandbox/printfriendly/1839150
Git: git clone --branch 7.1-1.x printfriendly@git.drupal.org:sandbox/printfriendly/1839150.git
Drupal version: 7, no further dependancies

Comments

grisendo’s picture

grisendo’s picture

Status: Needs review » Needs work
printfriendly’s picture

Status: Needs work » Needs review

Ventral review errors are now fixed.

indydas’s picture

Hi there,

Nice little idea for a project there. I'm just wondering how it differs to http://drupal.org/project/print which I used in other sites previously?

Thanks!

grisendo’s picture

Status: Needs review » Needs work

Beware!

You are adding drupal_add_js function inside printfriendly_create_button which is block content generation function. When using block caching, JS will be added the first time, but after that, the rest of the time JS won't be added.

Instead of that, check if you can generate 'content' as an array with '#markup' and '#attached' attributes in hook_block_view:
http://www.jaypan.com/tutorial/adding-css-and-js-cached-block-drupal-7
I am not 100% sure if you can since you use scope=footer and type=external.

printfriendly’s picture

Hi!

Thanks for your interest in this module.
Actually the project is quite different. In this module the printfriendly & pdf javascript library from http://www.printfriendly.com is used as an interface to the drupal node content. This means that the user will receive a dialog after he clicks on the printfriendly button allowing him to preview and tailor content to his needs before actually printing or converting to PDF. For example, user can remove certain paragraph(s) or image(s), change font size, etc. After he is satisfied with the result he can print (or convert to PDF) the modified content he created using the printfriendly dialog.

In future releases of this module user will be allowed to create custom headline, control the display of the button with more options, etc.

printfriendly’s picture

Status: Needs work » Needs review

Thanks for the suggestion.
I did as you suggested and it worked ok for both (node view and block view). Had to slightly change the code though.
I hope it is ok now.

RadheyShyam’s picture

RadheyShyam’s picture

Sorry it is wrong post.
Thanks,

vineet.osscube’s picture

Status: Needs review » Needs work

Hi,

Please check manual review of code.

1). Remove space after dot from file printfriendly.module at line no 15.
2). Wrong implementation of hook_help(). In printfriendly.module at line no 11 function name is printfriendly_service_help, it should be printfriendly_help.

Thanks,
osscube

printfriendly’s picture

Status: Needs work » Needs review

Thanks for catching this.
It is fixed and I hope it is ok now.

lightsurge’s picture

It would seem there's already a project for 6.x http://drupal.org/project/printfriendly and you might be better off posting in there offering to maintain a 7.x branch? That project hasn't had any commits in 2 years, and seems like it would definitely benefit from the support in co-maintainership with or handover to the printfriendly team.

Anyway, I think perhaps your implementation of hook_node_view might be better if it followed the conventions of core module like book_node_view?

So something like:

function printfriendly_node_view($node, $view_mode) {
  if ($view_mode == 'full') {
    if (in_array($node->type, variable_get('printfriendly_types', array())) && user_access('access printfriendly')) {
printfriendly’s picture

Thanks for your comment. node_view is now reorganized as suggested.
Also, we have recently contacted the developer of 6.x module and asked him about merging our two modules. We still wait for the response.

Is it possible that you do the final review of this (7.x) module so it can become public asap and that we do the merge afterwards (just in case it takes time till we receive the response from the previous developer)?

anon’s picture

A merge sound like the best solution, I have added printfriendly (user/2220908) as a co-maintainer to the printfriendly project.

fr3shw3b’s picture

Status: Needs review » Closed (duplicate)

Well, you got your quick response from the developer and the 7 branch is already up and running... so I'm closing the issue.

apaderno’s picture

Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)