@html-css-to-image/client 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,6 +56,7 @@ import { CreateUrlImageRequest } from '@html-css-to-image/client';
56
56
 
57
57
  const request = new CreateUrlImageRequest({
58
58
  url: 'https://example.com',
59
+ css: '.cookie-banner { display: none; }',
59
60
  full_screen: true
60
61
  });
61
62
 
@@ -83,7 +84,7 @@ These methods are handy when you have a lot of content that may never be rendere
83
84
  ### Signed Template URLs
84
85
 
85
86
  ```typescript
86
- const signedUrl = client.createTemplatedImageUrl('your_template_id', {
87
+ const signedUrl = client.generateTemplatedImageUrl('your_template_id', {
87
88
  title: 'Dynamic Title'
88
89
  });
89
90
 
@@ -102,11 +103,11 @@ const this_item = {
102
103
  id: 123,
103
104
  updated_at: new Date(2025, 7, 15)
104
105
  };
105
- const url_request = new CreateUrlImageRequest({
106
- url: `https://website.com/_social/${this_tem_id}?updated_at=${updated_at.valueOf()}`,
107
- viewport_width: 600,
106
+ const url_request = new CreateUrlImageRequest({
107
+ url: `https://website.com/_social/${this_item.id}?updated_at=${this_item.updated_at.valueOf()}`,
108
+ viewport_width: 600,
108
109
  viewport_height: 200});
109
- const signedUrl = client.generateCreateAndRenderUr(url_request);
110
+ const signedUrl = client.generateCreateAndRenderUrl(url_request);
110
111
 
111
112
  // now it's safe to use signedUrl on the frontend in a meta or img tag, without exposing your API key, and it will be kept updated as the updated_at changes.
112
113
  ```
@@ -116,13 +117,15 @@ const signedUrl = client.generateCreateAndRenderUr(url_request);
116
117
  If you have created a template for your account, you can generate an image by passing your template ID and the data for your variables.
117
118
 
118
119
  ```typescript
