On 7/9/25 11:00, Galen Seitz wrote:
> Hi,
>
> I often create a pdf of sdiff output using a command like this:
>
> sdiff -w100 old new | enscript -o sdiff.pdf
>
> This works okay, but the resulting pdf is not searchable.  Can someone
> suggest an alternative that will properly scale the wide output (-w100)
> to a letter size pdf, yet retain the ability to search for text strings?
>
Hello Galen,


If you have a CUPS installed, you can print text file to pdf. This pdf 
will be text searchable.  At least using okular pdf reader.

https://www.cups.org/doc/options.html

You can apply paper size etc to the CLI lp/lpr.  I just tested the GUI 
print version Xfce mousepad.

This converts a text to pdf that okular can search:

enscript --output=- bond_movies.txt | ps2pdf - bond_movies.pdf


More ideas here:

https://www.baeldung.com/linux/convert-text-to-pdf

As always,  YMMV.

-Ed


Reply via email to