# PrintToPDFOptions

**Kind**: interface | **Module**: [Windows](https://docs.interop.io/desktop/reference/javascript/windows/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/windows/printtopdfoptions/index.html

Options for printing PDF files.

## Properties

- **`autoOpen`** (`boolean`, optional) default: `false`
  If `true`, will open the PDF file.
- **`autoOpenPath`** (`boolean`, optional) default: `false`
  If `true`, will open the folder that contains the PDF file.
- **`autoSave`** (`boolean`, optional) default: `false`
  If `true`, will autosave the file without asking the user where to save it. If `false`, a system save dialog will appear.
- **`headerFooter`** (`{ title?: string; url?: string; }`, optional)
  Header and footer for the PDF.
- **`landscape`** (`boolean`, optional)
  Set to `true` for landscape layout, `false` for portrait layout.
- **`marginsType`** (`number`, optional)
  Specifies the type of margins to use. Use 0 for default margin, 1 for no
  margin, and 2 for minimum margin.
- **`pageRanges`** (`PageRange[]`, optional)
  The page range to print.
- **`pageSize`** (`("A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid") | Size`, optional)
  Page size of the generated PDF file.
- **`printBackground`** (`boolean`, optional)
  If `true`, will print CSS backgrounds.
- **`printSelectionOnly`** (`boolean`, optional)
  If `true`, will print selection only.
- **`scaleFactor`** (`number`, optional)
  The scale factor of the web page. Can range from 0 to 100.

## Related types

- [PageRange](https://docs.interop.io/desktop/reference/javascript/windows/pagerange/index.md)
- [Size](https://docs.interop.io/desktop/reference/javascript/windows/size/index.md)
