I am using SQL Server and have a field nvarchar(max) to store HTML field data.
I have a grid with detail view. Memo field is "TextArea" with "HTML editor" selected. I want to enter HTML and then print a report using printHTML().
I set the "HTML editor style" to:
font-size: 10pt; font-family: Tahoma;
In Working preview I enter into the field:
This is a test
When I look at the source it is:
This is a test
When printed it is not Tahoma 10pt. If I change the font size to 12pt and look at the source it is:
<font size="3">This is a test</font>
When printed it is 12pt and looks like Tahoma (and probably is). Note that there is mention of the font type.
If I change to Arial, the source is now:
<font size="3" face="Arial">This is a test</font>
It prints as Arial 12pt. If I now change back to Tahoma, 10pt, the source is:
This is a test
so, no mention of font size or type and it prints way smaller than 10pt - it looks like maybe 10px.
The best solution seems to be to set the "HTML editor style" to say:
font-size: 8pt; font-family: Times New Roman;
which forces the user to change the font to what they want. I have also played with ckeditor but it sizes the font in px which users do not necessarily realise and wonder why the printed report looks bad as to get 12pt you need 16px.
Can others advise how they have setup the built-in HTML Editor to get predictable results when viewing and printing.
The other drama is cutting from somewhere else and pasting. The best approach is to paste in Notepad first to strip out all the junk and then copy and paste into HTML editor, which is just a training issue.
I have a grid with detail view. Memo field is "TextArea" with "HTML editor" selected. I want to enter HTML and then print a report using printHTML().
I set the "HTML editor style" to:
font-size: 10pt; font-family: Tahoma;
In Working preview I enter into the field:
This is a test
When I look at the source it is:
This is a test
When printed it is not Tahoma 10pt. If I change the font size to 12pt and look at the source it is:
<font size="3">This is a test</font>
When printed it is 12pt and looks like Tahoma (and probably is). Note that there is mention of the font type.
If I change to Arial, the source is now:
<font size="3" face="Arial">This is a test</font>
It prints as Arial 12pt. If I now change back to Tahoma, 10pt, the source is:
This is a test
so, no mention of font size or type and it prints way smaller than 10pt - it looks like maybe 10px.
The best solution seems to be to set the "HTML editor style" to say:
font-size: 8pt; font-family: Times New Roman;
which forces the user to change the font to what they want. I have also played with ckeditor but it sizes the font in px which users do not necessarily realise and wonder why the printed report looks bad as to get 12pt you need 16px.
Can others advise how they have setup the built-in HTML Editor to get predictable results when viewing and printing.
The other drama is cutting from somewhere else and pasting. The best approach is to paste in Notepad first to strip out all the junk and then copy and paste into HTML editor, which is just a training issue.