Closed (duplicate)
Project:
Printer, email and PDF versions
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
2 May 2009 at 12:32 UTC
Updated:
21 May 2012 at 09:20 UTC
For quite some time I worked with Wordpress and I found a pdf module which creates wonderfully customizable pdf files. Its called article2pdf - http://wordpress.org/extend/plugins/article2pdf/. The feature which struck me was the possible upload of a template pdf with header and footer which would be included into the output file.
It would be great to include this function to this plugin since the created pdf files don't look very stylish so far.
Comments
Comment #1
jcnventuraHi,
There's a lot you can do to costumize the style of the generated PDF files, just use the theming functions.. Article2pdf uses FPDF and FPDI. Since FPDF doesn't accept HTML input, I decided against using it as a PDF generation library, as whatever it does, TCPDF does better (and is better supported).
It might be interesting to use FPDI together with TCPDF, as indicated in that tool's homepage. I will take a look at it when I have the time (it probably won't be soon)..
João
Comment #2
jcnventuraTCPDF now supports including full page backgrounds... Only with images, though and not PDFs. However, I think that the objective of a 'PDF template' would be accomplished by a 'image template'.
However, until this becomes widely requested, I think the best option is to use the module's themeable functions to use this functionality.
João
Comment #3
gianfrasoft commentedI realized a watermarking system based on FPDF and FPDI: every time a specific user download a pdf file from my Drupal site, it comes with a specific watermark printed over every page.
To do this, I changed the theme_upload_attachments API (in which I verify user id and file requested); now it includes a new link on every document's anchor: the user can get the file through a PHP script that call the FPDI library (I positioned FPDF and FPDI libraries in a specific directory of my Drupal installation) and generate a new pdf file for the user; that file has the watermark on it.
I'd like to create a module to include FPDF and FPDI library in my Drupal installation. I'd like also to give to this module the ability to replace the theme_upload_attachments functionality to give it a standard ability of watermarking pdf documents.
Does anybody can suggest me a solution for these questions?
Thanks a lot.
Comment #4
gianfrasoft commentedI also substituted FPDF library with the TCPDF one and everithing's great (now I can use watermark with alpha variation). So now, pease, consider my questions referred to TCPDF and FPDI library...
Comment #5
ukrdrupal commented...subscribing
Comment #6
jcnventuraMoved these requests into a catch-all issue: #1591718: Add support for other PDF libraries