Printing to file in Linux WINE

I noticed that this post has been sitting as a draft since 2011. At this point I have no idea if it’s useful or what I was even doing, but I might as well make it public in case someone can find it helpful!

So I’ve been trying to get one of those PDF print drivers working in WINE without success. I then came upon a process that might work. When printing you need to select the checkbox “Print to file” that creates a .prn file.

I was using a program that only has printing facilities, but I want to export around 100 pages of text and images.

Once you have the .prn (postscript) file, you can do any number of things to it.

In my case I want the postscript file to be converted to HTML. I am also considering PDF format because that has more conversion options to eventually get me to HTML or plain text.

sudo apt-get install cups-pdf


Or it looks like that package might have changed to this…

sudo apt-get install printer-driver-cups-pdf


Where PDFs would be generated in /home/[user]/PDF.

Also…

A sample command for ps2pdf would look like:

ps2pdf in.ps out.pdf


Once I had a PDF created, I can use something like the open source project called PDFTOHTML: http://pdftohtml.sourceforge.net/

If the print to file isn’t working for you, try running this command:

sudo cp /usr/share/wine/generic.ppd /usr/share/cups/model/generic.ppd


That should copy over the WINE print driver for the cups printing system.

Again, I don’t know if this works but at least it could potentially help direct someone toward a solution.