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.
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,...).
Comment | File | Size | Author |
---|---|---|---|
#5 | print-doc-1617654-5.patch | 54.24 KB | Norberto Ostallo |
#3 | print-doc-1617654-3.patch | 48.71 KB | Norberto Ostallo |
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedNice 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.
Comment #3
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedI'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.
Comment #4
jodym CreditAttribution: jodym commentedGot 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).
Comment #5
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedHere'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.
Comment #6
jodym CreditAttribution: jodym commentedHi 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.
Comment #7
jcnventura CreditAttribution: jcnventura commented@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.
Comment #8
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedActually 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.
Comment #9
Astrayus CreditAttribution: Astrayus commentedHi,
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.tplComment #10
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedAt 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'.
Comment #11
digibrill CreditAttribution: digibrill commentedDisabling, uninstalling and re-installing worked for me.
Comment #12
jcnventura CreditAttribution: jcnventura at Wunder commentedAlthough useful, I don't think it's worthwhile adding this to the module.