Skip to content

Commit 7857e76

Browse files
committed
step
1 parent 137fedd commit 7857e76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

markdown_pdf/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(
2828
self.text = text
2929
self.toc = toc
3030
self.root = root
31+
self.page_count = 0
3132

3233
self.paper_size = paper_size
3334
if isinstance(paper_size, str):
@@ -120,6 +121,7 @@ def add_section(self, section: Section, user_css: typing.Optional[str] = None) -
120121
more = 1
121122
while more: # loop outputting the story
122123
self.page_num += 1
124+
section.page_count += 1
123125
device = self.writer.begin_page(section.rect)
124126
more, _ = story.place(where) # layout into allowed rectangle
125127
story.element_positions(self._recorder, {"toc": section.toc, "pdfile": self})

0 commit comments

Comments
 (0)