For the needs of a project, i want to print over the LPT1 in specific locations, this will print a document in a dot matrix printer where i should print values in the places they should go. I really hate going back, and i don't have any idea where to start. Internet has no specific information about printing in LPT port with C# and especially how to send the values in specific locations while printing. Is there any good example? tutorial for this? would be a life savior.
相关问题
- WCF Web Service: Upload a file, Process that file,
- How to print C# 3D jagged array
- How to hide the scroll bar and with the content ra
- When printing, Firefox cuts off/crops images if th
- C++: Deleting a printer queue
相关文章
- Print background image on every page once
- Python: print in two columns
- Rounding decimals in nested data structures in Pyt
- How to control print font size
- .NET - how to make a class such that only one othe
- C++, ternary operator, std::cout
- Alternative for page-break-inside: avoid
- How to set div height to 100% of chosen print pape
Doesn't the printer in question have a windows print driver? If so, it doesn't matter that it is printing over LPT1 or not, it is just using the standard Print stuff.
Similar question: Dot Matrix printing in C#?
I could suggest one thing to make your life easier, install a generic text printer driver (this comes as standard) and set that to the LPT1 port. Then you can simply open 'LPT1' and send escape code sequences to specify font type (bold/italic), emphasized, font pitch etc. I don't know if the resources would be required. But I would imagine it would be something like this:
Resources:
Edited @ 2017-07-12: Updated the Parallel Port link to use the Wayback Archive Machine.
If your printer has drivers for Windows, then you can use standard printing techniques. See Petzold's book Programming Microsoft Windows with C# for a good intro.