wxHtmlEasyPrinting(3erl)
π wxHtmlEasyPrinting (3erl) π
From the Erlang Module Definition shelf, bestie β this is the manual page for wxHtmlEasyPrinting, and she's lowkey iconic. π
πΈ NAME πΈ
wxHtmlEasyPrinting β functions for the wxHtmlEasyPrinting class. That's the whole name vibe, periodt. π
β¨ DESCRIPTION β¨
This class is a very simple interface to the printing architecture. It lets you print HTML documents using only a few commands β it's giving "small API, big main character energy." π¨οΈβ¨
β οΈ Do NOT create this class on the stack only. You should create an instance on app startup and use that instance for all printing operations. The reason? This class stores various settings inside it. So like, she needs to stick around. π
The wxWidgets docs page is literally called wxHtmlEasyPrinting β iykyk. π¦
π§ DATA TYPES π§
wxHtmlEasyPrinting() = wx:wx_object()
That's it. That's the data type. No cap. π
π₯ EXPORTS π₯
Okay bestie, here's every single export β no skipping, no summarizing, no "oops I forgot an option." We don't do that here. π
π new()
new() -> wxHtmlEasyPrinting()
new(Options :: [Option]) -> wxHtmlEasyPrinting()
Types:
Option = {name, unicode:chardata()} | {parentWindow, wxWindow:wxWindow()}
Constructor. Classic. π
π«Ά getPrintData(This)
getPrintData(This) -> wxPrintData:wxPrintData()
Types:
This = wxHtmlEasyPrinting()
Returns a pointer to the wxPrintData instance used by this class. You can set its parameters via the SetXXXX methods β yes, literally SetXXXX, that's the source's vibe. π
π¦ getPageSetupData(This)
getPageSetupData(This) ->
wxPageSetupDialogData:wxPageSetupDialogData()
Types:
This = wxHtmlEasyPrinting()
Returns a pointer to the wxPageSetupDialogData instance used by this class. You can set its parameters via the SetXXXX methods. Same energy as above. β¨
πΈ previewFile(This, Htmlfile)
previewFile(This, Htmlfile) -> boolean()
Types:
This = wxHtmlEasyPrinting()Htmlfile = unicode:chardata()
Preview an HTML file. Returns false in case of error β call wxPrinter:getLastError/0 to get detailed information about the kind of the error. So if it fails, don't just vibe, go check the error. π
π previewText(This, Htmltext)
previewText(This, Htmltext) -> boolean()
previewText(This, Htmltext, Options :: [Option]) -> boolean()
Types:
This = wxHtmlEasyPrinting()Htmltext = unicode:chardata()Option = {basepath, unicode:chardata()}
Preview HTML text (not file!). Returns false in case of error β call wxPrinter:getLastError/0 to get detailed information about the kind of the error. Not me emphasizing not file! again, but the source literally says it. π
π printFile(This, Htmlfile)
printFile(This, Htmlfile) -> boolean()
Types:
This = wxHtmlEasyPrinting()Htmlfile = unicode:chardata()
Print an HTML file. Returns false in case of error β call wxPrinter:getLastError/0 to get detailed information about the kind of the error. π
π printText(This, Htmltext)
printText(This, Htmltext) -> boolean()
printText(This, Htmltext, Options :: [Option]) -> boolean()
Types:
This = wxHtmlEasyPrinting()Htmltext = unicode:chardata()Option = {basepath, unicode:chardata()}
Print HTML text (not file!). Returns false in case of error β call wxPrinter:getLastError/0 to get detailed information about the kind of the error. π¨οΈ
β¨ pageSetup(This)
pageSetup(This) -> ok
Types:
This = wxHtmlEasyPrinting()
Displays the page setup dialog and allows the user to modify settings. Very "let the user cook" energy. π
π setFonts(This, Normal_face, Fixed_face)
setFonts(This, Normal_face, Fixed_face) -> ok
setFonts(This, Normal_face, Fixed_face, Options :: [Option]) -> ok
Types:
This = wxHtmlEasyPrinting()Normal_face = Fixed_face = unicode:chardata()Option = {sizes, [integer()]}
Sets fonts. See wxHtmlDCRenderer::SetFonts (not implemented in wx) for detailed description β yes, that parenthetical is exactly the source tea. π«Ά
π setHeader(This, Header)
setHeader(This, Header) -> ok
setHeader(This, Header, Options :: [Option]) -> ok
Types:
This = wxHtmlEasyPrinting()Header = unicode:chardata()Option = {pg, integer()}
Set page header.
The following macros can be used inside it: (the source page doesn't list them here under setHeader β not me inventing anything, bestie π)
πΈ setFooter(This, Footer)
setFooter(This, Footer) -> ok
setFooter(This, Footer, Options :: [Option]) -> ok
Types:
This = wxHtmlEasyPrinting()Footer = unicode:chardata()Option = {pg, integer()}
Set page footer.
The following macros can be used inside it:
@DATE@β replaced by the current date in default format@PAGENUM@β replaced by page number@PAGESCNT@β replaced by total number of pages@TIME@β replaced by the current time in default format@TITLE@β replaced with the title of the document
Obsessed with a macro list that actually tells you what's up. π
π destroy(This :: wxHtmlEasyPrinting())
destroy(This :: wxHtmlEasyPrinting()) -> ok
Destroys the object. Cleanup era. Bye bestie. π«Ά
okay that's the whole page, bestie. π Made by the wxWidgets team β source/version wx 2.2.2.1, page wxHtmlEasyPrinting(3erl). The footer didn't have a date, so we're not making one up. πβ¨
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms