Text color styling in rich text editor not applying in PDF

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Text color styling in rich text editor not applying in PDF

bwallis42
We have a form with a rich text editor in it (Orbeon 2017.2) in which some of
the text in a form is colored. When we generate a PDF file from that form
the text comes out in black and the background white regardless of the
setting in the editor. Font and font size also comes out somewhat
differently.

Here is the web form view

<http://discuss.orbeon.com/file/t375137/view.jpg>

and this is the PDF output of the same control in the form

<http://discuss.orbeon.com/file/t375137/pdf.jpg>

any ideas how I can get this to work?

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Text color styling in rich text editor not applying in PDF

Erik Bruchez
Administrator
Brian,

Since the input of the PDF processor is based on the "view" mode, check the
HTML which is produced in view mode in that case. I am not sure whether the
rich text editor produces `class`, or `font` or other elements. But checking
that might be a good start.

-Erik

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: Text color styling in rich text editor not applying in PDF

bwallis42
This post was updated on .
Sigh.

I got to the base of this. It is bootstrap.css that does it and it is done
intentionally. See  this article
<https://stackoverflow.com/questions/33410724/bootstrap-print-css-removes-background-color
for a bit of an overview of why.

TinyMCE (old and new versions) insert inline styling for font color or
background color changes like this

<span style="color: #ff9900;">fdas</span>

That should beat just about all css trying to override it except... Buried
inside bootstrap is the following

@media print
.orbeon * {
    color: #000 !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important;
}


So the '!important' wins the day and the font color is black.

Now I don't want to try to muck with the internals of an orbeon release and
i can't see anyway to override this.

If you are generating the bootstrap.css that is used in Orbeon you could
generate it with the print styles omitted (untick "Print media styles" at
https://getbootstrap.com/docs/3.3/customize/)

Was it intentional to include these print styles in orbeon when you changed
to using bootstrap.css?

Versions prior to that (3.9 at least) did include the font colors of the
rich text editor in the generated PDF files so this is a regression of
sorts.






--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orbeon+unsubscribe@googlegroups.com.
To post to this group, send email to orbeon@googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Text color styling in rich text editor not applying in PDF

bwallis42
Hi Erik,
  Any ideas about this issue? As far as I can tell it is a bootstrap.css
issue and could be changed in orbeon.

It would be nice to have the PDF output match the screen view of the form
but the reasons why not discussed in the referenced article are also
reasonable.

This also applies to any other colors set by css, say on all the labels in a
form, etc.

thanks
brian...




--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].