Menu

Tree [e52ce0] master /
 History

HTTPS access


File Date Author Commit
 font 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 fpdf 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 test 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 .gitignore 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 LICENSE 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 README.md 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 codes.def 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 file_monitor.py 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push
 prn2pdf.py 2020-03-28 Sergej Srepfler Sergej Srepfler [e52ce0] Initial push

Read Me

pyPrn2Pdf: Convert DOS printer file to PDF in Python

Convert output from legacy DOS program originally written for dot-matrix printer to PDF
using excellent PyFPDF library.

For further information on PyFPDF library (doing all the work), see the project site:
https://github.com/reingart/pyfpdf or the old Google Code project page
https://code.google.com/p/pyfpdf/.

I needed to convert prn file from old DOS program to PDF, so I wrote this tool.
Similar tools do exist, but, I needed some extra features:
* support for UTF-8
* Extra handling of some ancient 7-bit standard
* You do not need to be root/admin to install & use
* Free (no limitations)
* Should work on Linux/Windows

Installation Instructions:

Simply extract and you are ready to go.
All library files and fonts are already included.

To get the latest development version you can download the source code from:

https://sourceforge.net/p/pyprn2pdf/code/ref/master/

You can also install PyPrn2PDF from archive

Fonts:

Included are some free UTF-8 TTF fonts from PyFPDF library.
To use different font (e.g. Courier New found somewhere on my windows machine)
Copy font into font folder and modify program to use it:
In class Page, in reset function, change font name
class Page:
...
def reset(self):
self.fontName = 'CourierNew'

In processFile function change font details
def processFile(infile, outfile, cfgfile):
...
pdf.add_font('CourierNew', '', 'font/cour.ttf', uni=True)
pdf.add_font('CourierNew', 'B', 'font/courbd.ttf', uni=True)
pdf.add_font('CourierNew', 'BI', 'font/courbi.ttf', uni=True)
pdf.add_font('CourierNew', 'I', 'font/couri.ttf', uni=True)