ASCII files are used for different purposes, but pretty much all of them are text files, so they can be handled like any other text file or document and thus exported or printed as PDF document.
This is usually achieved either using a dedicated PDF export or through the print function and virtual PDF printer installed. Some dedicated file converters may also support the conversion of ASCII format to PDF.