Documentation
¶
Overview ¶
orcgen generates files from HTML - any static webpage can be informed, or even an HTML file. The file will be generated according the choosen extension.
Index ¶
Constants ¶
const ( // PDF const. PDF = internal.PDF // PNG const. PNG = internal.PNG // JPEG const. JPEG = internal.JPEG )
Valid extension types constants.
Variables ¶
This section is empty.
Functions ¶
func ConvertHTML ¶ added in v1.0.1
ConvertWebpage converts the informed bytes to the ext format, and saves the file.
ext is the extension to be converted to (use the defined constants above). html is the html byte array (if it's a filepath, use os.ReadFile(filepath)). output is a filepath containing the extension.
The connection is automatically closed.
func ConvertWebpage ¶ added in v1.0.1
ConvertWebpage converts the url to the ext format, and saves the file.
ext is the extension to be converted to (use the defined constants above). url is the url to convert. output is a filepath containing the extension.
The connection is automatically closed.
func New ¶
New starts a new Director - the Director contains the available methods for file conversion.
ext is the extension to be converted to (use the defined constants above).
Connect and Close are used for the Browser connection control. ConvertWebpage and ConvertHTML are used for page conversion.
There are a set of setters for specific config.
Types ¶
This section is empty.