-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty pages being added with dynamic paragraphs. #1125
Comments
Can you provide example code to reproduce the problem? |
Here is a chunk that recreates it:
|
It seems to be related to the nested paragraphs sections, but I think this should work, yeah? |
Having some code in the issues are always a good starting point for me or any other contributor. Maybe this could be avoided, if before creating a new page, we check if the content of the actual page is "empty". If the paragrapha text is rendered in the previous page and the new page only contains the "new line", than maybe the newPage() should do nothing? |
I currently do that. I check to see if current page is empty and if it is, I skip the newpage call. I think something is causing it to not be considered empty. |
Is there a known workaround for this? |
(v. 1.4.2)
I would like to be able to add a dynamic number of paragraph objects. After which, I would like to start the next section on a new page.
The issue is that sometimes there will be a blank page after my dynamic paragraphs and the next section. Just an entirely blank page with a page number on it.
I believe this happens because, in some cases, the paragraphs run RIGHT up to the end of the page and then the additional \n that gets added to Paragraphs ends up on the next page. I believe this is not being seen as "Empty" by the newPage() call. This is particularly visible with nested Paragraphs (which might be bad practice, but the issue still stands).
Is there a way I can check the contents that would be on the current page?
Is there something in the documentation that I missed that allows me to define the behavior of isPageEmpty()?
I also can't feasibly override this functionality because of the large amount of package-protected inner classes and amount of dependencies in the add method.
Does anyone have a solution to this issue?
The text was updated successfully, but these errors were encountered: