You'll have to add the additional elements to the printing page manually, 
eg:

function printDiv (container) {
    var w = window.open();
    w.document.write('<style type="text/html">div {float: left;}</style>');
    w.document.write(container.innerHTML);
    w.print();
    w.close();
}

Printing in landscape mode is controlled entirely by the browser's print 
dialogue box, it's not something you can set in javascript.

On Thursday, January 24, 2013 3:36:37 PM UTC-5, Chrystopher Medina wrote:
>
> my friend here is some code . in order to print the pie charts.. when i 
> print them the pie charts are showed 
>
> like this 
>
> 1pie chart
> 2pie chart
> 3pie chart..
>
> and in my interface they are showed like this.
>
> 1 pie chart                                   2pie chart
>
> 3pie chart                                    4pie chart.
>
> i just want to keep this style. and add a header in the file wich is gonna 
> be print.
> and if its possible i want to print the sheet horizontally
>
>   <script>function printDiv (container) {
>     var w = window.open();
>     w.document.write(container.innerHTML);
>     w.print();
>     w.close();
> }</script> 
>                                 <style>
> .container div {
>     float: left;
> }
> .clear {
>     clear: both;
>     display: none;
>
> }
> </style>
>
> <div id=contain class="container">
>     <div id="pie_chart_1_div"></div>
>     <div id="pie_chart_2_div"></div>
>     <div id="pie_chart_3_div"></div><br/><br/>
>     <div id="pie_chart_4_div"></div>
>     <div id="pie_chart_5_div"></div>
>     <div id="pie_chart_6_div"></div><br/>
>     <div id="pie_chart_7_div"></div>
>     <div id="pie_chart_8_div"></div>
>     <div id="pie_chart_9_div"></div><br/><br/>
>     <div id="pie_chart_10_div"></div>
>     <div id="pie_chart_11_div"></div>
>     <div id="pie_chart_12_div"></div><br/><br/>
>     <div id="pie_chart_13_div"></div>
>     <div id="pie_chart_14_div"></div>
>     <div id="pie_chart_15_div"></div><br/><br/><br/>
>     <div id="pie_chart_16_div"></div>
>     <div id="pie_chart_17_div"></div>
>     <div id="pie_chart_18_div"></div><br/><br/><br/>
>     <div id="pie_chart_19_div"></div>
>     <div id="pie_chart_20_div"></div>
>     <div id="pie_chart_21_div"></div><br/><br/>
>     <div id="pie_chart_22_div"></div>
>     <div id="pie_chart_23_div"></div>
>     <div id="pie_chart_24_div"></div><br/><br/>
>     <div id="pie_chart_25_div"></div>
>     <div id="pie_chart_26_div"></div>
>     <div id="pie_chart_27_div"></div><br/><br/>
>     <div id="pie_chart_28_div"></div>
>     <div id="pie_chart_29_div"></div>
>     <div id="pie_chart_30_div"></div><br/><br/><br/>
>     <div id="pie_chart_31_div"></div>
>     <div id="pie_chart_32_div"></div>
>     <div id="pie_chart_33_div"></div><br/>
>     
> </div>
> <div class="clear"></div>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to