How to take image(screenshot) of first page of any file

Hi all,
I am doing a project work and I need to take the image(just as screenshot) of the first page of any file so that contents of that first page can be viewed by that image .
And finally i want to set that image as an icon for that file.
I have used "java.awt.Robot" class for taking desktop screenshot but I am not able to find out the way how we can take image of first page of any file by just giving the url of that file even if file is closed. Can any one help me? Waiting for your kind reply..........
Thanks in advance!!

Please don't double-post. http://forums.sun.com/thread.jspa?threadID=5430733&tstart=0
Are you asking whether you can take an icon from a file in the filesystem and store and subsequently display it? Conceptually, not a problem. You would want to determine the extension and then use either JNA or JNI to access the registry (or use an existing API [http://www.dzone.com/links/access_windows_registry_using_pure_java.html]) and find where that extension is associated to a file type. That is usually linked to another registry key that has the icon to display (and its path). Use a FileInputStream to get that icon on the filesystem. You can Google around for how to navigate the Registry, I'm not a Microsoft expert, but I know it can be done.
Or are you asking whether the contents of the first "page" of an arbitrary file (Word doc, PDF, image, etc.) can be discerned and then stored and subsequently displayed? If this is the requirement, it will be very difficult to support more than a few formats. And many formats that are native to a given O/S will cause you issues.
- Saish

Similar Messages

  • Google images only showing first page. Any solutions yet?

    Hi
    I've recently come across this problem of Google images only showing the first page of images with the rest being blank grey boxes.
    After trawling the web for days it seems this has been an ongoing problem for many for several months now but I haven't seen any solutions that have worked for me.
    I've cleared the cache and temp files, I've un-checked 'disable or replace context menus' on firefox etc.
    It seems to run ok on ie8 but I prefer to use Firefox if at all possible.
    Is there a solution out there?
    I am on XP Pro sp3 using FF 3.6.11

    This was happening to me (only getting one page of images after a search.) I disabled the AdBlock Plus ad-on and the problem was solved.

  • Macbook Pro won't print the first page of any file in any application.

    Problem: My Mid-2009 Macbook Pro won’t print the first page in Microsoft Word, Sibelius 6, or in Adobe Reader. My printer is an old Canon MP480 that’s worked for almost 2 years perfectly. As well, the “print to pdf” function results in the same error. However, if I open a new user account it all works fine. To change user accounts would be an extreme hassle though so, if possible, I would like to first remedy this one.
    Recent changes: the motherboard of my computer was replaced about a week and a half ago. I printed a lot of stuff from Word two days ago and that worked fine but, already then the print to pdf function was cropping off the first page. At the time, though, I accredited the issue to the word documents being filled with pictures of sheet music that I was printing instead of text.
    Things I have tried:
    Updated Mac software
    Repaired Disc Permissions in Disk Utility
    Checked for new printer drivers/firmware
    Reset the PRAM (http://support.apple.com/kb/ht1379.)

    No but it's not a printer-related issue because the "Print to PDF" function also leaves out the first page.

  • How to take a screenshot

    A popular question that keeps coming back is how to take a screenshot.
    How to do this can differ between models and firmware version but there are two different methods used in Xperia devices.
    1.
    Press and hold the on/off button. This will bring up the options window you see below. Tap Take screenshot to capture your screen.
    This can be done while in any application or menu of the phone.
    2.
    Press and hold both on/off and volume down (-) key at the same time for about 2 seconds and the phone will take a screenshot of the present screen.
    After you’ve taken a screenshot you’ll see this icon in the top left corner of your notification bar. (Goes for both method 1 and 2)
    Drop down the notification bar and you will be able to instantly share your screenshot to any of your supported applications by pressing the share button.
    All screenshots you’ve taken will be saved so you can view them later in the album application.
     - Community Manager Sony Xperia Support Forum
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

    Command-Shift-3 for the entire screen
    Command-Shift-4 for the selection you make( the cursor changes to cross hair)
    Command-Shift-4 and then Spacebar will change cursor to camera and you are able to select windows, documents.
    This can also be found in the online Help (in the Finder hit Command-? and search for "Shortcuts for taking pictures of the screen"
    JJ
    Sidney, you beat me to it

  • How to take a screenshot on your Mobile or Tablet

    How to take a screen shot on your Mobile or Computer.
    We often ask you to send us a “Screenshot” when you are having an issue with your streaming service and are not sure on how to take a screenshot on their phone/tablet so I thought I would provide some simple insturctions
    Android: If you’re Running Ice Cream Sandwich (4.0) and above.
    Get the app or screen that you want to capture ready to go.
    Press and hold the “Power” button and the “Home” button at the same time (for phones with no “home” button, hold down the “Power” button and “Volume down” button)
    You'll hear the camera shutter sound fire off, along with a short flashing animation, and that's how you know you're good to go.
    You'll now be able to see the screenshot in the “Gallery” app. From here you can attach it to your sms, email or direct message and send to the desired recipient.
    Apple IOS:
    You can capture the screen on your iOS device using the Sleep/Wake and Home buttons.
    Get the app or screen that you want to capture ready to go.
    Press and hold the Sleep/Wake button on the top or side of your iPhone, iPad, or iPod touch, then immediately press and release the Home button.
    You'll hear the camera shutter sound fire off, along with a short flashing animation, and that's how you know you're good to go.
    You can find the screenshot in your "Photos" app.
    Cheers - TommyR
    Need help? Why not check our KnowledgeBase here || Find what you were looking for? Tag answers as Accepted Solution
    All moderation actions are supported by the CrowdSupport Community Guidelines

    Take a screenshot on your Mac
    Open About this Mac under the Apple menu at the left side of the screen's menubar. The version of OS X will be displayed. You may locate other information about your computer as well.
    Apple - Support - Mac 101

  • Cant Rotate First Page of ANY pdf

    I can no longer rotate the first page of ANY pdf. If I try to rotate all pages, every page but the first will rotate. If I try to rotate only the first page I get a message saying "Invalid Page Range". I've been using Acrobat for years and never had this issue come up.

    Try re-creating the PDF by printing through Adobe PDF printer.
    Open PDF in Acrobat -> Go to File -> Print -> Choose PDF Printer -> Save the file.
    Now the check if issue still exist on newly created file.

  • How do I delete just the first page of a document?

    A long time ago (2005) I made a document over 200 pages long - and now I need to edit it, specifically to delete the first (empty) page of the documet, so when I add a separate cover, the first page will be on the right, where it should be. I shall also need to edit/change the page numbering and TOC to match. It has been so long since I used Pages that I don't remember how to do this.
    I tried selecting the first page in the sidebar vertical list of the pages and hitting the Delete button (or using the menu option) but this seems to want to delete the entire document, not just the selected page.
    I know this sounds simple, but I can't figure out how to do it. Pages Help just says to delete the content, but there is no content on the page.

    Either you have a lot of Pages breaks which you can delete or you have aded a Pages break which you also can delete. Turn on the invisible characters View > Show Invisibles. You will see blue characters.

  • How do I print only the first page of multiple PDF documents?

    I have about 1,500 PDF files (scientific papers) that I need to print only the first page of... Any suggestions on how to do this as a single job or as a few jobs? The files are organized in a bunch of different folders, so if there was some way to do this folder by folder, that would be ok too. Thanks!

    Make sure that in System Preferences Printing & Fax pane you set the default printer to the one you want to use, then put all of these PDF files into their own folder, then open terminal and type the following (without hitting return afterward):
    lpr -o page-ranges="1-1"
    Then drag one of the PDF files into the terminal window (it will add it's path to the end of your command) and replace the file name with *.pdf, so it will look like this:
    lpr -o page-ranges="1-1" /Users/todd/Documents/My\ Folder/*.pdf
    Then hit return.

  • How to take parts of a web page and feed into a PDF template to create a PDF

    Interesting quesiton that I think was what LiveCycle was for: How can someone take parts of a web page or xml document (say by id name or a specialized tag) and feed the chosen items into different regions inside a PDF template?
    Basically, can you identify areas on a page and then tie them to place holders in a pdf template (with high res graphics say) and create a PDF?
    Please note: this is not about converting a whole webpage to a pdf, but select portions of it.
    Anyone have experiences in doing this? So far, it appears to require a toolset like LiveCycle or Adlib to utilize only selected items and not the whole page.

    The lack of answers is likely due to folks having no clue. What you have asked is not really the purpose of either Acrobat or LiveCycle, but that is not to say it can not be done. A starting point is to bring a WEB page into Acrobat as a PDF. This can be done by printing from the browser to the Adobe PDF printer, using PDF Maker with IE or FIrefox, or simply creating directly in Acrobat. Those are the normal ways to get things from a web page to a PDF.
    That said, it is not what you asked. You are asking about being able to parse parts of the web page. That is a lot more work and may not be directly possible, though with JavaScript it might be possible. I suspect that if it is possible you would require a lot of extra programming to allow the material selection. It may be the folks in the SDK sub-forum can help.
    Being I have no clue how to implement what you have asked (and probably no one else either), I can only suggest some things to look at or other places to inquire. If you think the XML of LiveCycle would help, then you might try the LiveCycle forum.
    In terms of your post, I really don't remember seeing the original, but that was right near the end of the semester and I was not checking the forum very much. There are various reasons folks may not reply, typically because they have no clue. Templates are also somewhat specialized and there are not many posts about them. My guess is that the template aspect may have had a lot of folks skip the post. In any case, I have tried to give you some thoughts.

  • How to Display 10 columns in first page,next columns in second page in smartforms in sap.

    In internal table having 30 columns of data.
    i have to display like
    first 10 columns in first page with page no :1
    second 10 columns in second page with page no :2
    third 10 columns in second page with page no :3
    how to develop this.
    please how develop this in smartforms .
    please help .

    Hi,
    You dont have to divide the data.
    You must be using TABLE node in your smartform to display the table.
    Copy the node 2 times more so that the total table nodes become 3.
    Now, change the headings in each table according to the column you want to display.
    Change the fields of the workarea in the ITEM lines accordingly.
    Add a COMMAND node after each table and set it to go to next page.
    E.G :
    Suppose I have a table with 6 columns and I need to display 2 columns in a table then page break.
    Work area name is WA.
    Then first table will have headings : FIELD1 FIELD2
    Items will have field     :     WA-FIELD1 WA_FIELD2
    COMMAND NODE : Go to Next Page
    Second table will have heading : FIELD3 FIELD4
    Items will have field     :     WA-FIELD3 WA_FIELD4
    COMMAND NODE : Go to Next Page
    Third table will have heading : FIELD5 FIELD6
    Items will have field     :     WA-FIELD5 WA_FIELD6
    So, same table with same work area will be used 3 times, displaying different set of columns in each TABLE node.
    Regards,
    Ashish

  • How do you make it print first page first and not the last page first?

    I have a HP Officejet Pro 8600. How do I make the first page print first and not the last page printing first?

    Hi,
    From the application used to print open the print dialog and click Oroperties or Preferences to access the Printing Preferences screen.
    From the Layout tab set Page Order as Back to Front, then the first page will be printed first.
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • How to take a screenshot on a MacBook Pro

    How can I take a screenshot on my macbook pro?

    Press the Shift, Command, and 3 keys to capture the whole screen.
    Press the Shift, Command, and 4 keys to capture a draggable part of the screen, or follow it with the spacebar to capture a window.
    Open the PNG on the desktop. Alternatively, combine either of the above with the Control key to put the screenshot onto the clipboard instead of the desktop.
    (109188)

  • How can I print only the first page of multiple PDF files at once in my PC?

    That is, without having to open each file individually.
    Thanks!

    Create an Action with the following JS command:
    this.print({bUI: false, nStart: 0});
    This will cause the first page of all the files you process with this Action to be sent to your default printer.
    If you need to specify more complex parameters, you'll need to use a more complex code...

  • How can I Insert a new first page?

    I have created a form in Live Cycle Designer with multiple pages and somehow accidently deleted the first page. Is there a way to Insert a blank page and insert it where you want (the beginning) instead of at the end?
    Thanks!
    Sue

    Hi,
    just open the hierarchy window and move the newly added page via drag'n drop to the position you need it.

  • Color Laserjet 4650 printing first page of any doc over and over

    Hey folks,
    If I or some of my colleagues send a doc to the network printer, it prints the first page over and over until you go and force it to stop.  This is taking place on at least one PC and one Mac; others have printed from both platforms without problem.  It seems to happen in any kind of software - MS Office, web pages, etc.
    Rebooting the printer has no effect.
    Thanks in advance for any help!

    Here is what you need to do.  On the printer go to the diagnostics menu and then choose the pq troubleshooting and select. The printer will print a number of pages including 4 sheets of solid fill color i for each color.  This is where you will see the missing color and most times it is only 1 toner that is having an issue.  This does not mean that particular toner is bad as it could be a bad slot.  To find out you need to go to the same diagnostics menu and then scroll down to disable cartridge check and select.  When the printer says ready, diagnostics mode, open the toner door and remove all the toners.  Now I will give you some examples of what to do next.  Let say the Cyan toner only prints on half the page.  You will want to take the black toner cartridge and place it in the cyan slot.  Close the door and run the same test pages again.  Most will be blank, but you should get 1 page of solid fill black.  If the page is ok unlike the cyan page, then the issue is the cyan toner.  If the page has the same problem as the cyan page, then the slot has an issue and most likely the laser/scanner lens are dusted over. Sometimes you can lift the shutter in the back of the toner cavity for that color and use a qtip to clean the lens.  Most times the laser/scanner assembly need to be removed from the printer which is not easy and then the optics cleaned.

Maybe you are looking for

  • Export of RAW files loses EXIF data

    I am having a problem when I export files out of the PSE Organizer from RAW format to JPG that I am losing EXIF data on the resulting JPG file. I am using PSE 6 on Windows Vista and primarily manage my images in RAW format (Nikon D300 NEF) within the

  • T60 wireless adaptor problem

    Hi everybody! I reinstalled the windows on my T60 and didn't have any problem with my Intel PRO Wireless 3945ABG adaptor. After one day it stopped working. The small green light for it doesn't turn on anymore, even if a press fn+F5. I tried to reinst

  • DBMS_XMLSTORE causes 'Space' to be inserted before value.

    Hi, I have data without any space in the XML file i.e. <TAG1> I </TAG2> But when I try to insert the data in the table using : DBMS_XMLSTORE.setUpdateColumn(insCtx,'TAG1'); I get the asnwer as ' I' i.e. there is a space before 'I'. I can't insert the

  • Hyperlink rotating pictures

    How do I link the pictures in the attached file to different websites. Example, when image 1 appears, I want users to be able to click on it to take them to story 1. Then when picture 2 appears, users can click on it to go to story 2, etc. Thanks.

  • Media Manager mistake - Can it be fixed?

    Hi, we have tried to back up a FCP project on Media Manager but accidentally 'moved' the files instead of 'copying' them. Now when we try to retrieve the project, about half the files are offline and we can't reconnect them. The project still plays f