forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Html page print [SOLVED]

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Sat Apr 28, 2012 10:45 am    Post subject: Html page print [SOLVED] Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
cnodnarb
Valued Contributor
Valued Contributor


Joined: 11 Sep 2002
Posts: 686
Location: Evansville, IN

PostPosted: Mon May 07, 2012 12:00 am    Post subject: Reply with quote

Code:

<style type="text/css" media="print">
@page
{
size: landscape;
margin: 2cm;
}
</style>
Back to top
View user's profile Send private message AIM Address
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Wed May 09, 2012 8:24 am    Post subject: Reply with quote

Hi cnodnarb,
Very Happy Work fine thank you very much!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group