title: How to optimize generated document form html and styles
body: <p>Invoice printing form layout is generated using dynamically reated Razor view via RazorEngine.
  Generated code is below.
  It looks ugly for human inspection and debugging. Words top,left,width, height are repeated in every item.</p>
  
  <pre><code>&lt;div style='top:3.58cm;left:11.27cm;height:0.53cm;width:1.03cm;font-size:12pt;text-align:right;;z-Index:1'&gt;Tel.&lt;/div&gt;
  </code></pre>
  
  <p>How to make it more readable.
  Is it possible to specify all dimendions together, something like</p>
  
  <pre><code>style='coordinates:3.58 11.27 0.53 1.03'
  </code></pre>
  
  <p>and set default unit to cm or to other unit so that unit does not need added to every coordinate ?
  Output is generated from designed report layout, it is difficult to avoid absolute positioning.
  This is ASP.NET/MONO MVC4 .NET 4  Razor MVC application.</p>
  
  <p>Also border:1px is ignored, no border appears. This is used for layout verification and generator debugging. How to force border or background to appear ?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;style&gt;
      div {
        position: absolute;
        margin: 0;
        padding: 0;
        vertical-align: top;
        font-family: "Times New Roman";
        font-size: 10pt;
        overflow: hidden;
        border: 1px;
      }
    &lt;/style&gt;
  &lt;/head&gt;
  
      &lt;body&gt;
      &lt;div style='top:3.58cm;left:11.27cm;height:0.53cm;width:1.03cm;font-size:12pt;text-align:right;;z-Index:1'&gt;Tel.&lt;/div&gt;
      &lt;div style='top:3.61cm;left:15.58cm;height:0.53cm;width:1.72cm;font-size:12pt;;z-Index:2'&gt;Reg.Nr&lt;/div&gt;
      &lt;div style='top:4.18cm;left:13.11cm;height:0.53cm;width:2.32cm;font-size:12pt;text-align:right;;z-Index:3'&gt;Number nr&lt;/div&gt;
      &lt;div style='top:4.87cm;left:12.16cm;height:0.53cm;width:1.50cm;font-size:12pt;;z-Index:4'&gt;IBAN&lt;/div&gt;
      &lt;div style='top:5.63cm;left:1.51cm;height:0.53cm;width:1.76cm;font-size:12pt;;z-Index:5'&gt;Payer&lt;/div&gt;
      &lt;div style='top:7.58cm;left:1.32cm;height:0.53cm;width:2.70cm;font-size:12pt;text-align:right;;z-Index:6'&gt;Address&lt;/div&gt;
      &lt;div style='top:8.87cm;left:1.32cm;height:0.53cm;width:2.99cm;font-size:12pt;;z-Index:7'&gt;Duedate&lt;/div&gt;
      &lt;div style='top:19.92cm;left:1.16cm;height:0.42cm;width:0.93cm;;z-Index:8'&gt;NR.&lt;/div&gt;
      &lt;div style='top:19.92cm;left:1.93cm;height:0.42cm;width:1.69cm;;z-Index:9'&gt;Description&lt;/div&gt;
      &lt;div style='top:19.92cm;left:10.87cm;height:0.42cm;width:1.44cm;;z-Index:10'&gt;Quantity&lt;/div&gt;
      &lt;div style='top:19.92cm;left:12.32cm;height:0.42cm;width:1.09cm;;z-Index:11'&gt;Unit&lt;/div&gt;
      &lt;div style='top:19.92cm;left:14.40cm;height:0.42cm;width:1.12cm;;z-Index:12'&gt;Price&lt;/div&gt;
      &lt;div style='top:19.92cm;left:16.95cm;height:0.42cm;width:1.60cm;;z-Index:13'&gt; Sum&lt;/div&gt;
      &lt;div style='top:19.92cm;left:18.29cm;height:0.42cm;width:1.41cm;;z-Index:14'&gt; KM%&lt;/div&gt;
      &lt;div style='top:21.61cm;left:0.01cm;height:0.53cm;width:1.31cm;font-size:12pt;;z-Index:15'&gt;detail&lt;/div&gt;
      &lt;div style='top:23.9cm;left:12.77cm;height:0.42cm;width:2.67cm;;z-Index:16'&gt;Käibemaksuta&lt;/div&gt;
      &lt;div style='top:24.45cm;left:12.79cm;height:0.42cm;width:2.13cm;;z-Index:17'&gt;Käibemaks&lt;/div&gt;
      &lt;div style='top:24.95cm;left:12.82cm;height:0.42cm;width:1.82cm;;z-Index:18'&gt;Ümardus&lt;/div&gt;
  </code></pre>