Documentation ¶
Index ¶
Constants ¶
const DefaultFromSurface = true
DefaultFromSurface Capture the screenshot from the surface, rather than the view. Defaults to true.
const DefaultQuality = 0
DefaultQuality Compression quality from range [0..100] (jpeg only).
const DefaultViewportHeight = 996
DefaultViewportHeight Rectangle height in device independent pixels (dip).
const DefaultViewportScale = 1
DefaultViewportScale Page scale factor.
const DefaultViewportWidth = 996
DefaultViewportWidth Rectangle width in device independent pixels (dip).
const DefaultViewportX = 0
DefaultViewportX Capture the screenshot of a given region only. X offset in device independent pixels (dip).
const DefaultViewportY = 0
DefaultViewportY Y offset in device independent pixels (dip).
const DefaultWaitingTime = 0
DefaultWaitingTime Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond
const FormatPng = page.CaptureScreenshotFormatPng
FormatPng Image compression format (defaults to png).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonRequestDTO ¶
type ConvertConfig ¶
type DoctronConfig ¶
type Html2ImageParams ¶
type Html2ImageParams struct { page.CaptureScreenshotParams CustomClip bool WaitingTime int // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond }
func NewDefaultHtml2ImageParams ¶
func NewDefaultHtml2ImageParams() Html2ImageParams
NewDefaultHtml2ImageParams default html convert to image params
type Html2ImageRequestDTO ¶
type Html2ImageRequestDTO struct { CommonRequestDTO Format page.CaptureScreenshotFormat `schema:"format,omitempty" validate:"omitempty"` // Image compression format (defaults to png). Quality int64 `schema:"quality,omitempty" validate:"omitempty"` // Compression quality from range [0..100] (jpeg only). CustomClip bool `schema:"customClip,omitempty" validate:"omitempty"` //if set this value, the below clip will work,otherwise not work! ClipX float64 `schema:"clipX,omitempty" validate:"omitempty"` // Capture the screenshot of a given region only.X offset in device independent pixels (dip). ClipY float64 `schema:"clipY,omitempty" validate:"omitempty"` // Capture the screenshot of a given region only.Y offset in device independent pixels (dip). ClipWidth float64 `schema:"clipWidth,omitempty" validate:"omitempty"` // Capture the screenshot of a given region only.Rectangle width in device independent pixels (dip). ClipHeight float64 `schema:"clipHeight,omitempty" validate:"omitempty"` // Capture the screenshot of a given region only.Rectangle height in device independent pixels (dip). ClipScale float64 `schema:"clipScale,omitempty" validate:"omitempty"` // Capture the screenshot of a given region only.Page scale factor. FromSurface bool `schema:"fromSurface,omitempty" validate:"omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to true. WaitingTime int `schema:"waitingTime,omitempty" validate:"omitempty"` // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond }