Improve Page API for single-page documents, get_page_bbox for multipage documents
What does the merge request do?
Closes #479 (closed) (cc @Moini)
Implementation notes
API Change: For zero-page documents, new_page() now automatically creates the first page based on the viewbox dimensions. get_pages() also always returns at least one page.
Summary for release notes
The Page API has been reworked to make adding or querying page information more inutitive. In particular, add_page only needs to be called once (was twice) in a single-page (pre-1.2) document to add a second page.
The get_page_bbox
function now supports multipage documents.
Checklist
-
Add unit tests (if applicable) -
Changes to inkex/
are well documented -
Clean merge request history