Hello
- Description: PRN file is a Printer Text file. The PRN is the file created using the 'print to file' option. The PRN file contains the same bytes of data that would have been sent to the selected printer had you not chosen to print to a file. This file can be printed on any printer.
- Directly print.prn files using C#.net. I hope you understand that your PRN file should be obtained for a compatible model of a printer. In case of mismatch, you can get only printer malfunction or just garbage.
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.
Whenever the program tries to use the printer function, it either hangs or gives the 'failed to open file' message.
Create a new File Integration; Set the appropriate settings under the File Detection section: Folder to Scan is your trigger file location and File Pattern is the extension to look for (set to.PRN or.ZPL, or another format) Under the Integration's Actions, remove the Print Document action and add a Shell Command action. The Windows print-to-file feature allows you to send a document to a file for future printing. When the print-to-file option is selected, you are prompted to enter a location and file name, and the file is saved with the.prn extension. This can be handy when the printer is offline or temporarily unavailable. Printing a.prn file requires the.
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:
Printer Prints To Prn 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?
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 PostIt'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:
How To Print .prn File Using C# On Mac
Other possible solutions may involve usb level programming (which I …
Jump to PostAll 5 Replies
If the network printer is selected as the default device, why not just print normally?
How To Print A Prn
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
![How How](/uploads/1/3/4/6/134687256/249412181.jpg)
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,
How To View A Prn File
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
spl2pdf.exe D:test.spl D:out.pdf
.prn File Viewer
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
pdfprint.exe -printtofile C:out.pcl -printer 'HP PCL Printer' C:input.pdf
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
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
pdfprint.exe -printer 'PDFcamp Printer' -printtofile D:downloadsout.pdf D:VeryPDF.xps
Print PDF file to XPS file:
pdfprint.exe -printer 'Microsoft XPS Document Writer' -printtofile D:downloadsout.xps D:VeryPDF.pdf
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
You will bepromted to authenticate as a user with administrative access to thecomputer to continue.After installation has completed, you will be prompted to enter alicense key. Vnc viewer for mac os x.
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.
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.
![.prn .prn](/uploads/1/3/4/6/134687256/835424459.png)
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
The printer should then print out the contents of the PRN file.
VN:F [1.9.20_1166]
VN:F [1.9.20_1166]