Freemarker Not Letting Me Set Font - primefaces

A couple of months ago this application I wrote stopped rendering pdf correctly.
Everything used to work great with primefaces extensions pe:documentViewer.
I dont know what changed but now if I try and set the font, nothing renders in the popup.
If I remove the font-family:Courier, monospace; it renders...
This is my FTL template
<#ftl output_format="XML" auto_esc=true>
<#include '/base_macros.ftl'>
<div style="font-family:Courier, monospace; font-size: 14px;">
<#-- <table>
<tr>
<td>
<h1>${header!}</h1>
</td>
</tr>
</table>-->
<table>
<#list portDataList as portData>
<tr>
<td style="white-space: pre-wrap;">${portData.data!}</td>
</tr>
</#list>
</table>
</div>
F12'd Popup Code

Related

Text overlapping with CSS transform property

When I am using
.right-align {
text-align: right !important;
transform: translateX(-40%);
}
The Table structure is showing below
<table>
<thead>
<tr>
<th>Bid
</th>
<th>Offer
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="right-align">
200
</div>
</td>
<td>
<div class="right-align">
221
</div>
</td>
</tr>
</tbody>
</table>
The td is overlapping the th element as seen below
How can I can make it go under the header ?
This is happening when table is scrolling
It is very hard to answer the question as it is, however, the table should keep its proportions and structure as long as you keep the code tight:
.right-align {
text-align: right !important;
}
<table>
<thead>
<tr>
<th>Bid</th>
<th>Offer</th>
</tr>
</thead>
<tbody>
<tr>
<td class="right-align">200</td>
<td class="right-align">221</td>
</tr>
</tbody>
</table>
It is nebulous why you decided to use the transform: translateX(-40%); rule in there, but it seems you may be trying to overwrite some rules that come from a theme hence the problem you are facing; If you update your question and add more pieces of code or at least what you are trying to achieve then i could be more helpful :). Also if you are using a framework or theme specify which one.
EDIT.
I saw your updates, you don't need to add a div within the td element to apply a class, you can do it directly in the td element. However, it seems that some css rules are overlapping. Maybe a screenshot of the results in a browser could be helpful.

Text in HTML Table is a incorrectly a clickable "event" in WKWebview

I have an issue I've not been able to find a solution for a long time. Please bear with me if I am not using the correct terminology. I am relatively new to software development and very new to iOS.
Basically I have a list of numbers in an HTML table displayed in a webview and some of them, apparently randomly, are displayed in bold text and allows me to click on them to create an "event" within iOS. This should not be the case. No data should be clickable or generate an even with a press.
I've included a screenshot and a snippet of my html code. Any assistance is greatly appreciated! Thank you!
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="jquery.mobile-1.4.5.min.css">
<script src="jquery-1.11.3.min.js"></script>
<script src="jquery.mobile-1.4.5.min.js"></script>
</button>
<style>
th {
border-bottom: 1px solid #d6d6d6;
}
tr:nth-child(even) {
background: #DBE8F9;
}
</style>
</head>
<body>
<div data-role="main" class="ui-content">
<form>
<input id="filterTable-input" data-type="search" placeholder="Search For Material...">
</form>
<table data-role="table" data-mode="columntoggle" class="ui-responsive ui-shadow" id="myTable" data-filter="true" data-input="#filterTable-input">
<thead>
<tr>
<th data-priority="1">Material</th>
<th data-priority="1">lb/ft<sup>³</sup></th>
<th data-priority="1">g/cm<sup>³</sup></th>
</tr>
</thead>
<tbody>
<tr>
<tr>
<td>Aluminum Hydroxide </td> <!--item in question from screenshot-->
<td>26.5 </td>
<td>0.42</td>
</tr>
<tr>
<td>Aluminum Oxide </td>
<td>36 </td>
<td>0.58</td>
</tr>
<tr>
<td>Aluminum Silicate </td>
<td>31 </td>
<td>0.5</td>
</tr>
<tr>
</tbody>
</table>
</div>
<div data-role="footer" align="center">
Back to Top
</div>
</div>
</body>
That's very odd...
Some quick testing, and it appears that when you adjacent table cells match this format:
dd.mm hh.mm
it is often but not always detected as a date. So,
26.5 0.42 == May 26th
26.10 5.12 == October 26th
If you disable Calendar Event data detection on your WKWebView, those won't be detected. Of course, any actual dates that you want to be detected won't work either.
I haven't been able to find any documentation on the internal parsing code... Probably could find it for Swift, but that wouldn't help much anyway.

