Printing a html document in landscape mode with css

below is my html code
how can i print this in landscape mode.what ever i am using now is not working
<html><head><style type="text/css">
@media print {
@page {
size: landscape;
table.fixed {table-layout:fixed; width:100%; border-collapse: collapse; word-wrap:break-word;}TR.head{font-family: verdana; font-size: 10pt; vertical-align: top ; color: #ffffff; background-color: black; font-weight: bold; }TR.data{font-family: verdana; font-size: 8pt; vertical-align: top}</style></head><body><table width="100%" border="0" cellspacing="0" cellpadding="4"><tbody><tr><td></td><td align="center"><font size="2" style="verdana"><b>EMERGENCY ICE Installs by Manager And Production Install Date Range</b></font><br><td></td><table width="100%" border="0" cellspacing="0" cellpadding="4"><thead><tr><td width="74%" align="center"><font size="1" style="verdana"><b>From:</b>11/01/07</font><font size="1" style="verdana"><b>&nbsp&nbspTo:</b>01/08/08</font></td></tr></thead></table></td></tr></tbody></table><br></br>
<table border="1" class="fixed"><thead><tr class="head"><td width="8%">Manager</td><td width="5%">ICE # </td><td width="10%">Plan Prod Install Date</td><td width="10%">Doc Status</td><td width="10%">Doc Title</td><td width="7%">Owner</td><td width="5%">Risk Desc</td><td width="4%">AS/400</td><td width="4%">Unix</td><td width="4%">Win Srv</td><td width="4%">Win Dsk</td><td width="4%">Vax</td><td width="5%">Target Loc</td><td width="10%">No Chg Risk Desc</td><td width="15%">Brief Chg Desc</td></tr></thead><tbody>
<tr class="data"><td rowspan="12" width="5%">Randal Hockenberry</td><td width="8%">16926</td><td width="10%">Dec 31,2007</td><td width="10%">Pending Manager-Business Review</td><td width="10%">AUTO APPROVE</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">TEST</td><td width="10%">TEST</td><td width="15%">TESTzxdcxvsrfdgdsgfdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</td></tr>
<tr class="data"><td width="8%">16933</td><td width="10%">Dec 28,2007</td><td width="10%">Pending Non-QS Testing</td><td width="10%">SR</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">XC</td><td width="10%">DFV</td><td width="15%">CX</td></tr>
<tr class="data"><td width="8%">16927</td><td width="10%">Dec 28,2007</td><td width="10%">Pending Risk Review</td><td width="10%">AUTO APPROVAL TEST</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">AUTO</td><td width="10%">AUTO APPROVE</td><td width="15%">AUTO APPROVE</td></tr>
<tr class="data"><td width="8%">15926</td><td width="10%">Nov 27,2007</td><td width="10%">Pending Code Review</td><td width="10%">CM Install LEVEL 3 QS will test</td><td width="7%">Gary Zhong</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt99</td><td width="10%">testing the app</td><td width="15%">CM Install LEVEL 3 QS will test</td></tr>
<tr class="data"><td width="8%">15712</td><td width="10%">Nov 22,2007</td><td width="10%">Rejected</td><td width="10%">Test Documentation Request</td><td width="7%">Autumn Priddy</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">x</td><td width="10%">none</td><td width="15%">run-through for documentation purposes</td></tr>
<tr class="data"><td width="8%">16029</td><td width="10%">Nov 21,2007</td><td width="10%">Rejected</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">Windows</td><td width="10%">testing</td><td width="15%">Testing</td></tr>
<tr class="data"><td width="8%">16030</td><td width="10%">Nov 19,2007</td><td width="10%">Rejected</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">Windows</td><td width="10%">testing</td><td width="15%">Testing</td></tr>
<tr class="data"><td width="8%">15840</td><td width="10%">Nov 10,2007</td><td width="10%">Pending Follow Up Review</td><td width="10%">SMS Install LEVEL 3</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">system testing</td><td width="15%">SMS Install LEVEL 3</td></tr>
<tr class="data"><td width="8%">15719</td><td width="10%">Nov 08,2007</td><td width="10%">Pending Test Install</td><td width="10%">CM Install LEVEL 1 pitt3/col3</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">testing</td><td width="15%">testing</td></tr>
<tr class="data"><td width="8%">14815</td><td width="10%">Nov 03,2007</td><td width="10%">Rejected</td><td width="10%">test</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">pitt2</td><td width="10%">test</td><td width="15%">test</td></tr>
<tr class="data"><td width="8%">14816</td><td width="10%">Oct 31,2007;Nov 01,2007;Nov 02,2007</td><td width="10%">Production Install Complete</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">windows</td><td width="10%">test</td><td width="15%">test</td></tr>
<tr class="data"><td width="8%">14915</td><td width="10%">Nov 01,2007</td><td width="10%">Pending Follow Up Review</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">windows</td><td width="10%">test</td><td width="15%">Test</td></tr>
<tr></tr>
<tr class="data"><td rowspan="1" width="5%">Linda Humm</td><td width="8%">16034</td><td width="10%">Dec 06,2007</td><td width="10%">Pending Production Install</td><td width="10%">CM Install LEVEL 1 pitt3/col3</td><td width="7%">Randal Hockenberry</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">testing</td><td width="15%">testing</td></tr>
<tr></tr>
</tbody></table><body></html>
thanks,

Why are you asking a CSS question in a Java/JSP/JSTL forum? I would rather use a CSS forum for that. That HTML code is unnecessary too. Just post relevant code only, such as that CSS snippet.
Anyway, it may differ per web browser if this page rule will be picked up and it may also be a client side setting regarding printer settings. Nothing to do here.

Similar Messages

  • How to print a html document in landscape mode with css

    Hi ,
    below is my code that i need to print in landscape mode by defualt with css. is there any way to do this
    <html><head><style type="text/css">
    table.automatic {table-layout:fixed; width:100%; border-collapse: collapse; word-wrap:break-word;}TR.head{font-family: verdana; font-size: 10pt; vertical-align: top ; color: #ffffff; background-color: black; font-weight: bold; }TR.data{font-family: verdana; font-size: 8pt; vertical-align: top}</style></head><body><table width="100%" border="0" cellspacing="0" cellpadding="4"><tbody><tr><td></td><td align="center"><font size="2" style="verdana"><b>EMERGENCY ICE Installs by Manager And Production Install Date Range</b></font><br><td></td><table width="100%" border="0" cellspacing="0" cellpadding="4"><thead><tr><td width="74%" align="center"><font size="1" style="verdana"><b>From:</b>09/01/07</font><font size="1" style="verdana"><b>&nbsp&nbspTo:</b>01/08/08</font></td></tr></thead></table></td></tr></tbody></table><br></br>
    <table border="1" class="automatic"><thead><tr class="head"><td width="8%">Manager</td><td width="5%">ICE # </td><td width="10%">Plan Prod Install Date</td><td width="10%">Doc Status</td><td width="10%">Doc Title</td><td width="7%">Owner</td><td width="5%">Risk Desc</td><td width="4%">AS/400</td><td width="4%">Unix</td><td width="4%">Win Srv</td><td width="4%">Win Dsk</td><td width="4%">Vax</td><td width="5%">Target Loc</td><td width="10%">No Chg Risk Desc</td><td width="15%">Brief Chg Desc</td></tr></thead><tbody>
    <tr class="data"><td rowspan="12" width="5%">Randal Hockenberry</td><td width="8%">16926</td><td width="10%">Dec 31,2007</td><td width="10%">Pending Manager-Business Review</td><td width="10%">AUTO APPROVE</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">TEST</td><td width="10%">TEST</td><td width="15%">TESTzxdcxvsrfdgdsgfdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</td></tr>
    <tr class="data"><td width="8%">16933</td><td width="10%">Dec 28,2007</td><td width="10%">Pending Non-QS Testing</td><td width="10%">SR</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">XC</td><td width="10%">DFV</td><td width="15%">CX</td></tr>
    <tr class="data"><td width="8%">16927</td><td width="10%">Dec 28,2007</td><td width="10%">Pending Risk Review</td><td width="10%">AUTO APPROVAL TEST</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">AUTO</td><td width="10%">AUTO APPROVE</td><td width="15%">AUTO APPROVE</td></tr>
    <tr class="data"><td width="8%">15926</td><td width="10%">Nov 27,2007</td><td width="10%">Pending Code Review</td><td width="10%">CM Install LEVEL 3 QS will test</td><td width="7%">Gary Zhong</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt99</td><td width="10%">testing the app</td><td width="15%">CM Install LEVEL 3 QS will test</td></tr>
    <tr class="data"><td width="8%">15712</td><td width="10%">Nov 22,2007</td><td width="10%">Rejected</td><td width="10%">Test Documentation Request</td><td width="7%">Autumn Priddy</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="5%">x</td><td width="10%">none</td><td width="15%">run-through for documentation purposes</td></tr>
    <tr class="data"><td width="8%">16029</td><td width="10%">Nov 21,2007</td><td width="10%">Rejected</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">Windows</td><td width="10%">testing</td><td width="15%">Testing</td></tr>
    <tr class="data"><td width="8%">16030</td><td width="10%">Nov 19,2007</td><td width="10%">Rejected</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">Windows</td><td width="10%">testing</td><td width="15%">Testing</td></tr>
    <tr class="data"><td width="8%">15840</td><td width="10%">Nov 10,2007</td><td width="10%">Pending Follow Up Review</td><td width="10%">SMS Install LEVEL 3</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">Y</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">system testing</td><td width="15%">SMS Install LEVEL 3</td></tr>
    <tr class="data"><td width="8%">15719</td><td width="10%">Nov 08,2007</td><td width="10%">Pending Test Install</td><td width="10%">CM Install LEVEL 1 pitt3/col3</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">testing</td><td width="15%">testing</td></tr>
    <tr class="data"><td width="8%">14815</td><td width="10%">Nov 03,2007</td><td width="10%">Rejected</td><td width="10%">test</td><td width="7%">Stephen Sciullo</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">pitt2</td><td width="10%">test</td><td width="15%">test</td></tr>
    <tr class="data"><td width="8%">14915</td><td width="10%">Nov 01,2007</td><td width="10%">Pending Follow Up Review</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">windows</td><td width="10%">test</td><td width="15%">Test</td></tr>
    <tr class="data"><td width="8%">14816</td><td width="10%">Oct 31,2007;Nov 01,2007;Nov 02,2007</td><td width="10%">Production Install Complete</td><td width="10%">Contractor</td><td width="7%">Padma Chirumalla</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="4%">N</td><td width="5%">windows</td><td width="10%">test</td><td width="15%">test</td></tr>
    <tr></tr>
    <tr class="data"><td rowspan="1" width="5%">Linda Humm</td><td width="8%">16034</td><td width="10%">Dec 06,2007</td><td width="10%">Pending Production Install</td><td width="10%">CM Install LEVEL 1 pitt3/col3</td><td width="7%">Randal Hockenberry</td><td width="5%">Low</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">N</td><td width="4%">Y</td><td width="5%">pitt88</td><td width="10%">testing</td><td width="15%">testing</td></tr>
    <tr></tr>
    </tbody></table><body></html>
    Thanks,

    Why are you asking a CSS question in a Java/JSP/JSTL forum? I would rather use a CSS forum for that. That HTML code is unnecessary too. Just post relevant code only, such as that CSS snippet.
    Anyway, it may differ per web browser if this page rule will be picked up and it may also be a client side setting regarding printer settings. Nothing to do here.

  • How to print a PDF document in duplex mode using command prompt?

    I want to print a pdf document in DUPLEX mode by command prompt.Already tried with /p and /t.

    Hello Ram,
    Please see this link - http://www.coolutils.com/Print-PDF-duplex-cmd
    ~Deepak

  • Printing a Labview graph in LandScape mode ?

    Hello everyone. I have LabView printing an XY graph but it always
    wants to print in Portrait mode. I set the defaults of the printer to
    LandScape mode and still go a Portrait printout. Is there anyway
    to force LabView to print in LandScape mode? This will help the graph
    be more readable.
    Thanks for any help you can give.
    Regards,
    Steve Drake

    On Thu, 11 May 2000 17:39:54 GMT, Steve Drake
    wrote:
    >Hello everyone. I have LabView printing an XY graph but it always
    >wants to print in Portrait mode. I set the defaults of the printer to
    >LandScape mode and still go a Portrait printout. Is there anyway
    >to force LabView to print in LandScape mode? This will help the graph
    >be more readable.
    >
    Hi, well after some playing around and touching things that I though
    shouldn't make a difference I got it to print in Landscape mode. On
    the VI's front panel menu File-Print I switched that to LandScape mode
    and what do you know it printed the graph out in LandScape mode.
    Now I want to manipulate the fonts on the graph. I have messed with
    the cursors and I can put x axis lines
    on the chart with a time value
    but the text I'm putting up is small so I need a bigger font and I
    need to get the text out of the graph itself.
    Is there anyway to print the cursor titles vertical instead of
    horizontal to the x axis. Thought I would ask anyway.
    Thanks to anyone who already knew how to do this.
    Regards,
    Steve Drake

  • Possible print in greyscale or black&white mode with empty color cartriges?

    Possible print in greyscale or black&white mode with empty color cartriges and black full? (HP Photosmart Photo D7163)
    Message Edited by aksser on 06-11-2009 02:12 PM

    With some printers it is possible. Try going to the printer properties and selecting Grayscale pprinting. 
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Print html document from presentation server with no intervention of user

    Hello,
    I have been able to create HTML output for my smartform.
    They are saved on my machine.
    I need to print these HTML outputs as a part of process without intervention of the user.
    Is it possible?
    I have tried method 'EXECWB' of 'cl_gui_html_viewer', but that gets fired only on some action and shows the Print dialog for the selection of printer.
    It would be great if anyone can help me with us.
    Thanks
    Mona

    PDL -- thank you for your reply.
    What you gave me did spawn the print dialog allowing me to select a printer. However, when the document printed, the number of pages in the document was correct but the pages were empty except for the page x of y along the top and the name of the document along the bottom. Have you seen this before and do you know how to correct? Also, how do you suppress the info across the top and bottom of the report from printing?
    Thanks

  • How to print PeopleSoft page in the landscape mode automatically???

    hi
    We have a requirement from the client, who wants to get it implemented urgently.
    The peopletools version is 8.16 and appversion is 8.0 The requirement is as follows:Whenever the user prints on the Print button on a page, the page should get printed in the landscape mode automatically
    Thanks
    Lakshman

    You need to write HTML and JavaScript code for this, the code will display a print dialog box, from print dialog box you need to select the landscape and click on print.
    Jayaprakash Tedla

  • Print results the script in landscape mode

    Hi folks,
    how I can
    in powershell print off the results ofthe following code in landscape mode:
    $result | Where {!$_.Values} | Foreach {Start-Process -FilePath "s:\INVOICES\0070\$($_.Invoices).pdf" –Verb Print}

    Hi Nesher,
    good luck with that. Assuming you are using Adobe Reader, this may be of interest to you:
    Adobe Acrobat SDK
    Apparently, this works with the reader too, though it says Acrobat. If that doesn't fit your need ... well, good luck?
    Cheers,
    Fred
    Ps.: This link was brought to you by google inc., savior of all those in search of anything ;)
    There's no place like 127.0.0.1

  • Can't get landscape mode with Qmix app on my iPod touch 4th generation....

    I cannot get my iPod touch to go into landscape mode either with the calculator or with my Persons Qmix software app. I have no problems on the iPhone or iPad, but it has all of a sudden stopped working. I tried rebooting the OS, a reset and the orientation lock is off on the unit...help?

    Well, it went into landscape mode and I used it with QMix several times, then all of a sudden it would not go into landscape mode for ANYTHING not just QMix and Ihave tried double tapping on the bottom and making sure the orientation lock was not on......any other ideas? Im thinking i may have to send it to Apple to get this resolved...

  • When texting using landscape mode with phones  it becomes really sluggish

    is anybody else having this issue? i have big fingers so its easy for me to text when phone its on landscape mode since virtual keyboard is bigger, but when i do the phone takes forever to process what im writting, is there anything i can do to fix this issue? thanks.

    I am having the same issue. Was hoping it was just a simple fix, or that maybe I could go exchange my phone and the problem would be solved. Seems like such a preventable problem on a phone such as this one. I can't text too well without switching to landscape mode, since the buttons are larger, but it's SUPER lagging! I can feel it stalling, and most of the time I have typed a couple of words and have to pause and wait for the words to show up on screen!! Reeeeeally hoping this can be resolved!

  • Printing a contact sheet in LANDSCAPE mode

    In ye olden days of iPhoto when you used the print command it would format your photos into a contact sheet in a "landscape" layout (you don't need a degree in physics to realize it makes a more efficient use of a sheet of paper!). Now, when you use the same print command it formats them into a "portrait" layout (lots of wasted space). And there is nowhere to set the layout to either landscape or portrait (like there was in earlier incarnations of iPhoto).
    Since MOST photos are taken in a landscape fashion, this makes no sense that you cannot choose this layout type. Normally, I'd chalk it up to Apple's toy-like amateur software, but the fact that this obvious function was available in earlier versions makes this excuse moot.
    So, how do you format your contact sheets in a landscape layout?

    Someone else just recently asked the same question. Since then I found a way to do it.
    1 - in another application bring up the Page Setup window and create a custom size that's 11 inches wide and 8.5 inches in height.
    *Just determined that Step 1 is not needed.*
    2 -in iPhoto select the photos you want to print and hit the Print button
    2 - in the first Print window click on the Customize button.
    3 - in the next window click on Print Settings button.
    4 - in the next window select Custom as the paper size and set the width to 11 and height to 8.5 and click OK.
    5 - click Customize again.
    6 - in the next window set the number of columns and other settings.
    7 - Click on Print and go from there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Message was edited by: Old Toad

  • Loading html file that is stylizied with css in Flash

    Anyone know of any tutorials of how to do this with AS3 or give me a quick break down of how to load html files?
    Thanks.

    Have a look at these example files. Its not a tutorial, but it should get you started.
    http://www.ddg-designs.com/downloads/importedTextwithCss.zip

  • Print html document

    Hi, I'm trying to print a html document with this following java code but doesn't works:
      public void onActionPrintEncuestaPDF(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrintEncuestaPDF(ServerEvent)
         try{
              Robot robot = new Robot();
              // Ctrl+P
              robot.keyPress(KeyEvent.VK_CONTROL );          
              robot.keyPress(KeyEvent.VK_P );          
              robot.keyRelease(KeyEvent.VK_CONTROL);
              robot.keyRelease(KeyEvent.VK_P );
              Thread.sleep(500);
              //Alt+U
              robot.keyPress(KeyEvent.VK_ALT );
              robot.keyPress(KeyEvent.VK_U );
              robot.keyRelease(KeyEvent.VK_ALT );
              robot.keyRelease(KeyEvent.VK_U );
              Thread.sleep(500);
              //entrée
              robot.keyPress(KeyEvent.VK_ENTER);
              robot.keyRelease(KeyEvent.VK_ENTER );
              Thread.sleep(500);
         catch(Exception e){  }
        //@@end
    This is not working because java.awt.Robot is a part of AWT package and intended for the client site, how I can make an action that when the
    client push the print button. Print the html document automatly.
    Regards,
    Gabriel

    I create into KM Content on portal a file called print.html and I put the following code:
    &#65279;<html>
      <head />
      <body onLoad="window.parent.focus(); window.parent.print();">
      </body>
    </html>
    Because window.paren.print(); printed the code of actual iFrame. And into Web Dynpro I created a button that call the following function.
    public void onActionPrintEncuestaPDF(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrintEncuestaPDF(ServerEvent)     wdContext.currentPrintElement().setAtrURL("/irj/go/km/docs/documents/print/print.html");
       //@@end

  • Print SSRS Server Report in landscape or portrait mode directly(without report viewer control)

    Hello,
    .Net 4.0\VS2010\C#\ssrs 2008 on Sql Server 2008R2
    Having a problem printing a Server report while controlling the orientation and the size of the emf rendered to the physical page.
    I have the report cutting off in both landscape and portrait modes. I'm passing the following deviceinfo to the render function:
    string DeviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    return DeviceInfo;
    string mimeType;            string fileExtension;            Stream pageStream = serverReport.Render("IMAGE",  deviceInfo, firstPageParameters, out mimeType, out fileExtension);
    No other settings seem to have an affect on controlling the output to printer or pdf.  i.e. The deviceinfo params fed to server report's render function are all you get.  I think my original code comes from an MSDN or CodeProject example. I'm not
    inventing anything new here.
    Links below indicate similar problems but they are looking at the issue from just landscape mode. Seems like I ought to be able to squash or expand the image to whatever size I specify, separate from the 'page' size.  Please let me know what i need
    to know to make these reports print without bleeding onto 2 pages or slicing off the right side of the document image.
    http://stackoverflow.com/questions/25652415/cant-print-ssrs-rdlc-report-in-landscape-mode-directly-to-printer-using-suggest
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/06a9b432-c8a5-4952-a07c-867742a26c47/print-rdlc-without-report-viewer-either-in-portrait-or-landscape?forum=sqlreportingservices
    print ssrs rdlc report in landscape mode directly
    Thanks!

     Hi
    FraterJoanni,
    Thanks for posting in MSDN forum.
    I am not expert in SSRS. You should get better response in SQL Server > SQL
    Server Reporting Services, Power View forum.
    After take a look at the similar threads links as you posted above.
    The conclusion is we needn’t tell the program o this report is landscape not portrait. If the width is larger than the height, the report will be printed in landscape; otherwise, it will be printed in portrait.
    >>Links below indicate similar problems but they are looking at the issue from just landscape mode.
    But in C# forum, we only from the point of code, code looks OK to me.
    A similar blog talking about this
    Controlling Page Size in a Reporting Services Report
    And  I have got the default page size in the US is Letter, 8.5in x 11in.  In other parts of the world A4 (8.3in x 11.7in) is the standard. 
    65: //build the device settings (A4 8.3 × 11.7)
    66: string deviceInfo = string.Format("<DeviceInfo><PageHeight>{0}</PageHeight><PageWidth>{1}</PageWidth></DeviceInfo>", "11.7in", "8.3in");
    67:
    68: //get report bytes
    69: result = rs.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);
    70:
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I need print in landscape mode

    Hi. I have a problem printing files from disk.
    I want print the content of file in landscape mode, configure margins, and the number of copies, and I use a HashPrintRequestAttributeSet to add the properties to do this; but no success.
    public class BasicPrint {
        public static void main(String[] args) {
            try {
                // Open the  file
                InputStream is = new BufferedInputStream(
                    new FileInputStream("c:\\file.txt"));
                // Find the default service
                DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
                PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                // put landscape mode
                PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                aset.add(OrientationRequested.LANDSCAPE);  
                aset.add(new Copies(2));
                // Create the print job
                DocPrintJob job = service.createPrintJob();
                Doc doc = new SimpleDoc(is, flavor, null);
                try {
              job.print(doc, aset);
             } catch (
    PrintException e1) {
              e1.printStackTrace();
                // It is now safe to close the input stream
                is.close();
            } catch (IOException e) {
    }The text always is printed in the default orientation (portrait), one copie is printed and I dont konw how to change the margins.
    Someone can help me with this 3 troubles ??
    Really thanks

    Have you tried like this ?
    public class BasicPrint {   
       public static void main(String[] args) {
          try {
             // Open the  file
             InputStream is = new BufferedInputStream(new FileInputStream("c:\\file.txt"));
             // put in landscape mode, with 2 copies
             PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
             aset.add(OrientationRequested.LANDSCAPE);
             aset.add(new Copies(2));
             // Find the appropriate service for the attributes
             DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
             PrintService[] services = PrintServiceLookup.lookupPrintServices(flavor, aset);
             if (services.length == 0) {
                System.out.println("No print service found for these attributes.");
             else {
                PrintService service = services[0];  // (to simplify)
                // Create the print job
                DocPrintJob job = service.createPrintJob();
                Doc doc = new SimpleDoc(is, flavor, null);
                try {
                   job.print(doc, aset);
                catch (PrintException e1) {
                   e1.printStackTrace();
                // It is now safe to close the input stream
                is.close();
          catch (IOException e2) {
             e2.printStackTrace();
    }Hope this helped,
    Regards.

Maybe you are looking for