Skip to content

Commit 24518a7

Browse files
authored
Fix merging of multi-page template documents (#236)
1 parent 54a1d22 commit 24518a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ScribusGeneratorBackend.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,11 @@ def shift_pages_and_objects(self,
628628
groups_count,
629629
objects_count, version
630630
):
631-
vertical_offset = (float(page_height)+float(vertical_gap)) * \
632-
(index // records_in_document)
631+
vertical_offset = (
632+
(float(page_height) + float(vertical_gap))
633+
* (index // records_in_document)
634+
* (pages_count // 2 if document_element.get("BOOK") == "1" else pages_count)
635+
)
633636

634637
#logging.debug("shifting to vertical_offset %s " % (vertical_offset))
635638

0 commit comments

Comments
 (0)