Convert Unicode files to monospaced PDF files
Posted: 2018-12-04T17:41:03-07:00
I would like to convert a Unicode text file to a monospaced PDF file. Examples of input and desired output: https://askubuntu.com/questions/1096615 ... 4_1096615
.
I have tried a manual approach: display half of the file onscreen, take a screen shot (.png), then display the other half onscreen and take a screen shot. Use ImageMagick to convert the two png files into one PDF file. This sort of works, but the joint between the two screen shots is a bit rough, and sometimes the font sizes of the two halves differ. And, of course, this approach does not scale to processing many files.
I have just encountered the import command of ImageMagick, and I am wondering if it can be used programmatically to solve my problem.
I have tried a manual approach: display half of the file onscreen, take a screen shot (.png), then display the other half onscreen and take a screen shot. Use ImageMagick to convert the two png files into one PDF file. This sort of works, but the joint between the two screen shots is a bit rough, and sometimes the font sizes of the two halves differ. And, of course, this approach does not scale to processing many files.
I have just encountered the import command of ImageMagick, and I am wondering if it can be used programmatically to solve my problem.