-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
Extend NewPage with freeSpace #1648
Labels
Comments
Looks good to me. Please provide an implementation PR. |
Hi David
Thank you for your positive response. I will gladly prepare a push request. However, this is the first time that I will be returning a PR via a fork. I may therefore need some support...
My first question is, where do I get the missing font files from so that all Golden tests work successfully? 9 of 166 tests are failing because following fonts are missing: hacen-tunisia.ttf, noto-sans.ttf, genyomintw.ttf and material.ttf. Unfortunately, I couldn't find it on the Google Font page.
Thanks for your support.
Stefan
|
THe font files and other assets are downloaded using the makefile. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use Case
I only want to execute a page break if the free space of the page is less than e.g. 50mm:
Would it be possible to add a new parameter 'freeSpace' to the existing widget NewPage so that the page break is only executed if the free space is less than specified?
The default value of the new double parameter should be Null or Zero, so that in this case a page break is always generated as before.
Possible implementation idea
I had tried to derive my own widget class of NewPage, but the offsetStart and fullConstraints infos are missing. Perhaps the base class pw.Widget can be enhanced with a function 'newPageNeeded' (with the available space as a parameter). NewPage could then override this new function and would replace the following code in MultiPage.generate in a more generic way:
Existing:
New:
The text was updated successfully, but these errors were encountered: