[reportlab-users] ReportLab and AcroForm
Dirk Holtwick
dirk.holtwick at gmail.com
Tue Jul 29 09:18:33 EDT 2008
Stephan Richter wrote:
> Hi all,
>
> I have looked at reportlab.pdfbase.pdfform today. The support for Acroforms
> seems very minimal. Is there any development in this area?
>
> Over time I might be interested in developing better Acroform support. I have
> downloaded the PDF reference and can see a basic structure. Is there higher
> level documentation on how to implement new features at this low level?
>
> Regards,
> Stephan
Hi,
since this mail has never been answered I have to place the question
again ;) I'm also interested in using the AcroForm feature in Platypus.
Are there any examples? Stephan, did you improve this feature as
mentioned in your mail?
I already wrote a simple flowable that should write a checkbox, but this
didn't work. I think AcroForm needs to do some manipulations that are
refused by Platypus? Here is my example:
-----------------8<---------------[cut here]
import reportlab.pdfbase.pdfform as pdfform
class PmlInput(Flowable):
def __init__(self, width=10, height=10):
self.width = width
self.height = height
def wrap(self, *args):
return (self.width, self.height)
def draw(self):
c = self.canv
pdfform.buttonFieldAbsolute(c, "field2", "Yes", 0, 0)
c.rect(0, 0, self.width, self.height)
-----------------8<---------------[cut here]
Thanks in advance
Dirk
More information about the reportlab-users
mailing list