Skip to content

Commit

Permalink
chore(README): better examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gulien committed Nov 5, 2024
1 parent 1f97497 commit b3f4d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ use Gotenberg\Gotenberg;
Gotenberg::chromium($apiUrl)
->pdf() // Or screenshot().
->singlePage() // Optional.
->skipNetworkIdleEvent() // Optional.
->url('https://my.url'));
```

Expand All @@ -122,7 +121,8 @@ Gotenberg::libreOffice($apiUrl)
// Alternatively, you may also set the content directly.
Gotenberg::chromium($apiUrl)
->pdf()
->html(Stream::string('index.html', '<html><body><p>Hello, world!</p></body></html>'));
->assets(Stream::string('style.css', 'body{font-family: Arial, Helvetica, sans-serif;}'))
->html(Stream::string('index.html', '<html><head><link rel="stylesheet" type="text/css" href="style.css"></head><body><p>Hello, world!</p></body></html>'));

// Or create your stream from scratch.
Gotenberg::libreOffice($apiUrl)
Expand Down

0 comments on commit b3f4d08

Please sign in to comment.