Skip to content

Commit

Permalink
fix: readme documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
luabagg committed Aug 14, 2024
1 parent 0a0e2e1 commit cb21e53
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,33 @@ 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{
Format: proto.PageCaptureScreenshotFormatWebp,
},
"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

Expand Down

0 comments on commit cb21e53

Please sign in to comment.