119
- const result = await client.createImage({
120
+ import { CreateTemplatedImageRequest } from '@html-css-to-image/client';
121
+
122
+ const result = await client.createImage(new CreateTemplatedImageRequest({
120
123
  template_id: 'your_template_id',
121
124
  template_values: {
122
125
  title: 'Hello from Template',
123
126
  subtitle: 'This is a dynamic value'
124
127
  }
125
- });
128
+ }));
126
129
  ```
127
130
 
128
131
  ### PDF Generation
@@ -200,4 +203,4 @@ const client = new HtmlCssToImageClient(apiId, apiKey, fetch);
200
203
  > Check out the [HTML/CSS To Image Docs](https://docs.htmlcsstoimage.com) for more details on the API's capabilities.
201
204
 
202
205
  > [!TIP]
203
- > Get started for free at [htmlcsstoimage.com](https://htmlcsstoimage.com).
206
+ > Get started for free at [htmlcsstoimage.com](https://htmlcsstoimage.com).
@@ -1,6 +1,7 @@
1
- import { IHtmlCssToImageClient } from "./IHtmlCssToImageClient.js";
2
- import { CreateHtmlCssImageRequest, CreateTemplatedImageRequest, CreateUrlImageRequest } from "./types/request.js";
3
- import { CreateImageBatchResponse, CreateImageResponse } from "./types/response.js";
1
+ import type { IHtmlCssToImageClient } from "./IHtmlCssToImageClient.js";
2
+ import { CreateTemplatedImageRequest } from "./types/request.js";
3
+ import type { CreateHtmlCssImageRequest, CreateUrlImageRequest } from "./types/request.js";
4
+ import type { CreateImageBatchResponse, CreateImageResponse } from "./types/response.js";
4
5
  export type FetchFunction = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
5
6
  export declare class HtmlCssToImageClient implements IHtmlCssToImageClient {
6
7
  private readonly apiId;
@@ -45,7 +45,10 @@ export class HtmlCssToImageClient {
45
45
  case 'url':
46
46
  return this.mapUrlToInternalRequest(request, in_batch);
47
47
  case 'templated':
48
- return request;
48
+ {
49
+ const { __type, ...templatedRequest } = request;
50
+ return templatedRequest;
51
+ }
49
52
  default:
50
53
  throw new Error("Unsupported request type");
51
54
  }
@@ -111,7 +114,7 @@ export class HtmlCssToImageClient {
111
114
  .filter(([key, _]) => key !== 'url' && key != 'pdf_options' && key !== '__type')
112
115
  .sort((a, b) => a[0].localeCompare(b[0]))
113
116
  .forEach(([key, value]) => {
114
- if (value !== undefined && value !== null && value !== false) {
117
+ if (value !== undefined && value !== null && (value !== false || key === 'transparent_background')) {
115
118
  params.append(key, value.toString());
116
119
  }
117
120
  });
@@ -197,6 +200,7 @@ export class HtmlCssToImageClient {
197
200
  }
198
201
  return new_pdf_options;
199
202
  }
203
+ return undefined;
200
204
  }
201
205
  pdfValueWithUnitsToString(item) {
202
206
  if (typeof item === "number") {
@@ -1,5 +1,5 @@
1
- import { CreateHtmlCssImageRequest, CreateTemplatedImageRequest, CreateUrlImageRequest } from "./types/request.js";
2
- import { CreateImageBatchResponse, CreateImageResponse } from "./types/response.js";
1
+ import type { CreateHtmlCssImageRequest, CreateTemplatedImageRequest, CreateUrlImageRequest } from "./types/request.js";
2
+ import type { CreateImageBatchResponse, CreateImageResponse } from "./types/response.js";
3
3
  export interface IHtmlCssToImageClient {
4
4
  createImage(request: CreateHtmlCssImageRequest | CreateUrlImageRequest | CreateTemplatedImageRequest): Promise<CreateImageResponse>;
5
5
  createImageBatch<T extends CreateHtmlCssImageRequest | CreateUrlImageRequest>(variations: T[], default_options?: T): Promise<CreateImageBatchResponse>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export { BaseCreateImageRequest, CreateHtmlCssImageRequest, CreateUrlImageRequest, PDFOptions, PdfMargins, PdfValueWithUnits, PdfUnit } from './types/request.js';
2
- export { CreateImageResponse, CreateImageBatchResponse } from './types/response.js';
1
+ export { BaseCreateImageRequest, CreateHtmlCssImageRequest, CreateTemplatedImageRequest, CreateUrlImageRequest, PDFOptions } from './types/request.js';
2
+ export type { ColorSchemeType, MediaType, PdfMargins, PdfValueInput, PdfValueWithUnits, PdfUnit } from './types/request.js';
3
+ export type { CreateImageBatchResponse, CreateImageBatchSuccessResponse, CreateImageErrorResponse, CreateImageResponse, CreateImageSuccessResponse, ValidationError } from './types/response.js';
3
4
  export { HtmlCssToImageClient } from './HtmlCssToImageClient.js';
4
- export { IHtmlCssToImageClient } from './IHtmlCssToImageClient.js';
5
+ export type { FetchFunction } from './HtmlCssToImageClient.js';
6
+ export type { IHtmlCssToImageClient } from './IHtmlCssToImageClient.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { BaseCreateImageRequest, CreateHtmlCssImageRequest, CreateUrlImageRequest, PDFOptions } from './types/request.js';
1
+ export { BaseCreateImageRequest, CreateHtmlCssImageRequest, CreateTemplatedImageRequest, CreateUrlImageRequest, PDFOptions } from './types/request.js';
2
2
  export { HtmlCssToImageClient } from './HtmlCssToImageClient.js';
@@ -1,4 +1,3 @@
1
- import { BaseCreateRequestWithoutVariableOptions, BasePDFOptions } from "./internals.js";
2
1
  export type ColorSchemeType = 'light' | 'dark';
3
2
  export type PdfUnit = 'px' | 'in' | 'cm' | 'mm';
4
3
  export type MediaType = 'print' | 'screen';
@@ -20,7 +19,15 @@ export interface PdfMargins {
20
19
  bottom: PdfValueInput;
21
20
  left: PdfValueInput;
22
21
  }
23
- export declare class PDFOptions extends BasePDFOptions {
22
+ export declare class PDFOptions {
23
+ /**
24
+ * Whether background graphics should be printed in the PDF output.
25
+ */
26
+ print_background?: boolean;
27
+ /**
28
+ * The scale factor applied when generating the PDF output.
29
+ */
30
+ scale?: number;
24
31
  /**
25
32
  * Gets or sets the margins to be applied to the PDF output.
26
33
  * Specifies the top, right, bottom, and left margins.
@@ -36,7 +43,85 @@ export declare class PDFOptions extends BasePDFOptions {
36
43
  page_width?: PdfValueInput;
37
44
  constructor(init?: Partial<PDFOptions>);
38
45
  }
39
- export declare abstract class BaseCreateImageRequest extends BaseCreateRequestWithoutVariableOptions {
46
+ export declare abstract class BaseCreateImageRequest {
47
+ /**
48
+ * A CSS selector to target a specific element on the page.
49
+ * The API will crop the image to the dimensions of this element.
50
+ */
51
+ selector?: string;
52
+ /**
53
+ * Adjusts the pixel ratio for the screenshot.
54
+ * The default is 2, which is equivalent to a 4K monitor.
55
+ */
56
+ device_scale?: number;
57
+ /**
58
+ * Set the height of Chrome's viewport. This will disable automatic cropping.
59
+ */
60
+ viewport_height?: number;
61
+ /**
62
+ * Set the width of Chrome's viewport. This will disable automatic cropping.
63
+ */
64
+ viewport_width?: number;
65
+ /**
66
+ * Sets a limit on time to wait until the screenshot is taken.
67
+ */
68
+ max_wait_ms?: number;
69
+ /**
70
+ * Adds extra time before taking the screenshot, such as when waiting for JavaScript to execute.
71
+ */
72
+ ms_delay?: number;
73
+ /**
74
+ * Wait until ScreenshotReady() is called from JavaScript before taking the screenshot.
75
+ */
76
+ render_when_ready?: boolean;
77
+ /**
78
+ * Ensure the image is only ever rendered and saved one time.
79
+ */
80
+ max_render_once?: boolean;
81
+ /**
82
+ * Disable Twemoji fallback rendering.
83
+ */
84
+ disable_twemoji?: boolean;
85
+ /**
86
+ * Render as if the user has selected light or dark mode.
87
+ */
88
+ color_scheme?: ColorSchemeType;
89
+ /**
90
+ * Set the browser timezone using an IANA timezone name.
91
+ */
92
+ timezone?: string;
93
+ /**
94
+ * Render as if the viewport is a mobile device.
95
+ */
96
+ viewport_mobile?: boolean;
97
+ /**
98
+ * Enable touch interactions within the viewport.
99
+ */
100
+ viewport_touch?: boolean;
101
+ /**
102
+ * Render the viewport in landscape orientation.
103
+ */
104
+ viewport_landscape?: boolean;
105
+ /**
106
+ * Set the rendering media type.
107
+ */
108
+ media_type?: MediaType;
109
+ /**
110
+ * Select an organization proxy for rendering.
111
+ */
112
+ proxy_id?: string;
113
+ /**
114
+ * Set the maximum width in jumbo mode. jumbo_max_height must also be defined.
115
+ */
116
+ jumbo_max_width?: number;
117
+ /**
118
+ * Set the maximum height in jumbo mode. jumbo_max_width must also be defined.
119
+ */
120
+ jumbo_max_height?: number;
121
+ /**
122
+ * Render the image with a transparent background.
123
+ */
124
+ transparent_background?: boolean;
40
125
  /**
41
126
  * Options for generating a PDF from the HTML/CSS or Url.
42
127
  */
@@ -73,6 +158,11 @@ export declare class CreateUrlImageRequest extends BaseCreateImageRequest {
73
158
  * This variable is expected to contain a valid URL string.
74
159
  */
75
160
  url: string;
161
+ /**
162
+ * Custom CSS rules to inject into the target webpage before rendering.
163
+ * Use this to override existing styles or customize specific elements.
164
+ */
165
+ css?: string;
76
166
  /**
77
167
  * Indicates whether the screenshot should capture the entire webpage in full height.
78
168
  *
@@ -1,5 +1,12 @@
1
- import { BaseCreateRequestWithoutVariableOptions, BasePDFOptions } from "./internals.js";
2
- export class PDFOptions extends BasePDFOptions {
1
+ export class PDFOptions {
2
+ /**
3
+ * Whether background graphics should be printed in the PDF output.
4
+ */
5
+ print_background;
6
+ /**
7
+ * The scale factor applied when generating the PDF output.
8
+ */
9
+ scale;
3
10
  /**
4
11
  * Gets or sets the margins to be applied to the PDF output.
5
12
  * Specifies the top, right, bottom, and left margins.
@@ -14,17 +21,93 @@ export class PDFOptions extends BasePDFOptions {
14
21
  */
15
22
  page_width;
16
23
  constructor(init) {
17
- super();
18
24
  Object.assign(this, init);
19
25
  }
20
26
  }
21
- export class BaseCreateImageRequest extends BaseCreateRequestWithoutVariableOptions {
27
+ export class BaseCreateImageRequest {
28
+ /**
29
+ * A CSS selector to target a specific element on the page.
30
+ * The API will crop the image to the dimensions of this element.
31
+ */
32
+ selector;
33
+ /**
34
+ * Adjusts the pixel ratio for the screenshot.
35
+ * The default is 2, which is equivalent to a 4K monitor.
36
+ */
37
+ device_scale;
38
+ /**
39
+ * Set the height of Chrome's viewport. This will disable automatic cropping.
40
+ */
41
+ viewport_height;
42
+ /**
43
+ * Set the width of Chrome's viewport. This will disable automatic cropping.
44
+ */
45
+ viewport_width;
46
+ /**
47
+ * Sets a limit on time to wait until the screenshot is taken.
48
+ */
49
+ max_wait_ms;
50
+ /**
51
+ * Adds extra time before taking the screenshot, such as when waiting for JavaScript to execute.
52
+ */
53
+ ms_delay;
54
+ /**
55
+ * Wait until ScreenshotReady() is called from JavaScript before taking the screenshot.
56
+ */
57
+ render_when_ready;
58
+ /**
59
+ * Ensure the image is only ever rendered and saved one time.
60
+ */
61
+ max_render_once;
62
+ /**
63
+ * Disable Twemoji fallback rendering.
64
+ */
65
+ disable_twemoji;
66
+ /**
67
+ * Render as if the user has selected light or dark mode.
68
+ */
69
+ color_scheme;
70
+ /**
71
+ * Set the browser timezone using an IANA timezone name.
72
+ */
73
+ timezone;
74
+ /**
75
+ * Render as if the viewport is a mobile device.
76
+ */
77
+ viewport_mobile;
78
+ /**
79
+ * Enable touch interactions within the viewport.
80
+ */
81
+ viewport_touch;
82
+ /**
83
+ * Render the viewport in landscape orientation.
84
+ */
85
+ viewport_landscape;
86
+ /**
87
+ * Set the rendering media type.
88
+ */
89
+ media_type;
90
+ /**
91
+ * Select an organization proxy for rendering.
92
+ */
93
+ proxy_id;
94
+ /**
95
+ * Set the maximum width in jumbo mode. jumbo_max_height must also be defined.
96
+ */
97
+ jumbo_max_width;
98
+ /**
99
+ * Set the maximum height in jumbo mode. jumbo_max_width must also be defined.
100
+ */
101
+ jumbo_max_height;
102
+ /**
103
+ * Render the image with a transparent background.
104
+ */
105
+ transparent_background;
22
106
  /**
23
107
  * Options for generating a PDF from the HTML/CSS or Url.
24
108
  */
25
109
  pdf_options;
26
110
  constructor(init) {
27
- super();
28
111
  Object.assign(this, init);
29
112
  }
30
113
  }
@@ -61,6 +144,11 @@ export class CreateUrlImageRequest extends BaseCreateImageRequest {
61
144
  * This variable is expected to contain a valid URL string.
62
145
  */
63
146
  url;
147
+ /**
148
+ * Custom CSS rules to inject into the target webpage before rendering.
149
+ * Use this to override existing styles or customize specific elements.
150
+ */
151
+ css;
64
152
  /**
65
153
  * Indicates whether the screenshot should capture the entire webpage in full height.
66
154
  *
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@html-css-to-image/client",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Lightweight TypeScript client for the HTML/CSS to Image API. Generate images from HTML/CSS, URLs, or templates in your TypeScript or JavaScript projects.",
6
6
  "main": "dist/index.js",
7
- "module": "dist/index.mjs",
8
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
9
15
  "repository": {
10
16
  "type": "git",
11
17
  "url": "git+https://github.com/htmlcsstoimage/ts-client.git"
@@ -18,7 +24,8 @@
18
24
  ],
19
25
  "scripts": {
20
26
  "test": "tsx --test tests/*.test.ts",
21
- "build": "tsc",
27
+ "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
28
+ "build": "npm run clean && tsc",
22
29
  "prepublishOnly": "npm run build"
23
30
  },
24
31
  "keywords": [
@@ -1,126 +0,0 @@
1
- import { ColorSchemeType, MediaType } from "./request.js";
2
- export declare abstract class BaseCreateRequestWithoutVariableOptions {
3
- /**
4
- * A CSS selector to target a specific element on the page.
5
- * The API will crop the image to the dimensions of this element.
6
- */
7
- selector?: string;
8
- /**
9
- * Adjusts the pixel ratio for the screenshot.
10
- * The default is 2 which is equivalent to a 4K monitor.
11
- */
12
- device_scale?: number;
13
- /**
14
- * Set the height of Chrome's viewport. This will disable automatic cropping.
15
- */
16
- viewport_height?: number;
17
- /**
18
- * Set the width of Chrome's viewport. This will disable automatic cropping.
19
- */
20
- viewport_width?: number;
21
- /**
22
- * Sets a limit on time to wait until the screenshot is taken.
23
- * Use this if your page loads a lot of extra irrelevant content.
24
- */
25
- max_wait_ms?: number;
26
- /**
27
- * Adds extra time before taking the screenshot,
28
- * like if you need to wait for Javascript to execute.
29
- */
30
- ms_delay?: number;
31
- /**
32
- * This will wait until 'ScreenshotReady()' is called from Javascript to take the screenshot.
33
- */
34
- render_when_ready?: boolean;
35
- /**
36
- * Ensure the image is only ever rendered and saved one time.
37
- * This is an advanced option not applicable to most scenarios.
38
- */
39
- max_render_once?: boolean;
40
- /**
41
- * Twemoji is used to render emoji as a fallback for native emoji fonts.
42
- * This option will disable that behavior.
43
- */
44
- disable_twemoji?: boolean;
45
- /**
46
- * Set Chrome to render assuming the user has explicitly set their browser to Light or Dark mode.
47
- */
48
- color_scheme?: ColorSchemeType;
49
- /**
50
- * Sets the timezone for the browser instance. Use IANA timezone format (e.g. 'America/New_York').
51
- */
52
- timezone?: string;
53
- /**
54
- Sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
55
- */
56
- viewport_mobile?: boolean;
57
- /**
58
- Sets a value indicating whether touch interactions are enabled within the viewport.
59
- */
60
- viewport_touch?: boolean;
61
- /**
62
- * sets a value indicating whether the viewport should be in landscape orientation.
63
- */
64
- viewport_landscape?: boolean;
65
- /**
66
- * Sets the media type to use for rendering, 'print' or 'screen'.
67
- */
68
- media_type?: MediaType;
69
- /**
70
- * Sets which proxy_id for your organization to use when rendering.
71
- */
72
- proxy_id?: string;
73
- /**
74
- * Sets the Maximum width of the rendered image in jumbo mode. Consumes extra renders, jumbo_max_height to be defined as well.
75
- */
76
- jumbo_max_width?: number;
77
- /**
78
- * Sets the Maximum height of the rendered image in jumbo mode. Consumes extra renders, jumbo_max_width to be defined as well.
79
- */
80
- jumbo_max_height?: number;
81
- constructor(init?: Partial<BaseCreateRequestWithoutVariableOptions>);
82
- }
83
- export declare abstract class BasePDFOptions {
84
- /**
85
- * Whether the background graphics should be printed in the PDF output.
86
- */
87
- print_background?: boolean;
88
- /**
89
- * The scale factor to be applied when generating the PDF output (e.g., 1.0).
90
- */
91
- scale?: number;
92
- constructor(init?: Partial<BasePDFOptions>);
93
- }
94
- /**
95
- * Internal interface representing how PDFOptions looks over the wire.
96
- * All units are flattened to strings (e.g., "10in").
97
- * @internal
98
- */
99
- export interface InternalPDFOptions extends BasePDFOptions {
100
- margins?: string[];
101
- page_height?: string;
102
- page_width?: string;
103
- }
104
- export interface InternalBaseCreateRequest extends BaseCreateRequestWithoutVariableOptions {
105
- pdf_options?: InternalPDFOptions;
106
- }
107
- export interface InternalCreateHtmlCssImageRequest extends InternalBaseCreateRequest {
108
- html: string;
109
- css?: string;
110
- google_fonts?: string;
111
- }
112
- export interface InternalCreateHtmlCssImageRequestWithOptionalHtml extends InternalBaseCreateRequest {
113
- html?: string;
114
- css?: string;
115
- google_fonts?: string;
116
- }
117
- export interface InternalCreateUrlImageRequest extends InternalBaseCreateRequest {
118
- url: string;
119
- full_screen?: boolean;
120
- block_consent_banners?: boolean;
121
- }
122
- export interface InternalCreateUrlImageRequestWithOptionalUrl extends InternalBaseCreateRequest {
123
- url?: string;
124
- full_screen?: boolean;
125
- block_consent_banners?: boolean;
126
- }
@@ -1,96 +0,0 @@
1
- export class BaseCreateRequestWithoutVariableOptions {
2
- /**
3
- * A CSS selector to target a specific element on the page.
4
- * The API will crop the image to the dimensions of this element.
5
- */
6
- selector;
7
- /**
8
- * Adjusts the pixel ratio for the screenshot.
9
- * The default is 2 which is equivalent to a 4K monitor.
10
- */
11
- device_scale;
12
- /**
13
- * Set the height of Chrome's viewport. This will disable automatic cropping.
14
- */
15
- viewport_height;
16
- /**
17
- * Set the width of Chrome's viewport. This will disable automatic cropping.
18
- */
19
- viewport_width;
20
- /**
21
- * Sets a limit on time to wait until the screenshot is taken.
22
- * Use this if your page loads a lot of extra irrelevant content.
23
- */
24
- max_wait_ms;
25
- /**
26
- * Adds extra time before taking the screenshot,
27
- * like if you need to wait for Javascript to execute.
28
- */
29
- ms_delay;
30
- /**
31
- * This will wait until 'ScreenshotReady()' is called from Javascript to take the screenshot.
32
- */
33
- render_when_ready;
34
- /**
35
- * Ensure the image is only ever rendered and saved one time.
36
- * This is an advanced option not applicable to most scenarios.
37
- */
38
- max_render_once;
39
- /**
40
- * Twemoji is used to render emoji as a fallback for native emoji fonts.
41
- * This option will disable that behavior.
42
- */
43
- disable_twemoji;
44
- /**
45
- * Set Chrome to render assuming the user has explicitly set their browser to Light or Dark mode.
46
- */
47
- color_scheme;
48
- /**
49
- * Sets the timezone for the browser instance. Use IANA timezone format (e.g. 'America/New_York').
50
- */
51
- timezone;
52
- /**
53
- Sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
54
- */
55
- viewport_mobile;
56
- /**
57
- Sets a value indicating whether touch interactions are enabled within the viewport.
58
- */
59
- viewport_touch;
60
- /**
61
- * sets a value indicating whether the viewport should be in landscape orientation.
62
- */
63
- viewport_landscape;
64
- /**
65
- * Sets the media type to use for rendering, 'print' or 'screen'.
66
- */
67
- media_type;
68
- /**
69
- * Sets which proxy_id for your organization to use when rendering.
70
- */
71
- proxy_id;
72
- /**
73
- * Sets the Maximum width of the rendered image in jumbo mode. Consumes extra renders, jumbo_max_height to be defined as well.
74
- */
75
- jumbo_max_width;
76
- /**
77
- * Sets the Maximum height of the rendered image in jumbo mode. Consumes extra renders, jumbo_max_width to be defined as well.
78
- */
79
- jumbo_max_height;
80
- constructor(init) {
81
- Object.assign(this, init);
82
- }
83
- }
84
- export class BasePDFOptions {
85
- /**
86
- * Whether the background graphics should be printed in the PDF output.
87
- */
88
- print_background;
89
- /**
90
- * The scale factor to be applied when generating the PDF output (e.g., 1.0).
91
- */
92
- scale;
93
- constructor(init) {
94
- Object.assign(this, init);
95
- }
96
- }