You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Generates an image (or images) from HTML using Puppeteer, optionally supporting batch processing.
9
9
*
10
10
* @template TE - The encoding type mapped by 'encoding' parameter. Base64 or binary. Default: binary (undefined).
11
-
* @template TC - The content type mapped by 'content' parameter. Object (ContentObject) or Object Array (ContentArrayItem[]).
11
+
* @template TC - The content type mapped by 'content' parameter. This is either an object or object[].
12
12
* @param options - Configuration options for HTML rendering and screenshot generation.
13
13
* @param options.html - The HTML string to render.
14
14
* @param options.encoding - The encoding for the output image(s).
15
15
* @param options.transparent - Whether the background should be transparent.
16
16
* @param options.content - Content data or array of content data for batch processing.
17
-
* @param options.output - Output file path if content is an Object. Else define output within the Content Array ContentArrayItem[].
18
-
* @param options.selector - CSS selector to target a specific element for screenshot if content is an Object. Else selector within the Content Array ContentArrayItem[].
17
+
* @param options.output - Output file path if content is an object. Else define output within the Content object[].
18
+
* @param options.selector - CSS selector to target a specific element for the screenshot if content is an object. Else declare the selector within the Content object[].
* @param options.timeout - Timeout for Puppeteer operations in MS (default: 30000ms/30s).
23
23
* @param options.puppeteer - Use a custom puppeteer library (i.e puppeteer-core or puppeteer-extra)
24
-
* @returns String or Buffer depending on encoding type. If content is an array it will return an Array instead of single a string or Buffer.
24
+
* @returns String (base64) or Buffer (binary) depending on encoding type. If content is an array it will return an array instead of single a string or Buffer.
0 commit comments