Menu

#45 When changing pagesize, width is inaccurate

essential_fix
open
platypus (9)
5
2003-02-21
2003-02-21
No

I have a class that subclasses SimpleDocTemplate, it
modifies the pagesize parameter to landscape(A4).
The problem is that I create flowables before the build
process starts, and need to access the width attribute,
however it's not reported accurate until the build
process start, eg when self._calc() is called in
SimpleDocTemplate.build()

The workaround for the moment is to call self._calc()
when changing the pagesize, this is however sub-optimal
since the function is marked as private.
Is it possible to move it up to the constructor so if
the user want to access the margin or measure variables
before build() is called.

Discussion


Log in to post a comment.