Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
starwalkn authored Oct 31, 2024
1 parent 6772e3c commit 64edfad
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,23 @@ import (
)

func main() {
client, err := gotenberg.NewClient("localhost:3000", http.DefaultClient)
client, err := gotenberg.NewClient("localhost:3000", http.DefaultClient)

// Prepare the files required for your conversion.
doc, err := document.FromPath("filename.ext", "/path/to/file")
req := gotenberg.NewReadMetadataRequest(doc)
// Prepare the files required for your conversion.
doc, err := document.FromPath("filename.ext", "/path/to/file")
req := gotenberg.NewReadMetadataRequest(doc)

resp, err := client.Send(context.Background(), req)
resp, err := client.Send(context.Background(), req)

var data = struct {
var data = struct {
FooPdf struct {
Author string `json:"Author"`
Copyright string `json:"Copyright"`
} `json:"foo.pdf"`
}

// Decode metadata into a struct.
err = json.NewDecoder(resp.Body).Decode(&data)
// Decode metadata into a struct.
err = json.NewDecoder(resp.Body).Decode(&data)
}

```
Expand Down

0 comments on commit 64edfad

Please sign in to comment.