How is the right way to set Page Layout margin now? In borb 2.1.15 works properly and in examples is some like this too:
from borb.pdf import Document
from borb.pdf import Page
from borb.pdf import PageLayout
from borb.pdf import SingleColumnLayout
# create an empty PDF
doc: Document = Document()
# create an empty Page
page: Page = Page()
doc.add_page(page)
# set a PageLayout
layout: PageLayout = SingleColumnLayout(page, horizontal_margin=Decimal(50), vertical_margin=Decimal(50))
But in actual borb 2.1.16 this does not work.
I tried w= and h= but still not lucky.
disclaimer: I am the author of
borb.At some point, the signature of
SingleColumnLayoutchanged to be more consistent with the otherLayoutElementobjects. You can either useSingleColumnLayout(which does not allow you to set these parameters), or you can useMultiColumnLayout(from whichSingleColumnLayoutinherits).MultiColumnLayouthas the following (default) parameters:Your complete example would become: