HTML Printing and Styles

In an effort to have better/easier support for column alignment, I reviewed these Topics regarding HTML Printer Templates:

As part of the first linked Topic, it is noted among the supported styles, these:


I am wondering about a couple of things:

Are the following short-format styles supported?

margin:0px  // set ALL margins to 0
padding:0px // set ALL paddings to 0

Can we define CSS “classes” in a <style> section (usually included within a <head> section), and then use the classes instead of always needing to define style in-line? For example:

.ticket {margin:0px;padding:0px;font-family:Arial;font-size:11px;text-align:left;}
.col1 {margin:0px;padding:0px;width:160;font-family:Arial;text-align:left;}
.col2 {margin:0px;padding:0px;width:75;font-family:Consolas;text-align:right;}
.col3 {margin:0px;padding:0px;width:50;font-family:Consolas;text-align:right;}

… later in Template, instead of this:

<div style="margin:0px;padding:0px;font-family:Arial;font-size:11px;text-align:left;">
<tr><td width=160>Tax Total:</td><td width=75 align=right>(L[=F(TN('{TAX TOTAL}')/TN('{EXCHANGE RATE:HNL}'))])</td><td width=50 align=right>[=F('{TAX TOTAL}')]</td></tr>

… we can do this?

<div class="ticket">
<tr><td class="col1">Tax Total:</td><td class="col2">(L[=F(TN('{TAX TOTAL}')/TN('{EXCHANGE RATE:HNL}'))])</td><td class="col3">[=F('{TAX TOTAL}')]</td></tr>

Unfortunately it does not have class support. That was an old open source Microsoft library that makes conversions between HTML and XAML but it abandoned and never updated. I made some changes to improve table support but that’s all we have :slight_smile:

1 Like