How to print JTable to image file?

Hi ppl.
I have JTable that i can print via Printable to printer very well.
Now I have a task to pass this JTable to MS Word. I can pass to MS Word any image file. So all I need is to "print" my JTable to image. Is it possible to reroute printing process to image file?
Or any other ideas how to sovle a problem?

John Bo wrote:
Hi ppl.That words is 'people'. By leaving out three letters, you do not appear cool, just lazy & foolish.
I have JTable that i can print via Printable to printer very well.
Now I have a task to pass this JTable to MS Word. I can pass to MS Word any image file. So all I need is to "print" my JTable to image. Is it possible to reroute printing process to image file?Create a <tt>BufferedImage</tt> the same size as the <tt>JTable</tt>. Call <tt>createGraphics()</tt> on the <tt>BufferedImage</tt>. Pass the <tt>Graphics</tt> object to <tt>JTable.painComponent(Graphics)</tt>. Create an image of the <tt>BufferedImage</tt> by calling <tt>ImageIO.write()</tt>.

Similar Messages

  • How to print uspto patent images using Safari and Quicktime

    3/18/06
    Do you want to know how to print US patent images using Safari? Read on.
    When you access the "images" link of a specific patent on the www.uspto.gov/ website using Safari, the page you are viewing is only one small upper left tile of a huge patent image that is not sized to the screen. You can scroll and try to read the page but it's almost impossible. Try to print it out and you only print what's on the screen. Bummer.
    The fix:
    Place the cursor on the opened image (it may appear blank), hold down the CONTROL key on you keyboard and click on the image. Two instructions come up. Click on the "Save Image to the Desktop" instruction and a DImg.tiff file will be created on your desktop. Click on the .tiff file and it should open in the Preview program, then simply print out the image. Voila!!!!
    Click the yellow arrow in the left margin to access page 2 of the patent and repeat the previous instructions to create another .tiff file on your destop. Do every page and you'll have the patent available to print out one page at a time.
    You can then rename the files and create a folder for that specific patent so you can access it later without signing onto uspto site.
    It's odd that the ever compatible Apple does not provide seamless compatibility to view and print patent images on the US Patent and Trademark Office's website. Where would they be without protecting their own intellectal property? Let's hope the next version of Quicktime includes the appropriate ITU T.6 or CCITT Group 4 (G4) compression language.
    Even the "throw it out the Windows" operating system is up to speed on this issue for America's hard working inventors.
    Keep on inventing.
    Tommy K
    imac 400 DV   Mac OS X (10.3.9)   Cube 450
    imac 400 DV   Mac OS X (10.3.9)   Cube 450

    Another similar thread on this issue...
    http://discussions.apple.com/thread.jspa?messageID=1602391

  • How to print DOC or PDF files

    Hi all,
    please tell me how to print documents (.pdf , .doc , .xls , .jpeg, .gif, .bmp) with java coding
    i have tried like this ..
    try {
    //          Open the input file
              InputStream is = new BufferedInputStream(
              new FileInputStream("C:\\Documents and Settings\\3041\\Desktop\\New Folder (2)\\00.pdf"));
              PrintService service = PrintServiceLookup.lookupDefaultPrintService();
              DocFlavor[] flavors = service.getSupportedDocFlavors();
              for (int i = 0; i < flavors.length; i++) {
                   System.out.println(flavors.getMimeType());
    //          Create the print job
              DocPrintJob job = service.createPrintJob();
              Doc doc = new SimpleDoc(is, DocFlavor.INPUT_STREAM.PDF, null);
    //          Print it
              job.print(doc, null);
              is.close();
              } catch (PrintException e) {
              System.out.println (e);
              } catch (IOException e) {
              System.out.println (e);
    which prints all images properly but not doc or pdf files please help how to print PDF or DOC files
    Edited by: getzkk on Oct 8, 2007 7:31 AM
    Edited by: getzkk on Oct 8, 2007 4:02 PM

    Well, the ability to convert the pdf to html and then to PDF is a worthy solution.
    10,000 emails would require a batch convert solution.
    This is very much beyond what I know. I'll have to leave this to better minds.
    I could suggest a third party tool. Have a look at this:
    http://a-pdf.com/faq/can-i-split-pdf-file-with-nonstandard-page-size.htm
    Other than that,I can't think of anything else.
    Gene

  • How can i upload a image file to server by using jsp or servlet.

    Hi,
    I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code.
    Pls send me anyone.
    Regards,
    Gurumoorthy.

    I'm not an applet programmer so I can't give you much advice there.
    If you want to stream the file from the server before it's entirely uploaded, then I don't believe you can treat it like a normal file. If you're just wanting to throw it up there and then listen to it, then you can treat it like a normal file.
    But again, I'm not entirely certain. You might be able to stream the start of the file from the server while you're still uploading the end of it, but it probably depends on what method you're using to do the transfer.

  • How can i display a image file which is placed in the applications server

    Hi all,
    Can any one help me how can I display a image file which is present in the application server.
    With regards,
    M.Ramana Murthy

    hi,
    *& Form TOP_OF_PAGE
    * text
    FORM F_TOP_OF_PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = IT_LISTHEADER
    i_logo = Logo name
    * I_END_OF_LIST_GRID =
    ENDFORM. "TOP_OF_PAGE
    rgds
    Anver

  • How to get and display image file through servlet

    If I've got a jpg file on the server..
    How can I use servlet to return that image via the following calling method
    /displayfile?filename=image.jpg
    the image.jpg in the server will return
    I know that I need to set the content type to image/jpeg
    after that, how can I return the image file to browser?

    - Get the "file" Parameter from the URL QueryString
    - check if the File specified exists on your filesystem
    - read in the jpg from the file (best would be binary)
    - set the right Mime Type (as you already wrote)
    - write the filecontent to the ServletOutput as you would do with any other content
    - that's it.

  • How to locate the correct image file before reading/saving it

    Hi,
    I would like to find out how to copy/save/read image files from certain website in Java, particularly to locate the right one from various relative URL links on the same website. Below is an example to look at:
    On the main web page
    By selecting (http://www.abc.com/Public/Details.aspx?adid=2007103609) on a tiny camera icon that consist of source code (<td class="even"><a target="_blank" href="http://www.abc.com/Public/Details.aspx?adid=2007135110"><img src="/images/camera.gif" width="19" ...></a></td>) directed me to another page with the actual photo.
    The source code of this secondary page where the photo is located are as follows:
    <script language="JavaScript" type="text/javascript"><!--
    </script>
    <style type="text/css">@import url("http://fdimages.def.com.au/cui/netstrip-20050427.css");</style>
    <div id="networkStripTop">
    <a href="http://www.def.com.au/" onclick="linktop(this);" target="_top"><img src="http://fdimages.def.com.au/cui/digital.gif" height="17" width="95" class="logo" alt="DEF Digital" /></a>
    <div class="links">Any suggestion would be much appreciated.
    Many thanks,
    Jack

    Hi All,
    Could someone give me a hand with suggesting on how to locate the correct links (from multiple web pages) of the image file? I still could not proceed further on this issue.
    There is no problem with saving/reading the file once it is accurately identified.
    Please move it to the Java Technology & XML forum if it is not already in it.
    Many thanks,
    Jack

  • How to add, JS and image files in portalapp.xml

    Hi All,
    I was trying to implement multiple level hover detailed navigation in iview for which I got couple of css scripts from web which include javascripts.
    I placed these files in respective folders and their reference in header.jsp but when the iview is rendered in browser the reference is changing to .htm
    So please help me out how to place these script / image files in PAR file and their reference in portalapp.xml & header.jsp.
    Thanks in advance,
    Sai Krishna.

    1) The CSS file you have , save as "jsp" file and please place in the jsp folder.
    suppose your jsp is header.jsp and your css file is header_style.jsp
    include the css jsp - header_style.jsp in header.jsp like
    <%-- an include clause for css file --%>
    <%@ include file="header_style.jsp" %>
    2) All your images , please place in the "images" folder.
    3) To access the images use like below: in CSS file (jsp)
    in header_style.jsp
    yourimage: url(<%=mimeUrl%>/images/Border.gif);
    in header.jsp
    <%
    String mimeUrl = componentRequest.getWebResourcePath();
    %>
    4) more info for creating the hover menu read this blog
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4913
    Hope this will help you.

  • How can I upload a (image) file through an applet ?

    How can I upload a (image) file through an applet ?

    have a look at http://www.haller-systemservice.net/jupload/
    i'm using Apache Jakarta HTTPClient to create a new HTTP connection to the webserver and sending a new POST request, which holds the image file. (So it's RFC1867 conform)
    there is also an open source implementation of such an applet on sourceforge. it's also called JUpload, but i think it's not maintained any more.

  • How to print the mirror image of a pdf file?

    Hi,
    Does anyone know if it is possible to print the mirror image of a pdf file? I could have sworn I have done this before in an older version of Acrobat.
    I am currently working with Adobe Acrobat 8.0 Professional.
    Thank you,
    Tina

    I just tested this and it worked fine for me.
    When you select to print the cropped page, in the print dialog will be a thumbnail of what is about to be printed. Does this display just the cropped portion or the whole page?

  • How use PHP to read image files from a folder and display them in Flex 3 tilelist.

    Hello. I need help on displaying images from a folder dynamically using PHP and display it on FLEX 3 TileList. Im currently able to read the image files from the folder but i don't know how to display them in the TileList. This is my current code
    PHP :
    PHP Code:
    <?php
    //Open images directory
    $imglist = '';
    $dir = dir("C:\Documents and Settings\april09mpsip\My Documents\Flex Builder 3\PHPTEST\src\Assets\images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "filename: " . $file . "\n";
    $dir->close();
    ?>
    FLEX 3 :
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="pic.send();">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.rpc.events.ResultEvent;
    public var image:Object;
    private function resultHandler(event:ResultEvent):void
    image = (event.result);
    ta1.text = String(event.result);
    private function faultHandler(event:FaultEvent):void
    ta1.text = "Fault Response from HTTPService call:\n ";
    ]]>
    </mx:Script>
    <mx:TileList x="31" y="22" initialize="init();" dataProvider = "{image}" width="630" height="149"/>
    <mx:String id="phpPicture">http://localhost/php/Picture.php</mx:String>
    <mx:HTTPService id="pic" url="{phpPicture}" method="POST"
    result="{resultHandler(event)}" fault="{faultHandler(event)}"/>
    <mx:TextArea x="136" y="325" width="182" height="221" id="ta1" editable="false"/>
    <mx:Label x="136" y="297" text="List of files in the folder" width="182" height="20" fontWeight="bold" fontSize="13"/>
    </mx:Application>
    Thanks. Need help as soon as possbile. URGENT.

    i have made some changes, in the php part too, and following is the resulting code( i tried it, and found that it works.):
    PHP Code:
    <?php
    echo '<?xml version="1.0" encoding="utf-8"?>';
    ?>
    <root>
    <images>
    <?php
    //Open images directory
    $dir = dir("images");
    //List files in images directory
    while (($file = $dir->read()) !== false)
    if (eregi("gif", $file) || eregi("jpg", $file) || eregi("png", $file))
    echo "<image>" . $file . "</image>"; // i expect you to use the relative path in $dir, not C:\..........
    //$dir->close();
    ?>
    </images>
    </root>
    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="callPHP();">
    <mx:Script>
    <![CDATA[
    import mx.rpc.http.HTTPService;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.events.ItemClickEvent;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var arr:ArrayCollection = new ArrayCollection();
    private function callPHP():void
    var hs:HTTPService = new HTTPService();
    hs.url = 'Picture.php';
    hs.addEventListener( ResultEvent.RESULT, resultHandler );
    hs.addEventListener( FaultEvent.FAULT, faultHandler )
    hs.send();
    private function resultHandler( event:ResultEvent ):void
    arr = event.result.root.images.image as ArrayCollection;
    private function faultHandler( event:FaultEvent ):void
    Alert.show( "Fault Response from HTTPService call:\n " );
    ]]>
    </mx:Script>
    <mx:TileList id="tilelist"
    dataProvider="{arr}">
    <mx:itemRenderer>
    <mx:Component>
    <mx:Image source="images/{data}" />
    </mx:Component>
    </mx:itemRenderer>
    </mx:TileList>
    </mx:Application>

  • How do I add an image file to a library?

    Hi,
    My project requires files (normally in the form of JPEGs and PDFs) to be added to a library. The file paths are passed into the plug-in via sockets.
    In QuarkXPress we do this by using a hidden document, which is not visible or accessible by the user. Files are placed on the document and then transferred into the library. I can see how to do some of this in InDesign:
    Create a library using - ILibraryCmdUtils::CreateLibraryNewLibCmd()
    Add an item - ILibraryCmdUtils::CreateLibraryAddItemCmd()
    The bit I can't work out is the hidden document. I was hoping that a document could be created as hidden via the INewDocCmdData interface - no joy. I cannot see any reference to hidden documents anywhere in the SDK documentation. Does InDesign have a default one? So I'm wondering if this is the best way to do it.
    Can anybody point me in the right direction? It might be that hidden documents is not the best approach.
    Best regards and thanks in advance.

    Thanks to Dirk's help, I've now got my library code up and running. I can now handle my library through commands from an external source and from any user action. Had a few problems with outstanding bosses, but I've managed to configure the code to prevent this.
    With that out the way my attention has moved back to adding image files to the library via a hidden/headless document. I've written some code that will transfer images from the document to the library using ILibraryCmdUtils::ProcessLibraryAddItemCmd().
    The bit that's giving me problems is the file to document bit. The SDKHelper sample code (function PlaceFileInFrame) shows how this can be done, but there is a snag - I don't want the user to see the document that is used to transfer files to the library. Unfortunately a document UIDRef will not work in IHierarchy as it is not a displayable item.
    Does anyone know of a way this can be done? The user should not see or interact with the document.
    Cheers,
    APMABC

  • How to print Jtable values in one A4 size paper

    Hi,
    i am having JPanel , this panel have Jtbale, Jtextfield, Jlable, i search the code for Printing Jpanel, its work fine and print whole JPanel including, jtable, textbox, everything.
    my Jtable have Scroll bar to see all the values in the table,my problem is when i was print the JPanel the Jtable print only the display values in Jtable, cannot print all the values from Jtable,(eg. Jtable have 50 rows, screen display 20 rows only, move the scrollbar to see remaining,) .
    i want to print 50 rows how to print the values anyone can help me
    thanks in advance.

    Duplicate post. Mods please do your duty.

  • How to print a BLOB (image) on a PDF report using Oracle APEX Listener as Print Server

    Hi,
    I use APEX 4.2.
    I have the following query as SQL text for a Report Queries in Shared Components:
    select
        customer_id,
        cust_first_name,
        cust_last_name,
        cust_street_address1,
        cust_street_address2,
        cust_city,
        cust_state,
        cust_postal_code,
        phone_number1,
        phone_number2,
        credit_limit,
        cust_email,
        filename,
        company_profile,
        -- customer_image,
        decode(nvl(dbms_lob.getlength(customer_image),0),0,null,
        '<img style="border: 4px solid #CCC; -moz-border-radius: 4px; -webkit-border-radius: 4px;" '||
        'src="' ||
        apex_util.get_blob_file_src('P22_CUSTOMER_IMAGE', customer_id) ||
        '" height="75" width="75" alt="Photo Customer" title="Photo Customer" />') customer_image,
        mimetype,
        image_last_update
    from
        demo_customers;
    I am unable to have the image printed on the PDF report. Even when the P22_CUSTOMER_IMAGE is defined as session state item.
    Does someone knows how to print such image/BLOB in a PDF report?
    Thanks by advance.
    Kind Regards.

    Hi,
    Indeed, I would need a custom layout.
    Unfortunately, it seems (according to this white paper) not possible with the APEX listener only. I would need a third pary tool. A pity...
    For me strange, that I cannot generate such a report having images or pictures in a pre-definied report layout... Maybe a future enahancement for Oracle.
    Kind Regards.

  • How to print a monochromatic image in a colour other than black?

    I have an image in photoshop that  is currently black and white, but I would like to print in a monochromatic green, as in just #00ff00 colour; so that it prints in green and white. How do I edit the image so that it prints like this?

    Use your B&W image, inverted, in the mask channel of a Solid Color Layer with the specific colour that you require. Underneath that put a solid white background layer.
    Use linear blending (Ps default is gamma 2.2). In Edit > Color Settings, set RGB blending to 1.00.

