Printing to a file

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

When you create a PrintDocument you could set the
PrinterSettings.PrintToFile to true so that it print to a file.
What kind of format is it printed to?

I have created such a file but I don't know what to do with it.....
 
Lloyd,

I believe the format depends on your printer driver. I also believe that you
can send this file to your printer and the printer will print the document.
 
If you look around the web you can find loads of printer drivers that will
write you a PDF file.
 
The file just contains what would have been sent to the printer. You can
copy this kind of file to a printer that recognize this same format
(basically PCL, Postcript).

The real question is why are you printing to a file. Do you have a
particular goal in mind ?
 
Because on my print panel, I was thinking what to show if there are no
printer?
So what I do is: 1st choice is "Print to File"
other choices are "Print to a given (installed) printer"

I guess now it's not a good idea.....

--
Regards,
Lloyd Dupont

NovaMind development team
NovaMind Software
Mind Mapping Software
<www.nova-mind.com>
 
Strange. What do you mean by no printer ? No printer at all or no default
printer ? In the later case you could display a message.

Wether the final output is send to a file or to a printer, this is always
the driver that creates the output from the calls made to it. If you have
really no printer at all, you souln't even be able to print. Have you try to
see if the file is empty ?
 
Well at home I have no printe (although I have installed one a while ago,
which still appears in the printer list, there is no physical printer).
Now I wanted to test my code at home and, at least, get a print preview.
I though clever, in the printer list combo box, to have a first choice being
no printer, i.e. print to a file, whatever that means.

Only know I understand than printing to a file, makes only sense when you've
got a printer and, on top of that, is next to useless....
 
Ah ok !

So from the OS point of view, you have a printer (if the driver is there
it's enough) and you can then create the file. If you have a printer at your
work or elsewhere, you could install the same printer driver on your
computer. This way you'll create a print file and if you copy this print
file to this same (real) printer it will print out. This is how you could
use a print file but my guess is that i't very rarely used...

Patrice
 
Back
Top