Search on Image/flash

Discussion in 'Programming' started by varun8211, May 11, 2007.

  1. #1
    varun8211, May 11, 2007 IP
  2. Aztral

    Aztral Well-Known Member

    Messages:
    344
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    125
    #2
    I'm guessing this Flash object is not yours?
     
    Aztral, May 17, 2007 IP
  3. varun8211

    varun8211 Peon

    Messages:
    483
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, This is our flash object. we have created it..
     
    varun8211, May 17, 2007 IP
  4. wassim

    wassim Well-Known Member

    Messages:
    322
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    110
    #4
    Hi,

    you can't highlight it (if it's not text) unless you have some sort of coordinates of that word. I am sure you have such a thing since you are able to find the page where the word shows up, however having the location of that word in the page is a different story...

    If it were normal text, I would've done it in not more than three minutes.

    Please provide me with more details, I might be able to help more.
     
    wassim, May 17, 2007 IP
  5. varun8211

    varun8211 Peon

    Messages:
    483
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks so much for the reply and the interest.

    I am able to find the page where the search keyword occurs becoz, I have all the articles in the text version so I can search from the DB. But I don't know how to highlight the keyword on the flash ? I also thought, I would need some kind of coordinates. but not sure how can I do that ?

    Is it possible to search the keyword in the PDF file and find the location (coordinate) of that word in PDF, becoz it would be same as in JPEG image in flash magazine. isn't it ?
     
    varun8211, May 17, 2007 IP
  6. wassim

    wassim Well-Known Member

    Messages:
    322
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Hi, you're welcome.

    So I understand you're generating the jpegs dynamically from pdf version and feeding them to the flash interface. I don't know if there's an API to determine a specific word coordinates in the pdf, never seen one, basically the search function returns the index of the search item and the id of the text element containing it.

    If you can translate these into x and y coordinates of where the word begins, and the width of that word (changes depending on the font used, font size, bold or not etc....) your problem is solved.
     
    wassim, May 17, 2007 IP