Maybe you are looking for

  • Mac Book Pro Track Pad Making Mac Unusable. Already been replaced once! (I need to write my law school paper, help me please!!!!)

    I got my Mac Book Pro repaired in late July of this year. The repair summary says that they replaced the display claim shell, glossy (item number 620-5153). I believe this was due to a clouding on my screen. However, they also replaced the top case w

  • How do I change the printer options on an ipad air?

    i am changing service provider. Currently they overlap. My ipad is happy to find the current old provider but cannot find the new provider even when i switch to that network. I cannot find any options for changing printer options. how can I change th

  • Better client than sqlplus for bulk fetch testing .

    Hi, I'm doing some test with rows speed retriving via Net8 and need some better client than sqlplus itself . There is araysize limit of 5000 in sqlplus and its not oriented for massive row fetching , although Im using set termout off . Test are in 10

  • Limit number of rows from wildcard expansion- DRG-51030

    We use CONTEXT iindex in 11g to search on a text DB column, "Name". This is used in a UI to show autosuggest list of 25 matching names. When the end user types an 'a' we want to show a list of the first 25 names that contain an 'a'. We hit the issue

  • MODIFY Table in OO Context

    Hi! I'm trying to modify an internal table which is a public attribute of a class. I'm always getting a sy-subrc 4. Here is my code to describe my problem: MODIFY TABLE go_instance->gt_table FROM <table>. The datatype of <table> is correct. When I as