phantomjsscreenshot

package module
v0.0.0-...-c763ac7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

README

phantomjsscreenshot

Build Status GoDoc Go Report Card

A wrapper for phantom.js commands for headless screenshots.

Documentation

Index

Constants

View Source
const EncodingField = "data:image/jpeg;base64,"

EncodingField tells the browser what we've encoded and how to decode it

Variables

This section is empty.

Functions

func GrabScreenshot

func GrabScreenshot(link string, width int, height int) (string, error)

GrabScreenshot returns a link to a screenshot for retrieval on localhost and and errors encountered along the way with the calling application returns fileloc, command output, error. The link will not always resolve given a protocol, e.g. http:// but more testing is needed to demonstrate this on multiple systems. If width and height are set to -1 then no resize happens on the way out of this function.

func Hello

func Hello() bool

Hello enables the calling agent to determine whether the webshot service has been setup correctly. If it returns false then we can configure the agent to not call screenshots every time. It may help to reduce the setup overhead for folks wishing to run this service for themselves.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL