puppeteer/new-docs/puppeteer.protocol.page.printtopdfrequest.md
Johan Bay e89e264a16
feat(chromium): roll Chromium to r782078 (#6250)
This corresponds to Chromium 85.0.4182.0.

This roll includes: 
- Enable SameSiteByDefaultCookies and CookiesWithoutSameSiteMustBeSecure
   https://crrev.com/c/2231445
- [FlexNG] Enable FlexNG by default
   https://crrev.com/c/2216595

Closes #6151.
2020-07-20 17:17:06 +02:00

34 lines
3.4 KiB
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [Protocol](./puppeteer.protocol.md) &gt; [Page](./puppeteer.protocol.page.md) &gt; [PrintToPDFRequest](./puppeteer.protocol.page.printtopdfrequest.md)
## Protocol.Page.PrintToPDFRequest interface
<b>Signature:</b>
```typescript
export interface PrintToPDFRequest
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [displayHeaderFooter](./puppeteer.protocol.page.printtopdfrequest.displayheaderfooter.md) | boolean | Display header and footer. Defaults to false. |
| [footerTemplate](./puppeteer.protocol.page.printtopdfrequest.footertemplate.md) | string | HTML template for the print footer. Should use the same format as the <code>headerTemplate</code>. |
| [headerTemplate](./puppeteer.protocol.page.printtopdfrequest.headertemplate.md) | string | HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - <code>date</code>: formatted print date - <code>title</code>: document title - <code>url</code>: document location - <code>pageNumber</code>: current page number - <code>totalPages</code>: total pages in the document<!-- -->For example, <code>&lt;span class=title&gt;&lt;/span&gt;</code> would generate span containing the title. |
| [ignoreInvalidPageRanges](./puppeteer.protocol.page.printtopdfrequest.ignoreinvalidpageranges.md) | boolean | Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false. |
| [landscape](./puppeteer.protocol.page.printtopdfrequest.landscape.md) | boolean | Paper orientation. Defaults to false. |
| [marginBottom](./puppeteer.protocol.page.printtopdfrequest.marginbottom.md) | number | Bottom margin in inches. Defaults to 1cm (\~0.4 inches). |
| [marginLeft](./puppeteer.protocol.page.printtopdfrequest.marginleft.md) | number | Left margin in inches. Defaults to 1cm (\~0.4 inches). |
| [marginRight](./puppeteer.protocol.page.printtopdfrequest.marginright.md) | number | Right margin in inches. Defaults to 1cm (\~0.4 inches). |
| [marginTop](./puppeteer.protocol.page.printtopdfrequest.margintop.md) | number | Top margin in inches. Defaults to 1cm (\~0.4 inches). |
| [pageRanges](./puppeteer.protocol.page.printtopdfrequest.pageranges.md) | string | Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. |
| [paperHeight](./puppeteer.protocol.page.printtopdfrequest.paperheight.md) | number | Paper height in inches. Defaults to 11 inches. |
| [paperWidth](./puppeteer.protocol.page.printtopdfrequest.paperwidth.md) | number | Paper width in inches. Defaults to 8.5 inches. |
| [preferCSSPageSize](./puppeteer.protocol.page.printtopdfrequest.prefercsspagesize.md) | boolean | Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. |
| [printBackground](./puppeteer.protocol.page.printtopdfrequest.printbackground.md) | boolean | Print background graphics. Defaults to false. |
| [scale](./puppeteer.protocol.page.printtopdfrequest.scale.md) | number | Scale of the webpage rendering. Defaults to 1. |
| [transferMode](./puppeteer.protocol.page.printtopdfrequest.transfermode.md) | ('ReturnAsBase64' \| 'ReturnAsStream') | return as stream (PrintToPDFRequestTransferMode enum) |