Api/dev.prepfile()

From Minux Wiki
Revision as of 15:30, 7 October 2024 by Shorun (talk | contribs) (Created page with "this function is part of the dev. api and used to prepaire a file for printing in particular, this api will take each line and if it's longer then 25 characters move it to the next line, ensuring your print fits the page. this can then be fed into printfile() for printing '''usage:''' dev.prepfile(filepath) '''output:''' prints the contents of the provided file, splits it up into several pages, does NOT format the text to fit the pages, simply prints...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

this function is part of the dev. api and used to prepaire a file for printing

in particular, this api will take each line and if it's longer then 25 characters move it to the next line, ensuring your print fits the page.

this can then be fed into printfile() for printing


usage:

dev.prepfile(filepath)


output:

prints the contents of the provided file, splits it up into several pages, does NOT format the text to fit the pages, simply prints it.


example:

dev.prepfile("/test") splits the file "/test" into pages and prints them