pub struct WebCaptureParams {Show 17 fields
pub source: Option<WebCaptureSource>,
pub url: Option<String>,
pub output: Option<WebCaptureOutput>,
pub page_size: Option<WebCapturePageSize>,
pub orientation: Option<WebCaptureOrientation>,
pub margin: Option<WebCaptureMargin>,
pub full_page: Option<bool>,
pub screen_size: Option<WebCaptureScreenSize>,
pub viewport_width: Option<f64>,
pub viewport_height: Option<f64>,
pub delay_ms: Option<f64>,
pub quality: Option<f64>,
pub transparent_background: Option<bool>,
pub block_ads: Option<bool>,
pub remove_overlays: Option<bool>,
pub output_name: Option<String>,
pub extra: Object,
}Expand description
Parameters of Web page to PDF or image (web-capture).
Fields§
§source: Option<WebCaptureSource>html renders the uploaded HTML with scripts off; url captures a public web address. Default:
"html".
url: Option<String>Public address to capture. When empty, the input file’s text is the address. Used when source
is url.
output: Option<WebCaptureOutput>What to make: a PDF, or a PNG, JPEG or WebP image. Default: "pdf".
page_size: Option<WebCapturePageSize>PDF page size. Default: "A4". Used when output is pdf.
orientation: Option<WebCaptureOrientation>PDF orientation. Default: "portrait". Used when output is pdf.
margin: Option<WebCaptureMargin>PDF margin: no-margin 0, small 0.5 in, big 0.75 in. Default: "small". Used when output is
pdf.
full_page: Option<bool>Capture the whole page (one long PDF page, or a full-length image) instead of the first screen.
Default: false.
screen_size: Option<WebCaptureScreenSize>Browser window: desktop 1365x768, laptop 1440x900, tablet 834x1112, mobile 390x844. Default:
"desktop".
viewport_width: Option<f64>Exact window width; overrides screenSize. Range: 320 to 2400 px.
viewport_height: Option<f64>Exact window height; overrides screenSize. Range: 240 to 2400 px.
delay_ms: Option<f64>Wait after the page loads before capturing (an image waits 250 ms when this is omitted). Range: 0 to 3000 ms.
quality: Option<f64>JPEG or WebP quality. Default: 86. Range: 1 to 100 %. Used when output is jpeg or webp.
transparent_background: Option<bool>Keep a transparent background. Default: false. Used when output is png.
block_ads: Option<bool>Try to block advertising requests. Default: false. Used when output is pdf.
remove_overlays: Option<bool>Try to remove pop-up overlays from a captured web address. Default: false. Used when output
is pdf.
output_name: Option<String>Output file name without a path; the extension is added for you.
extra: ObjectFurther parameters this SDK version does not model.