How To Print .prn File Using C%23

Posted on by

Specify the output to print by handling the PrintPage event and by using the Graphics included in the PrintPageEventArgs. Use the PrinterSettings.PrinterName property to specify which printer should print the document. The Print method prints the document without using a print dialog. When you print to a file the program outputs whatever it would have sent to the printer you have attached to your computer to a file instead. The idea is that later you might want to send this file to a similar printer on a different computer. So, the main use for a.PRN file is to copy it to a printer in order to get the output. You can open a.PRN file. In a previous video, we've seen how to print PRN and PDF files with user intervention, by 'drag and drop' them on the Printfil's icon or by the Command Line. Printfil 5.24, released on Feb 2019, introduced a new PCL graphics engine, to print HP-PCL data and files (even to non-PCL capable printers, including PDF printers), and additional parameters to the Command Prompt to print files PRN, PDF.

Print Prn File To Pdf

A PRN file is a type of file that can be read by printers. It’s basically a generic output file that printers can understand. Sometimes you will end up with one of these files and need to print it.

You used to be able to print these files to your local printer by using the command COPY /B C:FILENAME.PRN LPT1:. These days, printers are not attached to LPT1 anymore. USB cables are used instead. So you have to use the network method in order to print the file. Here’s how to do this in Windows.

Option 1 – Using Software

If you need to print the PRN file to Windows Printer or other formats, such as PDF, EPS, PS, XPS, PCL, EMF, etc. formats, you can use following two software to finish this work,

1. You can use VeryPDF SPL to PDF Converter Command Line to convert from PRN files to PDF files first,

spl2pdf.exe D:test.prn D:out.pdf
spl2pdf.exe D:test.spl D:out.pdf

2. You can use VeryPDF PDFPrint Command Line to print PDF files to Windows Printer,

pdfprint.exe D:test.pdf
pdfprint.exe -printtofile C:out.pcl -printer 'HP PCL Printer' C:input.pdf

UsingHow to print .prn file using c# word

Print XPS file to PDF, PCL, XPS and other formats:
pdfprint.exe D:VeryPDF.xps
pdfprint.exe -printtofile D:downloadsout.spl D:VeryPDF.xps
pdfprint.exe -printer 'VeryPDF Postscript Writer' -printtofile D:downloadsout.ps D:VeryPDF.xps
pdfprint.exe -printer 'Adobe PDF' -printtofile D:downloadsout.pdf D:VeryPDF.xps
pdfprint.exe -printer 'VeryPDF PCL Writer' -printtofile D:downloadsout.pcl D:VeryPDF.xps
pdfprint.exe -printer 'Microsoft XPS Document Writer' -printtofile D:downloadsout.xps D:VeryPDF.xps
pdfprint.exe -printer 'docPrint' -printtofile D:downloadsout.emf D:VeryPDF.xps

Print XPS file to PDF file:
pdfprint.exe -printer 'PDFcamp Printer' -printtofile D:downloadsout.pdf D:VeryPDF.xps

File

Print PDF file to XPS file:
pdfprint.exe -printer 'Microsoft XPS Document Writer' -printtofile D:downloadsout.xps D:VeryPDF.pdf

With above two products, you can print PRN, SPL, PDF, EPS, PS, Image, etc. formats to Windows Printer and other formats easily.

Option 2 – Using Commands in Windows

1. Share the printer on the network. If the printer you are using is already on a network such as your company network, skip this step.

How to print .prn file using c 238

2. Now we have to find the network path to your printer. If the printer you wish to print to is a company shared network printer that is not attached to your computer, it should have the server name and printer name under your list of Printers. It will say something like printername on PrintServer or LaserJet on PrintServer. So the path to these printers would be PrintServerprintername and PrintServerLaserJet respectively.

3. If the printer is attached to your PC, the path will be the computer name and then the name of the printer. You can find your computer name by right-clicking My Computer and selecting Properties under the Computer Name tab. The name of the printer can be found under Printers in Windows by right clicking on the printer and selecting Properties. The printername is in the top field. So if my computer name is TP123 and the printer name is LaserJet, the path would be TP123LaserJet.

4. Armed with this information, we can then go to Start > Run and use this command to copy the file to the printer. This command assumes the PRN file is located on the root of the C drive:

COPY /B C:FILENAME.PRN TP123LaserJet

How To Print A Prn

The printer should then print out the contents of the PRN file.

VN:F [1.9.20_1166]
VN:F [1.9.20_1166]

Related Posts

Hello

I have been trying to make a function that can send the output data or any text to a network printer, I read many articles/posts about it but nothing is working, have been looking for almost a week..
Whenever the program tries to use the printer function, it either hangs or gives the 'failed to open file' message.

It would be really appreciated if someone can give me a hand here, oh and the OS I'm using is Windows XP. and I would prefer if I didn't have to use the MFC or the Windows API if possible, but if this is the only way then it's OK.

Here is a sample of the code that I tried:

File
  • 2 Contributors
  • forum5 Replies
  • 1,251 Views
  • 3 Days Discussion Span
  • commentLatest PostLatest Postby SearchDS

Recommended Answers

If the network printer is selected as the default device, why not just print normally?

How To Print Prn Files

Printing (as far as I know using win32 api, which I know you don't want to use) involves the evokation of a standard dialogue box in which the use gets to choose the printing …

Jump to Post

It's 1:12am and I am wicked tired, but here is a link that will give you an overview of what you are about to get into if you choose to pursue the win32 api route:

Other possible solutions may involve usb level programming (which I …

Jump to Post

All 5 Replies

If the network printer is selected as the default device, why not just print normally? How to delete voicemod on pc.

Printing (as far as I know using win32 api, which I know you don't want to use) involves the evokation of a standard dialogue box in which the use gets to choose the printing device as well as many other attributes.

Editedby Clinton Portis because:n/a