Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Sat Apr 28, 2012 10:45 am Post subject: Html page print [SOLVED] |
|
|
Hi,
I'm creating a simple report by creation of a html page, and I would like insert a print button using landscape page print format...it's possible make it without user action (changing every time print format on on browser print panel?
this is the code to create the html page
Code: |
List create,9
LIST ADD,9,<html>
LIST ADD,9,<head>
LIST ADD,9,<style type=@chr(34)text/css@chr(34) media=@chr(34)print@chr(34)>
LIST ADD,9,div.page {
LIST ADD,9,writing-mode: tb-rl;
LIST ADD,9,height: 80@chr(37);
LIST ADD,9,margin: 10@chr(37) 0@chr(37);
LIST ADD,9,}
LIST ADD,9,TD.land { writing-mode: tb-rl; }
LIST ADD,9,</style>
LIST ADD,9,</head>
LIST ADD,9,<body>
LIST ADD,9,<div class=@chr(34)page@chr(34)>
LIST ADD,9,<font size=@chr(34)+2@chr(34)><b>Dimore Abituali</b></font>
LIST ADD,9,<hr align=@chr(34)left@chr(34)>
LIST ADD,9,<table width=@chr(34)100@chr(37)@chr(34) border=@chr(34)1@chr(34) summary=@chr(34)@chr(34)>
LIST ADD,9,<tr><td class=land><b> Nominativo</b></td><td class=land><b>Data di Nascita</b></td><td class=land><b>Nazione di nascita</b></td><td class=land><b>Nazionalità</b></td><td class=land><b>Indirizzo</b></td></tr>
LIST SEEK,TABLE,0
%%Riga =
REPEAT
IF %%Riga
Option FieldSep,@tab()
Parse "%%Nominativo;%%DataNascita;%%NazioneNascita;%%Nazionalita;%%Indirizzo;%%y",%%Riga
Option FieldSep,|
LIST ADD,9,<tr><td class=land>%%Nominativo</td><td class=land>%%DataNascita</td><td class=land>%%NazioneNascita</td><td class=land>%%Nazionalita</td><td class=land>%%Indirizzo</td></tr>
END
%%Riga = @next(table)
UNTIL @not(%%Riga)
LIST ADD,9,</tr>
LIST ADD,9,</table>
LIST ADD,9,<br><br>
LIST ADD,9,<hr align=@chr(34)left@chr(34)>
LIST ADD,9,</div>
LIST ADD,9,</body>
LIST ADD,9,</html>
#FILE DELETE,c:\temp.html
List SaveFile,9,c:\temp.html
List Close,9
SHELL OPEN,c:\temp.html |
Thank you for any help
Last edited by Tdk161 on Sun May 13, 2012 9:02 pm; edited 1 time in total |
|