I am using pdf.js to render pdf document. How to detect when a mouse is over an image?

Hi,
i want to change the cursor pro grammatically whenever we move the pointer over an image on a pdf document rendered on the browser. I am using pdf.js to render the pdf document.
I would like to know is there any api exists in pdf.js this will take the x and y coordinates and return whether any image was drawn on the specified x and y coordinates?
Thanks
Suresh K

Add a mouse motion listener to the tree, and check the node at the mouse location.
Then change the icon of the tree accordingly:
tree.addMouseMotionListener(new MouseMotionAdapter() {
    public void mouseMoved(MouseEvent e) {
        JTree tree = (JTree) e.getComponent();
        TreePath path = tree.getClosestPathForLocation(e.getX(), e.getY());
        Rectangle bounds = tree.getPathBounds(path);
        if (!bounds.contains(e.getPoint()))
            System.out.println("No tree node under mouse");
        else {
            TreeNode node = (TreeNode) path.getLastPathComponent();                   
            System.out.println("Tree node under mouse: "+node);
});

Similar Messages

  • How to detect red frame in a series of images using web cam?

    hey i am a new use of lab view(8.2 n 8.6).kindly ca any1 help me out in red color detection in a series of frames being capture by a usb web cam.i have done the grabbing thing but dont knw what to do now.plz help me out. basically i hve to do the following things:
    1 )the camera is continuously making video
     2)the moment a red color or red frame comes across the camera the camera is programmed such that it will capture that red frame. and display that captured frame
    plz hep me out.i need serious help.
    i am attaching a vi that is grabbing the images and then xtracting the red color info n thn displyaing its intensities rows and coumn wise on a graph.here i have used a guassian surface to locate the red color.
    Solved!
    Go to Solution.
    Attachments:
    giving intensity of red color.vi ‏78 KB

    hey,i have made the code plz chk it and do rep soon as ma project sbmission date is very near =((
    i am snaping an image from the web cam then comparing it with the red colored jpg image made in paint.
    the jpg image is converted  to give input image to imaq match vi.but after the comparison it gives the same output.
    on the front pannel the snapped image is displayed,the red colored image that is converted in to its respective pixels is displayed and the image that is obtained after cheking the image in the draw fails vi...the pic converted to pixels is all the time displayed.and the pass/fail icon always denotes one pass led on..plz chk the code =((.
    also can u provide me some guide line for using thr hough transform for the red color detection in lab view..i dont have to import the matlab code..i have to purely make it using the lb view libraries.
    also one more request pl rep me regularly as i really need your golden piece of advice for ma success.
    thnx
    Attachments:
    picture to image(BY ME).vi ‏102 KB
    untitled.JPG ‏3 KB

  • How do I make a textbox appear in a PDF made in InDesign CC when the cursor rolls over another textbox?

    I'm trying to make a textbox appear in a PDF made in InDesign when the user rolls the cursor over another textbox, and I want it to disappear when the cursor moves off the first textbox. I've tried the following with various setting, and it's just not working for me.
    Display a different button on rollover
    You can create a hot spot in which clicking or mousing over an object displays another object. To do this, create two buttons, hide one of the buttons, and use the Show/Hide Button action to show and hide the target button.
    Create an object to be used as the source button. In the Buttons panel, click the Convert Object To A Button icon.  
    Place the image you want to be used as the target button, and convert it to a button.  
    Select the target image and select Hidden Until Triggered at the bottom of the Buttons panel.  
    The image needs to be hidden in the exported document so that it can be displayed when the source button is moused over or clicked.  
    Select the source button and create two different actions, one to show the target image and a second to hide the target image.  
    If you want the image to appear when the mouse hovers over the source button, use the On Roll Over and On Roll Off events. If you want the image to appear when you click the source button and disappear when you release it, use the On Click and On Release events. In either case, use the Show/Hide Buttons action to display and hide the target button. See Make buttons interactive.   
    Use the Preview panel to test the buttons.  

    Here's more information about what I'm doing.
    1. create text box with a little text
    2. turn it into a button (Button 1)
    3. create another text box with some text
    4. turn this into a button (Button 2)
    5. check "Hidden Until Triggered" for Button 2
    6. For Button 1, select "On Roll Over" for Event
    7. For Button 1, click + to add Action and choose "Show/Hide Buttons and Forms"
    8. For Button 1, change icon next to Button 2 into eyeball (which I assume makes Button 2 visible on roll over).
    9. For Button 1,, select "On Roll Off" for Event
    7. For Button 1, click + to add Action and choose "Show/Hide Buttons and Forms"
    8. For Button 1, change icon next to Button 2 into crossed-out eyeball (which I assume makes Button 2 invisible on roll off).
    8. Export to PDF with modified smallest file size and include bookmarks and hyperlinks and include appearance for interactive elements.
    Both buttons are visible in the PDF, and nothing happens with roll over and off.
    What am I doing wrong?

  • When i convert Word Document to PDF it give  # in PDF

    Hi,
    I am using PDF Converter 9 Pro & my documents is word 2010 when ever i convert to PDF it Convert but at few place it give  # Error .
    Please Help me what is the Soultion.
    Thank you,

    Acrobat X Pro has problems with Explorer 9.0 and Office 64 bits version.
    I started having similar problems when I upgraded X pro to 1.2 or 1.3 version and upgraded Explorer to 9.0. I was unable to print web sites(converting to PDF) correctly causing distiller errors, or printed some pages but the fonts were illegible. You could correct the problem by going to printer property, and uncheck "rely on system fonts".
    On the other hand, technical support told me that X pro 1.2 version caused issues with office 64 bits version, and told me to upgrade 1.3 only. I did that, but by converting web sites or office files into pdfs with success, but print listing folder get error messages for each print command, and I had to clear them out. otherwise yellow triangluar mark will be attached to printer icon of Acrobat.
    Obviously, upgrade to 1.3 did not solve all the issues, and I have to stay without any upgrade at all.

  • PLEASE HELP I am using an alienware m11x and the only problem i have is when i go to the bar on firefox 4 like the file,edit,etcc what every my mouse hovers over turns black and stays black :/

    When my mouse hovers over the bar on firefox 4 it turns black so if i hover all of them all of them turn black and stay black and i cant see anything. Also I am using an alienware m11x with a dual core duo 2 Su700 (@1.3) (@1.3) with a 1g nvadia graphics card 335m geforce.

    Make sure that you allow pages to choose their colors and that you haven't enabled High Contrast in the Accessibility settings.
    *Firefox > Preferences > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    See also:
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    *https://support.mozilla.org/kb/Images+or+animations+do+not+show

  • Is it possible to use a form variable (in memory) as input to render pdf?

    Hi,
    I understand that the render to PDF service takes URI as input, but what if I have a xdp form modified and stored in memory, and would like to use that to render PDF, how can this be done?
    Thakns in advance.

    Hi Jasmine,
    Thanks for the tip. So, is this what I need to do?
    I have an xdp form in the repository, and xml data I generate from a custom component.
    1. render the pdf form (merge xdp (no data) with xml data)
    2. convert pdf back to xdp (this xdp now includes data) and stored as a document variable in memory
    3. manipulate the xdp (via custom component)
    4. render the pdf form by passing the xdp (from step 3) in a document variable type as part of the data parameter, leaving URL blank.
    5. write pdf to disk
    This would work right? Is there another way?
    Thanks in advance.

  • Automator - When using the Render PDF as Image action, the first file is out of order (naming).  How can I fix this?

    I am creating an Automator Action to render PDF files as Images.  When the PDF is multiple pages, the first page has no numbers, so it ends up at the end of the list.  Here's an example:
    When it is a single page, the result is:
    filename.png
    When it is multiple pages, the result is:
    filename 141.png
    filename 142.png
    filename 143.png
    filename 144.png
    filename.png
    First, it always seems to start at 141...not sure why.
    Second, I did try to add an action to rename and make sequential, however the resulting list was in the same order... except with additional numbers at the end.
    Any suggestions?

    I see. 
    This worked when I tested on 1 PDF:
    The Run Shell Script Action is:
    basename=${1##*/}
    echo ${basename%.*}
    If it's still out of order, add: Sort Finder Items [by creation date] after Render PDF Pages as Images

  • How to render PDF in InfoPath whose source is a memory stream

    I'm struggling to interface InfoPath calling a Web service that generates a PDF and rendering the PDF for the user.
    The document workflow is:
    Using InfoPath (using both the fat client and browser client), display a form for the user to complete.
    Collect the entered information and call the Opus Web Service (Elixir) to render a PDF.
    The PDF is sent back to InfoPath through the web service call.
    Open the PDF for the user and provide them the ability to review and/or print the document.
    It's this last step that's causing the problems -- It's no problem when this is all part of a web page. This work flow is used for thousands of PDF reviews via web pages daily.  However, because I have to use InfoPath, I'm struggling to find an easy solution.  I can't write the returned data to disk and open the document because the InfoPath Browser is really tied into SharePoint and I don't want to store temporary PDF files on the SharePoint server.
    My issue is : How to render a PDF document that is sourced as a memory stream.
    I'm down to a couple of possible solutions and have some questions:
    1) I looked at writing a plug-in to support another ASFileSys interface which would be used to read from memory instead of from disk. But I don't see a way to invoke my plug-in through an API.  Is this possible?
    2) I looked at the OLE interfaces, but didn't see a nice way to pass a document in through memory.  Is there an interface that accomplishes this task?
    3) I did see that I could create a compound document in memory and then call the OLE interfaces.  Has anyone done this and is it maintainable ? 
    4) The OLE format also lends itself to placing the PDF inside of an RTF to display. Seems like a lot of work to put a wrapper around the PDF, but I do think that also alleviates the need to register any components in SharePoint.  Again, has anyone seen this done?
    In the end, none of these seem very straight forward. So I have to ask, am I missing something obvious here? 
    Thanks for your help,
    Chris Andrews

    Infopath has a fat client interface and a browser version where the server is a sharepoint server.  So the web service executes on the local desktop or in the Sharepoint server depending upon which interface is used.  The best way to work on InfoPath solutions is to focus on the fat client solution with a couple of caveats.  Asume that you can't create temp files, and assume that you can't invoke a new application, and that you aren't in an HTTP request/response environment (since Sharepoint is a wrapper around the back end browser interface).  You can invoke code that is in DLLs, OCX, TLB, etc... (typical Active X, or library code).
    Chris

  • How to preserve original filename in Automator 'render pdf as images'?

    Using Automator's 'render pdf as images' will result in output of files in random names
    What are the correct workflow if the desired output files would be the original filename? Ex: manual.pdf ---> manual.jpg, manual.pdf ---> 0001bU.jpg
    PS: I have tried 'Rename Finder Items--->Make sequential' but it still doesnt produce the desired output, it only makes manual.pdf ---> 0001bU-01.jpg

    You convert the CMYK document to RGB using standard color management. The rest is beside the point. We know nothing about your experience in 3D nor your actual artwork, settings, system and so on. Just slapping on a texture on a 3D model doesn't make it look "real" or even photo-realistic. You have to understand lighting, shading and how to prepare textures properly, stuff for which you can find any number of tutorials on the web (though not specifically for PS 3D).
    Mylenium

  • [Automator] Render PDF Pages as Images problem

    Hi,
    I'm using an Automator Action called "Render PDF Pages as Images". It is not working properly. I've also tried one called "Change Types if Images" with the same results. The problem is both of these actions will create an image, but they won't put it anywhere other than a temp directory. With the second action, if I do it on an image file like a jpg, it will convert the image and put it in the directory the file exist in. I have a bunch of PDFs that are really just scanned images that I need to convert to TIFF and I want to automate it. It is frustrating that the actions are not working as documented. Both are supposed to render the change on the existing file in the location it exists and neither is work that way when run against a PDF.
    Any help would be appreciated.

    Christopher Stumpf wrote:
    It's really simple.
    It's a service item and it contains just one of the actions I've already listed. They are supposed to change the existing file to the desired type, in place.
    no, they are not supposed to do that. they don't say anything of the sort in their descriptions. moreover, this is completely impossible if a pdf file has several pages. I just tried it and it works just fine. I passed a multipage pdf to the action "render pdf pages as images" and it made a number of separate pdf files - one for each page, as it should according to the description. they are temp files, yes. so you just need to follow it by the action to copy (or move files) and then by "rename finder items".
    my workflow:
    1. get specified (or selected) finder items.
    2. render pdf pages as images.
    3. move finder items
    3. rename finder items.
    Message was edited by: V.K.

  • Automator: render pdf to images

    I am taking a folder of pdf files all named numerically in the order they should be in and rendering them to images using the automator "render pdf to images."
    This outputs the images with completly random names. Even using the "Rename Finder Items" as suggested right after the Render pdf to images still does not produce images in the right order.
    This is really frustrating as I can't even see how this function could be useful for anyone if it can't produce images with some kind of logical file names.
    Does anyone have experience with this?
    Message was edited by: Jessek

    Not sure what the testers of some of these actions were thinking about, but you might try using the Dispense Item Incrementally action to step through your file list one at a time.

  • Render PDF to Image and Mail

    I have been trying save the following workflow as a Folder Action Plug-in:
    1. Render PDF Pages as Images (To produce a jpeg of a PDF)
    2. New Mail Message (To create an e-mail with the jpeg attached)
    3. Send Outgoing Messages (To send the e-mail)
    When I test the folder, the system appears to skip the Render PDF step and goes straight to creating and sending the e-mail without an attachment. If I save the workflow as an Application it will work, but not as a Folder Action Plug-in. Any idea why not?

    I once posted a VI to create PNG files from LaTeX commands where I used Ghostscript to convert from eps to png.  It turns out, with only a very minor modification the subVI will also convert PDF to PNG.  Try this out.  You can install Ghostcript and then add the path to gswin32c.exe to the path control (if you install to the default location you shouldn't have to change anything other than drive letter).
     http://pages.cs.wisc.edu/~ghost/
    Attachments:
    EPStoPNG.vi ‏38 KB

  • Fastest Way to Render PDF from XML

    Hi
    I have used XSLTC(pre-compiled XSL files) to render PDFs.Parser i have used are the latest from XALAN.
    Using FOP 0.20.5
    Using JAXP 1.3 i am using the validate framework for validating XMLs against XSDs.
    This is the fastest approach which i could possibly come up with for rendering XMLs into PDFs
    I am just wondering..with so many API etc available is there any accepted fastest way of Rendering PDFs through XML.
    I mean this should also take into account the rendering capability of the transformers.
    Any insights would be welcome.
    Thanks.

    Logging and Capturing?  Or Logging and TRANSFERRING?  This being P2...I'll assume the latter.  It should take about a gig a min to transfer...the same time needed to back up a card. 
    But you are L&T right from the camera...so I assume that you are not backing up the footage...just importing?  Why not back up?  That's step #1.  Unless you are backing up later.  Connected to the computer via USB or Firewire?  And the drive is connected to the computer how?  USB or Firewire?

  • Render PDF component - PDF and Acrobat version

    We are using the Render PDF component in Workbench to generate a PDF. We require the PDF to be compatible with Acrobat version 6 and higher. When we set the PDF version in the Render PDF input properties, or set a value less than 7.0.5 for Acrobat version, the PDF does not get generated. Is the Render PDF component not capable of generating PDF compatible with Acrobat versions lesser than 7.0.5?
    Thanks.

    The target version in Form Properties->Defaults is set to Acrobat or Adobe Reader 6.0.2 or later.

  • Render pdf

    Hi
    today I tried to render PDF Blob , using render:satelliteblob .I am able to render image file without any issue using render:satelliteblob
    but I'm not sure which table and what service using render for PDF in render:satelliteblob tag.
    thanks
    bala

    Hi jiri
    Thanks for your response , I tried as per your response like my code is
    <render:satelliteblob
                   blobtable='MungoBlobs'
                   blobkey='id'
                   blobwhere='1337377925212'
                   blobcol='urldata'
                   cachecontrol="never"
                   blobnocache="true"
                   container="servlet"
                   blobheader="application/pdf">
                   <render:argument name="blobheadername1" value="Custom-Header-1"/>
                   <render:argument name="blobheadervalue1" value="Custom value for header 1"/>
                   <render:argument name="blobheadername2" value="Custom-Header-2"/>
                   <render:argument name="blobheadervalue2" value="Custom value for header 2"/>
    </render:satelliteblob>
    But requested PDF is not rendering , only showing unavailable image icon .
    just for your reference , view-source of this page is :
    Click here
                   <img src="/cs/BlobServer?blobkey=id&blobnocache=true&blobwhere=1337377925212&blobheader=application%2Fpdf&blobheadername2=Custom-Header-2&blobheadername1=Custom-Header-1&blobheadervalue2=Custom+value+for+header+2&blobheadervalue1=Custom+value+for+header+1&blobcol=urldata&blobtable=MungoBlobs" rendermode="live" />
    I am not sure , when i'm rendering PDF , showing img src in view-source page .
    Thanks
    bala
    Edited by: bala6 on May 17, 2013 11:59 AM

Maybe you are looking for