[reportlab-users] Placement of forms when using doForms()?

Andy Robinson reportlab-users@reportlab.com
Thu, 19 Dec 2002 18:35:45 -0000


> I'm placing pdf files as backgrounds on other pdf files by importing them
> into forms using pageCatcher.restoreForms and later on Canvas.doForm().
> The problem is that the background is not placed exactly on the
> page, but a bit
> down and to the right. I have tried calling Canvas.translate(0,0) before
> doForm(), but it didn't help. Any suggestions on what I might do be doing
> wrong?

You need non-zero values in Canvas.translate(..) or it
won't do anything :-)
Is the size of the original page you made into a form
the same size as the output page you are drawing?

eg. if you took a letter size page and made it into a form,
then drew it on A4, it would 'miss' because the origin
is the bottom left corner.  It's easy to assume someone
else's pre-printed document is A4 when it is not exactly
that size.

Forms have no intrinsic size.  Think of it as very large
overhead 'projector slide' or piece of tracing paper
you can move around.

Thanks,

Andy