View Single Post
  #8  
Old January 23rd 16, 10:19 PM posted to alt.windows7.general,comp.periphs.printers,microsoft.public.windowsxp.general,alt.comp.hardware
micky
external usenet poster
 
Posts: 439
Default What extension for a print to file?

On Thu, 14 Jan 2016 10:08:14 -0500, "David H. Lipman"
wrote:

From: "Micky"

I'm not able to print to my newly installed Brother black and white
laser printer so I printed to a file instead. From Firefox.

It asks what the name of the file is, and I don't konw what extension
to give it.

Things were the same with my fully functioning Brother AIO, I don't
knolw what to name the file and the 200 page manual doesn't say a word
about that.

When I gave it a .jpg extension, it was described as damaged or
corrupted. I know it wouldn't take a bribe so it must be damaged, or
I named it wrong.

What extension for a print to file?


Standard practice is .PRN

However different printer drivers will generate different code that will be
in the PRN.

For example;
Printers using Printer Control Language ( PCL ) will be in the PCL format.
PostScript printers will be in PostScript format

The reason being whatever would have been sent for the Printer Driver is
redirected to a disk.

One could then send the file to the Printer Port
Example:

copy TEST.PRN /b LPT1:
or
copy TEST.PRN /b PRN:

When you assign an extension to a file the OS uses "File Association" to
load the file into an application, that application assumes the format of
the file is what the file extension indicates.

You can't just name any file as JPG ( JPEG -
https://en.wikipedia.org/wiki/JPEG ) because a Graphics Program that; views,
renders, alters or edits a JPEG must be given a JPEG formatted file. Disk
Files often use a header which identifies when the contents of the file is
supposed to be.
A JPEG would have JFIF in the header.
A ZIP file would have PK in the header.
A 7zip file would have 7z in the header.
A RAR file would have RAR in the header.
A Windows Executable will have MZ in the header.

If you looked at a file and in the header was "%PDF" what do you think the
file is and what program could read it ?

If you put the contents of a MS Word DOC file in a file named with the
extension JPG, th Default Graphics Program associated with the JPG extension
will say the file is corrupt because it expected a JPEG and you gave it a MS
Word document.

You can't just blindly assign a file extension to any file and think that it
will be readable.


LOL. I actually knew that, but jpg was all I could think of.

Thanks for the answer, and thanks eveyrone.

Between the Printer, NTFS and other questions... I am beginning to see a
pattern here.