I have an agent that creates an html file. I am trying to format the file with CSS so that the first page prints with a bigger header then every succeeding page. I am have no luck accompliching this task.
For reference here is the LotusScript that actually generates the html file:
'//HTML start===============
Print #fileNum%, {<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">}
Print #fileNum%, {<html>}
Print #fileNum%, {<head>}
Print #fileNum%, {<title>}
Print #fileNum%, {Cranmer Art Conservation}
Print #fileNum%, {</title>}
Print #fileNum%, {</head>}
'//style====================
Print #fileNum%, "<style type=""text/css"" media = ""print"" >"
Print #fileNum%, "@page :first {margin-top: 50cm;}"
Print #fileNum%, "@page {margin-top: 10cm;}"
'Print #fileNum%, "body {margin: 20cm; font-family : MS Sans Serif; font-size:8pt; }"
'Print #fileNum%, "body {font-family: verdana;font-size: .75EM;/*margin: 105px 5px 5px 5px;*/}"
'Print #fileNum%, "@page { margin: 20cm; /* All margins set to 2cm */ }"
'Print #fileNum%, "@page :first { margin-top: 40cm; /* Top margin on first page 20cm */ }"
Print #fileNum%, "</style>"
'//body of the file============
Print #fileNum%, {<body text="#000000" bgcolor="#FFFFFF">}
Print #fileNum%, {Here is some text}
Print #fileNum%, {<br>}
Print #fileNum%, {Line #2. I want this to be a long line of text.I want this to be a long line of text.I want this to be a long line of text.I want this to be a long line of text.}
Print #fileNum%, {</body>}
Print #fileNum%, {</html>}
Close filenum%
CreateHTML = filename
The script is printing some dummy data just to see if the CSS is working. When I get that part done I will insert the real table that will be printed.
The html that is being generated looks like this:
Cranmer Art Conservation
@page :first {font-size: 10pt; margin-top: 109cm}Here is some text
Line #2. I want this to be a long line of text.I want this to be a long line of text.I want this to be a long line of text.I want this to be a long line of text.
Can anyone tell me what is wrong with my CSS? I actually removed this line:
@page :first {font-size: 10pt; margin-top: 109cm}
and replaced it with a simple margin setting line and that worked fine. So I am leading toward something being wrong with my @page line.