Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
beganovich committed Sep 14, 2022
1 parent 4005288 commit e39b41f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ A simple library that lets you convert webpages or HTML into PDF files using Chr
- [Headless Chrome doesn't launch on UNIX](#headless-chrome-doesnt-launch-on-unix)
- [Comparison to Browsershot](#comparison-to-browsershot)
- [Delay loading](#delay-loading)
- [Temporary files](#temporary-files)
- [Credits](#credits)
- [Licence](#licence)

Expand Down Expand Up @@ -338,6 +339,21 @@ printing.
TLDR; If you set delay loading to 10 seconds & Ajax call takes 2 seconds to complete, PDF rendering will start
immediately after Ajax call is completed (after 2 seconds), and it won't wait 10 seconds.

### Temporary files
Starting with version 3, snappdf will automatically get rid of temporary files. If you still want to keep them, you can do it using `setKeepTemporaryFiles` method.

```php
$snappdf = new \Beganovich\Snappdf\Snappdf();

$pdf = $snappdf
->setUrl('https://github.com')
->setChromiumPath('/path/to/your/chrome')
->setKeepTemporaryFiles(true)
->generate();

file_put_contents('my.pdf', $pdf);
```

## Credits

- [David Bomba](https://github.com/turbo124)
Expand Down

0 comments on commit e39b41f

Please sign in to comment.