gotenberg-php-client icon indicating copy to clipboard operation
gotenberg-php-client copied to clipboard

How to increase waitTimeout?

Open wucherpfennig opened this issue 4 years ago • 0 comments

Hi there

I am trying to convert a rather "large" html file (lots of small images) into a PDF.

Could anybody point out how I could increase the waitTimeout?

{"message":"'waitTimeout' should be \u003c '30.000000', got '60.000000'"}

Currently I am useing this code:

        $opts=array(
            "ssl"=>array(
                "verify_peer"=>false,
                "verify_peer_name"=>false,
            ),
        );

        $resource = fopen($url, 'r', false, stream_context_create($opts));
        $stream = new Stream($resource);


        $client = new Client('http://gotenberg:3000');
        $index = DocumentFactory::makeFromStream($filename, $stream);

        $request = new HTMLRequest($index);
        $request->setPaperSize(Request::A4);
        $request->setMargins(Request::NO_MARGINS);
        $request->setScale(1);
        $request->setWaitTimeout(60);
```

BR wucherpfennig

wucherpfennig avatar May 06 '21 22:05 wucherpfennig