Skip to content
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

PDF: Empty page before long rich text area content #2573

Closed
ebruchez opened this issue Feb 26, 2016 · 5 comments
Closed

PDF: Empty page before long rich text area content #2573

ebruchez opened this issue Feb 26, 2016 · 5 comments

Comments

@ebruchez
Copy link
Collaborator

@ebruchez ebruchez commented Feb 26, 2016

In a single rich text control, enter many (e.g. 61) lines with a single character as:

d
d
d
…

The PDF output shows a blank page first, then the rich text field.

test.pdf

@ebruchez ebruchez self-assigned this Feb 26, 2016
@ebruchez ebruchez added this to the 4.11 milestone Mar 1, 2016
@ebruchez ebruchez closed this in b7efe94 Mar 1, 2016
@ebruchez ebruchez removed this from the 4.11 milestone Apr 1, 2016
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

@ebruchez ebruchez commented Apr 1, 2016

Reopening because this causes other issues, like #2656. User has workaround by adding their own CSS.

I think we would like to say that a <tr> is not breakable, except if contains "long text", so for example if it contains a large rich/plain text area. But we can't express this directly via CSS right now.

@ebruchez ebruchez reopened this Apr 1, 2016
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

@ebruchez ebruchez commented Apr 1, 2016

Possibly :matches() could help if there was support in the PDF renderer.

Alternatively, we have full flexibility in print-pdf-notemplate.xpl to put additional marker classes on ancestor elements such as <tr> if needed.

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

@ebruchez ebruchez commented Jul 31, 2019

@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

@ebruchez ebruchez commented Aug 1, 2019

I think we are getting back to making an annotation in print-pdf-notemplate.xpl to allow certain rows to be split. Specifically, if the row contains a textarea, plain or rich, or field which will be "large". How to determine "large" is not easy: there is the number of lines if there are line breaks, but also lines can wrap, and we cannot know the wrapping exactly. So some kind of heuristic would be needed.

@ebruchez ebruchez added this to To review in Orbeon Forms 2019.1 via automation Aug 8, 2019
@ebruchez

This comment has been minimized.

Copy link
Collaborator Author

@ebruchez ebruchez commented Aug 8, 2019

By adding a couple of rules, including page-break-before: avoid on .fr-section-content and .fr-grid-td .xforms-label, we seem to be avoiding most of what #2656 is about.

It's not entirely perfect, for example in some rare cases the field border can still be cut, but the text within the field doesn't appear to be but. See the screenshot.

Screen Shot 2019-08-08 at 4 19 12 PM

@ebruchez ebruchez closed this in 783c8a1 Aug 9, 2019
ebruchez added a commit that referenced this issue Aug 9, 2019
Orbeon Forms 2019.1 automation moved this from To review to Done Aug 9, 2019
ebruchez added a commit that referenced this issue Aug 12, 2019
ebruchez added a commit that referenced this issue Aug 12, 2019
ebruchez added a commit that referenced this issue Aug 12, 2019
@ebruchez ebruchez added this to To do in Orbeon Forms 2018.2.4 via automation Aug 29, 2019
@ebruchez ebruchez moved this from To do to Done in Orbeon Forms 2018.2.4 Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
1 participant
You can’t perform that action at this time.