Printer
This article is a stub. You can help the wiki by expanding it. |
Printer | |
---|---|
| |
Name | Printer |
Source Mod | ComputerCraft |
ID Name | Unknown |
Type | IO Device |
Stackable | Yes (64) |
The Printer is a device in ComputerCraft that allows printing of paper using ink and Paper.
To use the printer you must place it on one of the 6 sides of the Computer (top, bottom, left, right, front, and back) and then turn on the computer. Place any color of ink in the single left slot and paper in any of the top slots.
The Printer is capable of printing from the edit program on a Computer. Open the program by typing "edit filename". Once the text has been entered, press ctrl, navigate to print and press enter. The Printer will show a prompt if there is no ink or paper in the printer.
The loading and unloading of Printers can be automated using pipes. Blank Paper can be input into the top of the printer, ink is input into the back or sides and the printed paper can be retrieved from the front or bottom.
Recipe[edit]
Printer API[edit]
Using the Peripheral (API) programs can use the Printer for various functions. In order to use these functions the printer must first be wrapped using peripheral.wrap().
Function | Return Value | Description |
---|---|---|
printer.getPaperLevel() | number paperAmount | Returns the amount of blank paper left in the paper tray. |
printer.newPage() | boolean success | Starts a new page. Returns true if it was started, false if not. |
printer.endPage() | boolean success | Ends the current page and prints it to the output tray. Returns true if the page was ended, false if not. |
printer.write(string text) | nill | Writes the specified text to the page and the current cursor position. |
printer.setPageTitle(string title) | nil | Sets the title of the page. |
printer.getInkLevel() | number inkLevel | Returns the amount of ink in the ink slot. |
printer.getCursorPos() | number x, number y | Returns the position of the cursor on the page. |
printer.setCursorPos(number x, number y) | nil | Sets the cursor position on the page. |
printer.getPageSize() | number width, number height | Returns the size of the page. |
|