Skip to content

Commit

Permalink
docs: repace new to true for headless option
Browse files Browse the repository at this point in the history
  • Loading branch information
condorheroblog committed Aug 1, 2024
1 parent fb9249b commit df8264a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Rules for automatically generating PDF file names.
| `inputs` | `string[]` | `--inputs` | Input one or more local or online paths. | `[]` |
| `outFile` | `string` | `--outFile` | Output file name. | {input}.pdf |
| `outDir` | `string` | `--outDir` | Output directory. | `process.cwd()` |
| `headless` | `boolean` \| `new` | `--headless` | Whether to run the browser in headless mode. | `new` |
| `headless` | `boolean` \| `shell` | `--headless` | Whether to run the browser in headless mode. | `true` |
| `PDFOptions` | `object` | | Valid options to configure PDF generation via Page.pdf(). | |
|`scale` | `number` | `--scale` | Scales the rendering of the web page. Amount must be between 0.1 and 2. | 1 |
|`headerTemplate` | `string` | `--headerTemplate` | HTML template for the print header. | |
Expand Down
4 changes: 2 additions & 2 deletions src/commands/htmlExportPdf/createHtmlExportPdf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export function createHtmlExportPdf(program: Command) {
.option("-i, --inputs <inputs>", "Input one or more local or online paths", collectParameters, [])
.option("-o, --outFile [outFile]", "Output file name(default: {input}.pdf)")
.option("--outDir [outDir]", "Output directory(default: process.cwd())")
.option("--headless [headless]", "Whether to run the browser in headless mode(default: 'new')", (v) => {
.option("--headless [headless]", "Whether to run the browser in headless mode(default: true)", (v) => {
if (v === "false")
return false;

if (v === "true")
return true;

return v;
}, "new")
}, true)

// https://pptr.dev/api/puppeteer.pdfoptions
.option("--scale <scale>", "Scales the rendering of the web page. Amount must be between 0.1 and 2(default: 1)", v => Number(v), 1)
Expand Down

0 comments on commit df8264a

Please sign in to comment.