I am opening this issue to let you know about a module I've started developing that integrates Print module.
It allows generating Word documents (.doc) and requires print module version >= 2.x.
At the moment the project is still in the sandbox, but it can be freely tested. Here the link: Print doc.
Feel free to do whatever you like with my module (help contributing, ignore, steal and add to the print module,...).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcnventura’s picture

Status: Active » Fixed

Nice to know about it.. I hope you manage to bring it to completion.

I can accept the module as a contrib patch to integrate with this one, and assuming it's small enough, I may even help maintain it. Please be aware I've recently moved some code that I was duplicating in print_pdf and print_epub to the print/includes directory. In prior versions one of the maintenance nightmares was that I had code triplicated in print, print_mail and print_pdf, and I am trying to avoid this situation from re-occurring.

I am marking this fixed, as I use the issue queue as a to-do list of pending tasks/bugs, and there's nothing for me to do here.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Norberto Ostallo’s picture

Status: Closed (fixed) » Needs review
FileSize
48.71 KB

I'm sorry I haven't been able to post this as a patch before, but here it is!
I've updated it to work with print 7.x-2.x-beta2 (avoiding to replicate as much code as possible with).
I think this could be a very useful update and completely replace Node to Word module.

jodym’s picture

Got it to work, YAY thanks, downloads as word doc..

However when I update nodes I get the following

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'size' in 'field list': UPDATE {print_doc_node_conf} SET size=:db_update_placeholder_0, orientation=:db_update_placeholder_1 WHERE ( (nid = :db_condition_placeholder_0) ); Array ( [:db_update_placeholder_0] => [:db_update_placeholder_1] => [:db_condition_placeholder_0] => 423 ) in print_doc_node_update() (line 301 of /modules/print/print_doc/print_doc.module).

Norberto Ostallo’s picture

FileSize
54.24 KB

Here's an updated patch. It should solve the SQL error and adds cache handling as used in the print_pdf module.
Feedback and testing are welcome.

jodym’s picture

Hi Norberto Ostallo applying the patch brought up the following error.. Although I don't think its anything to do with the patch. If I uninstall the print_doc and set it back to yesterdays version I still get the same or similar message...

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'size' in 'field list': SELECT nid, size, orientation FROM {print_doc_node_conf} WHERE nid IN (:nids_0); Array ( [:nids_0] => 55 ) in print_doc_node_load() (line 285 of /home/sandbox/domains/drupal7.sandbox.core-ed.org/public_html/sites/all/modules/print/print_doc/print_doc.module).

Thanks for your work on this, more than happy to keep testing as I think there is a need for this.

jcnventura’s picture

@Norberto Ostallo: The icon you used, where did it come from? It seems to be a reduced version of the official Word 2007 icon that is (c) Microsoft.

@jody: it seems you may be using an older version of the module. Try to disable, and then totally uninstall the module (there's an uninstall tab for that). Then you can re-enable the module and it should create the database properly.. Disabling and re-enabling is not enough.

Norberto Ostallo’s picture

Actually I was using that icon for a personal site and I didn't think about copyright. It was just the first one I found on Google, feel free to change it.

Astrayus’s picture

Hi,
are you still developing this module or it has been dropped out?

I've been using it for a month now and except for a couple of 'Notice' (see below) it's doing it's work just fine, so i'm looking to use this without the dev version.

The only downside i found is that word refuse to style the <hr> correctly and i had to remove <hr class="print-hr"> from printer.tpl


  • Notice: Use of undefined constant PRINT_PDF_CONTENT_DISPOSITION_DEFAULT in print_doc_htmlheader_print_doc_generate() line 28 ... print_doc_htmlheader.pages.inc
  • Notice: Use of undefined constant PRINT_PDF_IMAGES_VIA_FILE_DEFAULT in print_doc_htmlheader_print_doc_generate() line 29 ... print_doc_htmlheader.pages.inc
  • Notice: Undefined variable: filename in print_doc_htmlheader_print_doc_generate() line 45 ... print_doc_htmlheader.pages.inc
Norberto Ostallo’s picture

At the moment I have no free time to keep on developing this patch, which I don't think it has even been included in the -dev version of print module.

Hi, the errors are due to a bug in the patch. You should replace the occurrences of 'pdf' with 'doc'.

digibrill’s picture

Issue summary: View changes

Disabling, uninstalling and re-installing worked for me.

jcnventura’s picture

Status: Needs review » Postponed

Although useful, I don't think it's worthwhile adding this to the module.