Posted by dsm on March 6, 2012 at 7:18pm
There are several modules that rely on the tcpdf library (print, etc). I would like to create a wrapper module that will allow us to treat tcpdf like any other library and rewrite the cache location (for generated PDFs) to a configurable directory within the files directory.
This will allow TCPDF to play nicely within drupal and give the flexibility of adding the library to the drush make file.
Comments
Improved tcpdf caching would
Improved tcpdf caching would definitely help site performance across the board.
@emarchak
Improving the caching would be wonderful, but I am proposing moving the cache directory for tcpdf within the files directory.
views_pdf might do this already?
I'm a little new to the PDF generation scene, but I think the Views PDF module might already implement the TCPDF library through the Libraries API module:
http://drupalcode.org/project/views_pdf.git/blob/refs/tags/7.x-1.0:/READ...
Having said that, there are a few PDF generation libraries out there, so maybe there's a niche for creating an library abstraction module like WYSIWYG module or the failed Starbox API module?
Even if you don't want to implement a bunch, it might be helpful to start an abstraction module with two libraries in mind, as then you can architect it more effectively -- you know they say about trying to build an abstraction with only one implementation... :)
And hey, a good starter the
And hey, a good starter the the wrapper regardless, would probably make all these TCPDF settings configurable. They're a little hard to tweak from drupal at this point...!
http://tcpdf.git.sourceforge.net/git/gitweb.cgi?p=tcpdf/tcpdf;f=config/t...
Great idea
Sounds like a really good idea, especially if Views_PDF (and the Print module) could be updated to use the central tcpdf wrapper - less headaches all round, besides installing the additional module.
Any news on this?
I'm stuck with Print module, because it's awesome to do what it does from the start, print nodes(and it get even better with the PDF generation based on the drupal path), but it need to be improved a lot to be a useful tool for general purpose PDF generation, lacking many customization options.
As i'm seeing from this thread, looks like there isn't a module more "API focused", so maybe it could be useful to create one.
From my searches, TCPDF is by far the best option, not only because of the tech specs, but it is the only community alive, so that we can count on for future improvements.
TCPDF integration module
I made a wrapper module for TCPDF. This is an API module, and currently does not provide any user interface, but if you want to use tcpdf from your own module, you may find it useful.