diff --git a/build/base/Dockerfile b/build/base/Dockerfile index 8f00244c..4d11b724 100644 --- a/build/base/Dockerfile +++ b/build/base/Dockerfile @@ -31,7 +31,7 @@ RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - &&\ COPY --from=hack /usr/bin/pm2 /usr/bin/pm2 COPY --from=hack /usr/share/pm2 /usr/share/pm2 -COPY --from=hack /etc/default/pm2 /usr/default/pm2 +COPY --from=hack /etc/default/pm2 /etc/default/pm2 COPY --from=hack /etc/systemd/system/pm2.service /etc/systemd/system/pm2.service # |-------------------------------------------------------------------------- diff --git a/build/docs/content/04-office.md b/build/docs/content/04-office.md index 55b26857..8adcab3b 100644 --- a/build/docs/content/04-office.md +++ b/build/docs/content/04-office.md @@ -69,14 +69,11 @@ $dirPath = "/foo"; $filename = $client->store($request, $dirPath); ``` -## Paper size and orientation +## Orientation You may also customize the resulting PDF format. -By default, it will be rendered with `A4` size and `portrait` orientation. - -> Paper size has to be provided in `inches`. -> Also, you have to set both `paperWidth` and `paperHeight`. +By default, it will be rendered `portrait` orientation. ### cURL @@ -85,8 +82,6 @@ $ curl --request POST \ --url http://localhost:3000/convert/office \ --header 'Content-Type: multipart/form-data' \ --form files=@document.docx \ - --form paperWidth=8.27 \ - --form paperHeight=11.27 \ --form landscape=true \ -o result.pdf ``` @@ -99,7 +94,6 @@ import "github.com/thecodingmachine/gotenberg/pkg" func main() { c := &gotenberg.Client{Hostname: "http://localhost:3000"} req, _ := gotenberg.NewOfficeRequest([]string{"document.docx"}) - req.SetPaperSize(gotenberg.A4) req.SetLandscape(true) dest := "result.pdf" c.Store(req, dest) @@ -118,7 +112,6 @@ $files = [ DocumentFactory::makeFromPath('document.docx', 'document.docx'), ]; $request = new OfficeRequest($files); -$request->setPaperSize(Request::A4); $request->setLandscape(true); $dirPath = "/foo"; $filename = $client->store($request, $dirPath); diff --git a/docs/index.html b/docs/index.html index 1023b08b..87abfb1c 100755 --- a/docs/index.html +++ b/docs/index.html @@ -637,20 +637,15 @@ $dirPath = "/foo"; $filename = $client->store($request, $dirPath); -
You may also customize the resulting PDF format.
-By default, it will be rendered with A4 size and portrait orientation.
By default, it will be rendered portrait orientation.
-- -Paper size has to be provided in
-inches. -Also, you have to set bothpaperWidthandpaperHeight.
paperWidth and paperHeight.
--url http://localhost:3000/convert/office \
--header 'Content-Type: multipart/form-data' \
--form files=@document.docx \
- --form paperWidth=8.27 \
- --form paperHeight=11.27 \
--form landscape=true \
-o result.pdf
-paperWidth and paperHeight.
func main() {
c := &gotenberg.Client{Hostname: "http://localhost:3000"}
req, _ := gotenberg.NewOfficeRequest([]string{"document.docx"})
- req.SetPaperSize(gotenberg.A4)
req.SetLandscape(true)
dest := "result.pdf"
c.Store(req, dest)
}
-