Generate snapshots at scale, painlessly
Capturing image screenshots or PDF reports in a web app can be frustrating. We've been there.
Let us handle the heavy-lifting.
Stay in the loop
Sign up for early access or to be notified when we launch.
Built for Laravel
Creating beautiful, pixel-perfect snapshots from your Laravel app simply couldn't be easier. We'll even store the snapshots in the cloud as long as you like.
Install Composer package
composer install stechstudio/snapthis
Configure your API key
SNAPTHIS_API_KEY=[your api key]
Start taking snapshots
SnapThis::pdf('https://laravel.com');
Seriously powerful
Let's take a look at just a few of the ways you can use SnapThis.
Simple screenshot
Take a simple screenshot of a public URL, return the PNG image directly to the user.
class Controller {
public function screenshot()
{
return SnapThis::windowSize(1900, 1080)
->snapshot('https://laravel.com');
}
}
// In your controller method
return SnapThis::windowSize(1900, 1080)
->snapshot('https://laravel.com');
PDF report download
Generate a named PDF from a blade template, force it to download.
class Controller {
public function report()
{
return SnapThis::name('Summary Report.pdf')
->view('reports.users.summary')
->pdf()->download();
}
}
// In your controller method
return SnapThis::name('Summary Report.pdf')
->view('reports.users.summary')
->pdf()->download();
Email attachment
Include the PDF data as an email message attachment.
class OrderConfirmation extends Mailable {
public function build()
{
$pdf = SnapThis::route('order-receipt')->pdf();
return $this->from('example@example.com')
->view('emails.orders.confirmation')
->attachData($pdf->contents, "Receipt.pdf", [
'mime' => 'application/pdf'
]);
}
}
// In your mailable
return $this->from('example@example.com')
->view('emails.orders.confirmation')
->attachData($pdf->contents,
"Receipt.pdf",
['mime' => 'application/pdf']
);
... and so much more.
You get tremendous control over the snapshot process and result.
Window size
Print margins
Page background
Network idle
Header & footer content
Paper size
Orientation
Window size
Custom headers
HTTP authentication
Resize snapshot
Device emulation
CSS media selection
Cloud storage
Stay in the loop
Sign up for early access or to be notified when we launch.