O
O
openkazan2018-03-03 10:39:46
linux
openkazan, 2018-03-03 10:39:46

How to take a screenshot of a text file in Linux?

The program in its work outputs data to a text file (tables framed by |, _, and -.)
You need to create screenshots of these text files, but not manually.
Automation is not a problem, but how to run what and how from a script so that some software (a la ImageMagick) creates a screenshot of the file that is fed to it?
Well, the second question (I think from the realm of fantasy :): is it possible to make the screenshot automatically select the table area and not include empty areas around the table in the screenshot?
PS: OS - Ubuntu

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AVKor, 2018-03-03
@openkazan

Path: text file -> [PS] -> [EPS] -> PDF -> [cropped PDF] -> [whatever format you like, say PNG].
There are different solutions for each step. For example, PS can be obtained using a2ps. Or directly to PDF via pseudo-PDF printer in CUPS. For other steps there are all sorts of utilities like ps2eps, epstopdf, epspdf, pdfcrop...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question