2017 © Pedro Peláez
 

library browsershot

Convert a webpage to an image from spatie

image

secomapp/browsershot

Convert a webpage to an image from spatie

  • Friday, November 13, 2015
  • by cuongnhc
  • Repository
  • 2 Watchers
  • 0 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 142 Forks
  • 0 Open issues
  • 14 Versions
  • 8 % Grown

The README.md

Convert a webpage to an image

Latest Version Software License Build Status Total Downloads, (*1)

The package can convert a webpage to an image. To accomplish this conversion Phantomjs (included in the project) is used., (*2)

This package is used to generate the sitepreviews on the homepage of spatie.be. It is also used by Gordon Murray to add previews to shared content., (*3)

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website., (*4)

Installation

This package can be installed through Composer., (*5)

composer require secomapp/browsershot

When using Laravel there is a service provider that you can make use of., (*6)


// app/config/app.php 'providers' => [ '...', 'Spatie\Browsershot\BrowsershotServiceProvider' ];

Please note that the provided binary is intented for use on Ubuntu., (*7)

Usage

Here is a sample call to create an image of a webpage:, (*8)

    $browsershot = new Spatie\Browsershot\Browsershot();
    $browsershot
        ->setURL('http://www.arstechnica.com')
        ->setWidth('1024')
        ->setHeight('768')
        ->save('targetdirectory/arstechnica-browsershot.jpg');

These methods are provided:, (*9)

  • setBinPath(): Specify the path to your own phantomjs-binary.
  • setWidth(): Set the width of the image (defaults to 640).
  • setHeight(): Set the height of the image (defaults to 480).
  • setHeightToRenderWholePage(): Calling this method will result in the entire webpage being rendered.
  • setURL(): Set the URL of the webpage which should be converted to an image
  • save($targetFile): Starts the conversion-process. The targetfile should have one of these extensions: png, jpg, jpeg.

Other implementations

Contributing

Please see CONTRIBUTING for details., (*10)

Security

If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker., (*11)

Credits

About Spatie

Spatie is a webdesign agency in Antwerp, Belgium. You'll find an overview of all our open source projects on our website., (*12)

License

The MIT License (MIT). Please see License File for more information., (*13)

The Versions

13/11 2015

dev-master

9999999-dev https://github.com/secomapp/browsershot

Convert a webpage to an image from spatie

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

13/11 2015

1.2.5

1.2.5.0 https://github.com/secomapp/browsershot

Convert a webpage to an image from spatie

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

12/11 2015

dev-quality

dev-quality https://github.com/spatie/browsershot

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

23/08 2015

1.2.4

1.2.4.0 https://github.com/spatie/browsershot

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

25/05 2015

1.2.3

1.2.3.0 https://github.com/spatie/browsershot

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

22/05 2015

1.2.2

1.2.2.0 https://github.com/spatie/browsershot

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

13/05 2015

1.2.1

1.2.1.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

11/05 2015

1.2.0

1.2.0.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

03/02 2015

1.1.0

1.1.0.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

16/01 2015

1.0.0

1.0.0.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

29/12 2014

0.1.3

0.1.3.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

22/06 2014

0.1.2

0.1.2.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

03/05 2014

0.1.1

0.1.1.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage

02/05 2014

0.1.0

0.1.0.0

Convert a webpage to an image

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image convert browser phantomjs screenshot webpage