From ba7b02d8d4d2ef9a1ada2117c009a99d611ea991 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Wed, 12 Dec 2018 17:44:27 +0100 Subject: [PATCH] fixing various typos in documentation --- build/docs/02-html.md | 2 +- build/docs/04-office.md | 1 - build/docs/06-webhook.md | 10 +++------- docs/index.html | 13 ++++--------- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/build/docs/02-html.md b/build/docs/02-html.md index 676fa8e0..dccac115 100644 --- a/build/docs/02-html.md +++ b/build/docs/02-html.md @@ -273,7 +273,7 @@ func main() { c := &gotenberg.Client{Hostname: "http://localhost:3000"} req, _ := gotenberg.NewHTMLRequest("index.html") req.SetPaperSize(gotenberg.A4) - req.SetMargins(gotenberg.NormalMargins) + req.SetMargins(gotenberg.NoMargins) req.SetLandscape(true) dest := "result.pdf" c.Store(req, dest) diff --git a/build/docs/04-office.md b/build/docs/04-office.md index 546042c7..d7e52c55 100644 --- a/build/docs/04-office.md +++ b/build/docs/04-office.md @@ -119,7 +119,6 @@ $files = [ ]; $request = new OfficeRequest($files); $request->setPaperSize(Request::A4); -$request->setMargins(Request::NO_MARGINS); $request->setLandscape(true); $dirPath = "/foo"; $filename = $client->store($request, $dirPath); diff --git a/build/docs/06-webhook.md b/build/docs/06-webhook.md index 6b1e1380..ae34bbe6 100644 --- a/build/docs/06-webhook.md +++ b/build/docs/06-webhook.md @@ -28,14 +28,10 @@ import "github.com/thecodingmachine/gotenberg/pkg" func main() { c := &gotenberg.Client{Hostname: "http://localhost:3000"} - req := &gotenberg.HTMLRequest{ - IndexFilePath: "index.html", - Options: &gotenberg.HTMLOptions{ - WebHookURL: "http://myapp.com/webhook/", - }, - } + req, _ := gotenberg.NewHTMLRequest("index.html") + req.SetWebhookURL("http://myapp.com/webhook/") dest := "result.pdf" - resp, err := c.Post(req) + resp, _ := c.Post(req) } ``` diff --git a/docs/index.html b/docs/index.html index 3240a68d..41f64f99 100755 --- a/docs/index.html +++ b/docs/index.html @@ -437,7 +437,7 @@ Also, you have to set both paperWidth and paperHeight. c := &gotenberg.Client{Hostname: "http://localhost:3000"} req, _ := gotenberg.NewHTMLRequest("index.html") req.SetPaperSize(gotenberg.A4) - req.SetMargins(gotenberg.NormalMargins) + req.SetMargins(gotenberg.NoMargins) req.SetLandscape(true) dest := "result.pdf" c.Store(req, dest) @@ -679,7 +679,6 @@ Also, you have to set both paperWidth and paperHeight. ]; $request = new OfficeRequest($files); $request->setPaperSize(Request::A4); -$request->setMargins(Request::NO_MARGINS); $request->setLandscape(true); $dirPath = "/foo"; $filename = $client->store($request, $dirPath); @@ -795,14 +794,10 @@ to given URL.

func main() { c := &gotenberg.Client{Hostname: "http://localhost:3000"} - req := &gotenberg.HTMLRequest{ - IndexFilePath: "index.html", - Options: &gotenberg.HTMLOptions{ - WebHookURL: "http://myapp.com/webhook/", - }, - } + req, _ := gotenberg.NewHTMLRequest("index.html") + req.SetWebhookURL("http://myapp.com/webhook/") dest := "result.pdf" - resp, err := c.Post(req) + resp, _ := c.Post(req) }