Trying to use css to put a Footer on page 1 only

https://jsfiddle.net/therbq0h/
this link provides something similar to is being displays, its not formatted but it gives 2 pages. Has to be printed in IE.
I have a page that stores data in a database and a separate page that displays its in a generic way. I am creating custom pages to exactly match word documents, the way all the documents were created before. The page has a header, body, footer.
I need print to look like:
Page 1
------------Header-------------
------------Body---------------
Partial Data pulled from database entered in a form
------------footer-------------
Page 2
------------Body---------------
Partial Data pulled from database entered in a form
Page 3
------------Body---------------
remaining Data pulled from database entered in a form
data is dynamic in size.
Currently thead and tbody works fine, but i need footer on page 1 only with a horizontal line at the top.
<body>
<div class="wrapper_class" >
<div>
<table style="width:100%;font-size:8pt;">
<thead>
<tr>
<td style="width:33%;">
Customer names:
</td>
<td style="width:33%;">
<img src="" />
</td>
<td style="width:33%;">
Customer names:
</td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td>
some more rows and columns
</td>
</tr>
</table>
</td>
</tr>
</thead>
<tbody>
<tr>
<td colspan="3">
<div class="floatCenterParent">
<p><%SELECT MemoField FROM Table WHERE ID = 100%></p>
</div>
<div>
<p><%SELECT MemoField FROM Table WHERE ID = 101%></p>
</div>
<div style="some more styling">
more text
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3">
static text
</td>
</tr>
</tfoot>
</table>
</div>
<div class="floating_Menu">
buttons that dont get printed
</div>
</div>
</body>
page layout matches the word document, I need the footer on page 1 only, and must be at the bottom even if there isn't a full page. Only needs to print correctly in IE10+. If possible cross-browser would be nice.
The footer does display correctly on every page at the bottom except for the last page, it follows right after the body text.
.footer { display: none; }
.page-one > .footer { display: block; }

How to disable First letter capitalization in RadEditor control in asp.net webform

I am trying to edit the html formatted string in RadEditor control. Its a simple
<table style="width: 100%; font-family: Verdana;">
<tbody>
<tr> <td>a</td></tr>
<tr> <td>b</td></tr>
<tr> <td>c</td></tr>
</tbody> </table>
but while debugging, the out put of RadEditor in code behind is like :
<Table Style="Width: 100%; Font-Family: Verdana;">
<Tbody>
<Tr><Td>A</Td></Tr>
<Tr> <Td>B</Td></Tr>
<Tr> <Td>C</Td></Tr>
</Tbody></Table>
it making each first character Capital. Is there any mode to set ?
Following is my aspx code to render :
<telerik:RadEditor ID="editorBody" Runat="server" Skin="WebBlue" ContentAreaCssFile="~/css/EditorContentAreaStyles.css" BackColor="White" EnableResize="False" Height="600px" >
<CssFiles>
<telerik:EditorCssFile Value="~/css/EditorCSSToApply.css" />
</CssFiles>
<Content>
</Content>
</telerik:RadEditor>
Same code working fine in another form.

Need help on how to change a link color once clicked

I need help with getting a number text to change color once clicked on. When I click on the text it goes to a next html file, but when I return to the main html. the number is still the same color so Im unable to determine the already visited files. Here is an example of what I've created.
<Center> <font size="6"><a href="question2.html"><font color="#FFCC00">Taylor</font>
</td></Center>
<td bgcolor="#0000CC">
<Center> <font size="6"><a href="question3.html"><font color="#FFCC00">Sanders</font>
</td></Center>
<td bgcolor="#0000CC">
This will set the colors for your links:
<body link="#FF0000" vlink="#00FF00" alink="#0000FF">
But you'll also need to edit your code example too. Remove the <font color="#FFCC00"> tags, which are overriding the browser's default href colors, and add closing tags to your anchors:
<font size="6">Taylor
</td>
<td bgcolor="#0000CC">
<font size="6">Sanders
</td>
<td bgcolor="#0000CC">
If you want to use <center>, you should move the opening and closing tags inside the <td></td> tags.
Try this
<html>
<body link="Orange" vlink="White" alink="Yellow">
<table>
<tr>
<td bgcolor="#0000CC" align="center">
<font size="6">Taylor</font>
</td>
<td bgcolor="#0000CC" align="center">
<font size="6">Sanders</font>
</td>
</tr>
</table>
</body>
</html>