Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it L'avatar di ivy_76
    Registrato dal
    Dec 2004
    Messaggi
    1,822

    PHP : Stampa con VISTA diversa da XP

    Ciao

    ho realizzato un programma per un'agernzia immobiliare. Questo programma ha una lunga serie di campi che devono essere stampati. Nel programma è anche presente una sorta di gestore di stampa.
    Ogni appartamento è in una scheda e ogni scheda può essere stampata. Lanciando la procedura di stampa con XP questa viene completata correttamente, mentre con VISTA la stampa viene divisa in più fogli.
    Il programma gira in una LAN con due PC XP Pro e un Vista. Il "server web" è un XP PRO.
    Su Vista uso Mozilla Firefox, su XP uso sia IE sia Mozilla Firefox senza problemi.
    Cosa potrebbe causare questo problema ?
    TORTA DI RISO .. F I N I T A !!

    Da M.C.S.A. a impiegato pubblico :-(

  2. #2
    Utente di HTML.it L'avatar di ivy_76
    Registrato dal
    Dec 2004
    Messaggi
    1,822
    Allego anche il file




    <html>
    <head>
    <title>Stampa della scheda <? echo $_GET["id"]; ?></title>
    <style>
    @page {size: 297mm 210mm; margin: 5mm;}
    .leggenda
    {
    font-family : verdana, tahoma;
    color : #3D0099;
    font-size : 14px;
    font-weight : bold;
    text-align : center;

    }
    .riassunto
    {
    font-family : verdana, tahoma;
    color : #3D0099;
    font-size : 11px;
    }


    .scrittaStampa
    {
    font-family : verdana, tahoma;
    color : #400000;
    font-size : 22px;
    line-height : 150%;
    font-weight : bold;
    font-variant: small-caps;
    text-align : justify;
    }
    a, a:visited, a:link
    {
    color:blue;
    }

    .titolo
    {
    font-size : 20px;
    font-family : verdana, tahoma;
    color : black;
    font-weight : bold;
    text-align : center;
    }
    .tabella
    {
    width : 100%;
    border : 1px dotted black;
    }


    </style>
    </head>
    <body onLoad='window.print()'>
    <center>[img]immagini/logoagenzia2.jpg[/img]

    </center>


    <?
    $id = $_GET["id"];
    include ("include/connessione.php");
    $query = "SELECT * FROM immobili WHERE id='$id'";
    $dati = mysql_query($query) or die (mysql_error());
    $row = mysql_fetch_array($dati);

    $prezzoEffettivo = number_format($row["prezzoEffettivo"], 2, ',','.');


    ?>
    <form name='frmGallery' action='esplodiImmobile.php' method='post'>
    <table align='center' class='tabella' cellpadding='5' style='border:0px; page-break-inside: avoid;'>
    <tr><td class='titolo' colspan='2'><u>RIF <? echo $id; ?> - <? echo $row["titolo"] ; ?> - € <? echo $prezzoEffettivo; ?> </u></td></tr>
    <tr><td width='60%' align='center'><div class='scrittaStampa'>
    <? echo $row["descrizione"] ?></div></td>
    <td width='40%' valign='top'>


    <fieldset style='width:80%'><legend class='leggenda'>Scheda riassuntiva</legend>

    <table class='riassunto' width='97%' border='0' cellspacing='5'>
    <tr><td>ingresso</td><td align='center'><input type='checkbox' <? if ($row["ingresso"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>sala</td><td align='center'><input type='checkbox' <? if ($row["sala"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>cucina</td><td align='center'><input type='checkbox' <? if ($row["cucina"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>camere</td><td align='center'><input style='background-color:white; border:0px; border:0px; width:50px; text-align:center' type='text' value="<? echo $row['num_camere']; ?>" ></td></tr>
    <tr><td>riscaldamento</td><td align='center'><input type='text' style='background-color:white; border:0px' size='15' style='border:0px' value="<? echo $row['termoautonomo'] ?>" ></td></tr>
    <tr><td>cantina</td><td align='center'><input type='checkbox' <? if ($row["cantina"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>ascensore </td><td align='center'><input type='checkbox' <? if ($row["ascensore"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>garage</td><td align='center'><input type='checkbox' <? if ($row["garage"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>posto auto </td><td align='center'><input type='checkbox' <? if ($row["posto_auto"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>giardino </td><td align='center'><input type='checkbox' <? if ($row["giardino"]=="si") echo 'checked'; ?> ></td></tr>
    <tr><td>indipendente </td><td align='center'><input type='checkbox' <? if ($row["indipendente"]=="si") echo 'checked'; ?> ></td></tr>
    </table>
    </fieldset>
    </td>
    </tr>

    <tr><td colspan='2' align='center'>




    [img]<? echo $row['foto1']; ?>[/img]
    </td></tr>

    </table>
    </form>
    </body>
    </html>
    TORTA DI RISO .. F I N I T A !!

    Da M.C.S.A. a impiegato pubblico :-(

  3. #3
    mm..io con dei gestionali che ho fatto del genere non ho mai avuo problemi..io per le stampe uso il modulo PDF di Zend Framework, tu stampi solo la schermata? in talk caso ti consigliod avvero di imparare a gestire le stampe in PDF...

  4. #4
    Utente di HTML.it L'avatar di ivy_76
    Registrato dal
    Dec 2004
    Messaggi
    1,822
    Si, hai perfettamente ragione. Però in questo caso è un programma complesso per la quantità di campi da compilare, ma semplice da gestire. Pensa che all'inizio le stampe non erano neppure state prese in considerazione. Ho dovuto aggiungere dei pezzi di volta in volta. Ecco perché ora mi trovo male.

    Mi puoi adre qualche consiglio / link per imparare a stampare in PDF ?
    TORTA DI RISO .. F I N I T A !!

    Da M.C.S.A. a impiegato pubblico :-(

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.