From cb21e53f4d957c855fe475ffb0e3b515f9d9f9d0 Mon Sep 17 00:00:00 2001 From: luabagg Date: Wed, 14 Aug 2024 17:08:16 -0300 Subject: [PATCH] fix: readme documentation. --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f5017e2..5970f46 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,10 @@ Then you can import it in your Go code: ## Usage Example -The package comes with examples that demonstrate the usage of the various functions and features provided by Orcgen. -It's the way-to-go if you're trying to use this package for the first time. - ```go import "github.com/luabagg/orcgen" + // Webpage conversion orcgen.Generate( "https://www.github.com", proto.PageCaptureScreenshot{ @@ -54,9 +52,22 @@ It's the way-to-go if you're trying to use this package for the first time. }, "github.webp", ) + + // HTML conversion + orcgen.Generate( + []byte("my html"), + proto.PagePrintToPDF{ + Landscape: true, + PrintBackground: true, + PreferCSSPageSize: true, + }, + "html.pdf", + ) ``` -You can more in [examples_test.go](https://github.com/luabagg/orcgen/tree/main/examples_test.go) page. +The package comes with examples that demonstrate the usage of the various functions and features provided by Orcgen. It's the way-to-go if you're trying to use this package for the first time. + +You can see more in [examples_test.go](https://github.com/luabagg/orcgen/tree/main/examples_test.go) page. ## Contributors