Download the PHP package beetpix/silverstripe-screenshot without Composer

On this page you can find all versions of the php package beetpix/silverstripe-screenshot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package silverstripe-screenshot

Silverstripe Screenshot Module

Build Status

Simple SDK with helpers to screenshot websites and save or download to PDF or JPEG via printscreenapi.com

There's a free plan which is perfect for small projects and allows for 100 fresh screenshots per month with unlimited access to cached images and PDFs.

Requirements

Installation

Via composer

  • Run composer require beetpix/silverstripe-screenshot
  • Run /dev/build in your browser Manually
  • Download and extract files into printscreenapi/ in your project's root folder
  • Run /dev/build in your browser

Configure API key

Add your API key via YAML or environment file:

YAML

Environment (.env)

Example usage

Get image screenshot URL:

Download as PDF:

Additional options, flush cache and read raw result:

Available methods

For detailed explanation about each parameter, please check out the the documentation at: https://printscreenapi.com/api/

Method Parameters Description API parameter
getImage string $target = null Return screenshot image URL -
getPDF string $target = null Return screenshot PDF URL -
downloadPDF string $target = null, string $filename = null Download PDF -
downloadImage string $target = null, string $filename = null Download image -
width int $value Viewport width width
height int $value Viewport height height
scrollTo string $value Scroll to element scrollto
click string $value Click on element click
flush - Force fresh screenshot flush
fullPage - Take a full page screenshot fullpage
crop int $x, int $y, int $width, int $height Crop selected area in pixels crop
device string $value Set device (default is "desktop") device
element string $value Screenshot only specified element element
paperSize string $value Paper size for PDF (default is "A4") size
delay int $value Delay in seconds between page loaded and screenshot action delay
cookies array $value Set page cookies cookies
headers array $value Set page headers headers
geolocation float $lat, float $lng Set geolocation coordinates geolocation
disableJS - Disable javascript disablejs
agent string $value Set browser agent agent
injectJS string $value Inject javascript into the page injectjs
injectCSS string $value Inject CSS into the page injectcss
proxy string $value Proxy host and port proxy
getResult - Return raw API result -
isError - Return TRUE if API call was unsuccessful -

Note

Since the API call may take a few extra seconds to complete depending on the parameters you set (eg. delay or fullPage) it is recommended that you make calls via AJAX if adding screenshot functionality that requires user interaction via web browser to prevent timeouts.

License


All versions of silverstripe-screenshot with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ~4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package beetpix/silverstripe-screenshot contains the following files

Loading the files please wait ....