printer.endPage

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function printer.endPage
Ends and prints the page to the output tray. Returns true if page was ended, false if not.

This function will return false if there is no place to print the page or if there is no page started.
Syntax printer.endPage()
Returns boolean was the page printed?
Part of ComputerCraft
API printer

Examples

Grid paper.png  Example
Prints out the current page.
Code
local printer = peripheral.wrap("left")

printer.newPage()
printer.write("Hello")

if printer.endPage() then
  print("Page was printed successfully!")
else
  error("Could not print page.")
end
Output Prints whether or not the printer was able to print the page.
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox