When you say that you want to 'extract' the distance, you mean that you want to save the depth data in a permanent form such as a file? But you do not want to save it as text?
RealSense SDK 2.0 has the ability to save camera data in a file format called 'rosbag' and play it back.
Someone else may have a better answer, but the only alternative that I can think of is to use the Python language to write the text to a text file.
An even simpler way to capture it would be to use the Print Screen key on your keyboard to take a picture of what is on screen and then open a paint software package and Paste the captured picture into the paint software so you can save it as an image file.