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
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
28.1.2
What operating system are you using?
Windows
Operating System Version
all
What arch are you using?
x64
Last Known Working Electron version
28.1.2
Expected Behavior
Electron.PrintToPDFOptions > Margins
web-contents.md, webview-tag.md file
#### `contents.print([options], [callback])`### `<webview>.print([options])`*`options` Object (optional)
*`margins` Object (optional)
*`marginType` string (optional) - Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen, you will also need to specify `top`, `bottom`, `left`, and `right`.
*`top` number (optional) - The top margin of the printed web page, in pixels.
*`bottom` number (optional) - The bottom margin of the printed web page, in pixels.
*`left` number (optional) - The left margin of the printed web page, in pixels.
*`right` number (optional) - The right margin of the printed web page, in pixels.
#### `contents.printToPDF(options)`### `<webview>.printToPDF(options)`*`options` Object
*`marginsToPDF` Object (optional)
*`top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches).
*`bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches).
*`left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches).
*`right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches).
Actual Behavior
The docs are different, the gn-typescript-definitions script only creates one 'Margins'.
interfaceWebContentsPrintOptions{
...
margins?: Margins;
...
}interfacePrintToPDFOptions{
...
margins?: Margins;
...
}interfaceWebviewTagPrintOptions{
...
margins?: Margins;
...
}interfaceMargins{/** * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen, * you will also need to specify `top`, `bottom`, `left`, and `right`. */marginType?: ('default'|'none'|'printableArea'|'custom');/** * The top margin of the printed web page, in pixels. */top?: number;/** * The bottom margin of the printed web page, in pixels. */bottom?: number;/** * The left margin of the printed web page, in pixels. */left?: number;/** * The right margin of the printed web page, in pixels. */right?: number;}
Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
eezz4
changed the title
[Bug]: [Electron.d.ts] confilct type Electron.PrintToPDFOptions > Margins
[Bug]: [Electron.d.ts][gn-typescript-definitions][Invalid type annotations] Electron.PrintToPDFOptions > Margins
Jan 20, 2024
@eezz4 the issue originates here so i've gone ahead and transferred it. Just to confirm - you put the erring version as 28.1.2 and the last working version as 28.1.2; they shouldn't be the same as one indicates the last version it worked and one the verrsion it's not working. Did this ever generate expected documentation?
Preflight Checklist
Electron Version
28.1.2
What operating system are you using?
Windows
Operating System Version
all
What arch are you using?
x64
Last Known Working Electron version
28.1.2Expected Behavior
Electron.PrintToPDFOptions > Margins
web-contents.md
,webview-tag.md
fileActual Behavior
The docs are different, the
gn-typescript-definitions
script only creates one 'Margins'.Testcase Gist URL
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: