Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: X Windows Query

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    X Windows Query

    Is it possible to write a program such that it can capture the data from an X Client to X server and extract only the Text data inside it ?

  2. #2
    The short answer is yes.

    There are programs that exist that will capture text from various X clients depending on what they are. For example if you want the text from a browser window open at some you could use lynx to extract the text with:
    lynx -dump >
    or if the site has frames, elinks handles them better:
    elinks -dump >
    Both of these commands create the text file which has only text and can be opened in a text editor. They can extract text from any html file.

    If the window you want the text from is a pdf file then you can use:
    pdftotext somefile.pdf
    which will produce a file called somefile.txt which should just have the text of the pdf file.

    I suppose it depends on what format the window is as to how you extract the text.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts