printer.endPage

From ComputerCraft Wiki
Revision as of 18:00, 9 April 2014 by MKlegoman357 (Talk | contribs) (Expanded)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.