pagedjs-cli issueshttps://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues2024-01-08T13:58:00Zhttps://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/77Getting 'Error: item doesn't belong to list' on a certain web page2024-01-08T13:58:00ZIsaac HalvorsonGetting 'Error: item doesn't belong to list' on a certain web pageHello,
I'm trying to use the CLI to generate a PDF of this web page: https://eli.li/space-witch. Whenever I try, I get the following error:
```
❯ pagedjs-cli https://eli.li/space-witch -d -o space-witch.pdf
◴ Loading: https://eli.li/sp...Hello,
I'm trying to use the CLI to generate a PDF of this web page: https://eli.li/space-witch. Whenever I try, I get the following error:
```
❯ pagedjs-cli https://eli.li/space-witch -d -o space-witch.pdf
◴ Loading: https://eli.li/space-witchnode:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
Error: item doesn't belong to list
at #evaluate (file:///Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:249:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (file:///Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:146:16)
at async Printer.render (file:///Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/src/printer.js:202:4)
at async Printer.preview (file:///Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/src/printer.js:352:14)
at async file:///Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/src/cli.js:170:3
at parse (/Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/dist/browser.js:26475:8)
at rules (/Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/dist/browser.js:26529:11)
at walk (/Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/dist/browser.js:11598:9)
at walkNode (/Users/ihalvorson/.local/share/mise/installs/node/21.5.0/lib/node_modules/pagedjs-cli/dist/browser.js:11539:41)
Node.js v21.5.0
```
I'm not a nodejs expert, so I'm not really sure where to start with troubleshooting or debugging this kind of issue. Any suggestions or ideas on what might be going on?https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/76Accessibility regressions2023-11-06T16:19:24ZAlain VagnerAccessibility regressionsI have recently updated pagedjs-cli to the version 0.4.3 and I have now accessibility issues:
- the output PDF has no tags
- the output PDF has no defined language
- the title of the document is not displayed by default
I am using the...I have recently updated pagedjs-cli to the version 0.4.3 and I have now accessibility issues:
- the output PDF has no tags
- the output PDF has no defined language
- the title of the document is not displayed by default
I am using the following command line:
`npx pagedjs-cli --outline-tags "h1,h2,h3" ./$filename.html -o ./$filename.pdf `
I have fixed these issues in a previous MR:
https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/merge_requests/23
Some parts of the code have apparently been refactored, but for example for the generation of tags, the code is still there.
Any idea what it could be?https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/75Setting page size is unreliable2023-08-13T23:35:04ZDaisy Leigh BreneckiSetting page size is unreliableI'm trying to generate an A5 landscape PDF. I've tried the following:
- Using `size: a5 landscape` inside an `@page` rule in CSS. This produces a portrait US Letter PDF.
- Using `--page-size a5 --landscape` on the CLI. (I've also tried ...I'm trying to generate an A5 landscape PDF. I've tried the following:
- Using `size: a5 landscape` inside an `@page` rule in CSS. This produces a portrait US Letter PDF.
- Using `--page-size a5 --landscape` on the CLI. (I've also tried `A5`.) This also produces a portrait US Letter PDF.
- Using `--width 210 --height 148.5` on the CLI. This produces a page that is 39.2 mm wide and 55.8 mm high‽
- Using `--width 793.700787 --height 561.2598` gives me close enough to the size I want, but portrait. Using `--height 793.700787 --width 561.2598` gives me the same result. This also applies with `--landscape`.
It looks like what's happening is:
- The `--page-size` CLI arg is being ignored.
- The `--width` and `--height` is being interpreted as 1/96 of an inch (e.g. [a CSS "pixel"](https://developer.mozilla.org/en-US/docs/Web/CSS/length#absolute_length_units)), even though the `--help` output says it should be millimetres.
- The page is always rendered in portrait (e.g. the longest side of the page is always vertical), regardless of which way around `--width` and `--height` are or whether `--landscape` is specified.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/74Add option for better debug logging2023-11-24T12:33:46ZMatt MeintjesAdd option for better debug loggingAfter using the extra-header option, pagedjs starts throwing an error due to Google Fonts CORS issue. I had some trouble diagnosing this problem, until I added the following code the printer.js:
```
page
.on('console', message =>
...After using the extra-header option, pagedjs starts throwing an error due to Google Fonts CORS issue. I had some trouble diagnosing this problem, until I added the following code the printer.js:
```
page
.on('console', message =>
console.log(`${message.type().substr(0, 3).toUpperCase()} ${message.text()}`))
.on('pageerror', ({ message }) => console.log(message))
.on('requestfailed', request =>
console.log(`${request.failure().errorText} ${request.url()}`))
```
This prints console messages and page errors to the command line when running pagedjs-cli. It would be great if there was an option to enable this.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/73extra-header causes 'Expected value of header "0" to be String, but "object" ...2023-07-07T00:54:28ZMatt Meintjesextra-header causes 'Expected value of header "0" to be String, but "object" is found.'When trying to run with the `--extra-header remote-user:USER` I get the following error:
```
Error: Expected value of header "0" to be String, but "object" is found.
at assert (file:///home/pwuser/pagedjs/node_modules/puppeteer-core/...When trying to run with the `--extra-header remote-user:USER` I get the following error:
```
Error: Expected value of header "0" to be String, but "object" is found.
at assert (file:///home/pwuser/pagedjs/node_modules/puppeteer-core/lib/esm/puppeteer/util/assert.js:25:15)
at NetworkManager.setExtraHTTPHeaders (file:///home/pwuser/pagedjs/node_modules/puppeteer-core/lib/esm/puppeteer/common/NetworkManager.js:119:13)
at CDPPage.setExtraHTTPHeaders (file:///home/pwuser/pagedjs/node_modules/puppeteer-core/lib/esm/puppeteer/common/Page.js:422:88)
at Printer.render (file:///home/pwuser/pagedjs/node_modules/pagedjs-cli/src/printer.js:86:9)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Printer.pdf (file:///home/pwuser/pagedjs/node_modules/pagedjs-cli/src/printer.js:270:14)
at async file:///home/pwuser/pagedjs/node_modules/pagedjs-cli/src/cli.js:173:10
```
Changing [line 70 in cli.js](https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/blob/main/src/cli.js#L70) to the following fixes this:
```
const extraHTTPHeaders = options.extraHeader.reduce((acc, header) => {
const [name, ...value] = header.split(':');
return { ...acc, [name]: value.join(':') };
}, []);
```https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/72Hyphenopoly don't load with pagedjs-cli2023-05-04T08:03:55ZJulieHyphenopoly don't load with pagedjs-cliI try to use Hyphenopoly with pagedjs-cli. (https://github.com/mnater/Hyphenopoly)
It works perfectly when I use the script with the polyfill version (0.3.4) in a browser but I can't get it to work with the command line version.
Here ...I try to use Hyphenopoly with pagedjs-cli. (https://github.com/mnater/Hyphenopoly)
It works perfectly when I use the script with the polyfill version (0.3.4) in a browser but I can't get it to work with the command line version.
Here is the bash command I use (with the two script uses in the browser):
```
pagedjs-cli index.html --additional-script Hyphenopoly_Loader.js --additional-script hyphenationHook.js -o result.pdf
```
I also try:
```
pagedjs-cli index.html --additional-script Hyphenopoly.js --additional-script Hyphenopoly_Loader.js --additional-script hyphenationHook.js -o result.pdf
```
Maybe the problem is the way `Hyphenopoly_Loader.js` loads the files it needs?
Here is a test folder: [hyphenopoly_issue.zip](/uploads/a126a69197814c535dcc1b0ec5576e59/hyphenopoly_issue.zip)https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/71ProtocolError: Runtime.callFunctionOn timed out.2023-04-04T08:05:27ZJ HuntProtocolError: Runtime.callFunctionOn timed out.Using pagedjs-cli 0.3.4, I've successfully rendered several of the test samples (e.g. aurorae) but when fetching some larger HTML documents (or referencing local files)
`pagedjs-cli https://d9.lndo.site/mobility -t 600000 -o mobility.pd...Using pagedjs-cli 0.3.4, I've successfully rendered several of the test samples (e.g. aurorae) but when fetching some larger HTML documents (or referencing local files)
`pagedjs-cli https://d9.lndo.site/mobility -t 600000 -o mobility.pdf`
I get
```
✔ Loaded
◴ Rendering: Page 2ProtocolError: Runtime.callFunctionOn timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
at new Callback (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js:58:35)
at CallbackRegistry.create (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js:103:26)
at Connection._rawSend (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js:212:26)
at CDPSessionImpl.send (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/Connection.js:413:78)
at ExecutionContext._ExecutionContext_evaluate (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:230:46)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (file:///Users/jabber/.nvm/versions/node/v18.2.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer-core/lib/esm/puppeteer/common/ExecutionContext.js:137:16)
```
I'm not sure how to "Increase the 'protocolTimeout' setting". Adding `-t 600000` didn't seem to help.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/69Seperate the Printer into its own package2023-03-19T21:29:36ZValentin SchabschneiderSeperate the Printer into its own packageFor example I'm going to use the `Printer` in an Express.js project and directly use the `Printer`.
It just kinda feels weird to use the `pagedjs-cli` package for this.
For me it would make more sense if there would be a `pagedjs-printer...For example I'm going to use the `Printer` in an Express.js project and directly use the `Printer`.
It just kinda feels weird to use the `pagedjs-cli` package for this.
For me it would make more sense if there would be a `pagedjs-printer` package that the `pagedjs-cli` implements.
This issue is really not important, but in the new package it would also be great to add typescript types. :smile:https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/68add pagedjs-cli -v to have version of chromium, pupeteer, pagedjs and pagedjs...2023-01-25T08:20:57Zjulientaqjulien@coko.foundationadd pagedjs-cli -v to have version of chromium, pupeteer, pagedjs and pagedjs-cliadd `pagedjs-cli -v` commange to have version of chromium, pupeteer, pagedjs and pagedjs-cli.
That would be useful to support user and fix issues.add `pagedjs-cli -v` commange to have version of chromium, pupeteer, pagedjs and pagedjs-cli.
That would be useful to support user and fix issues.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/67pagedjs-cli socket hangup issue2023-01-11T12:02:31ZFaheem Hameedpagedjs-cli socket hangup issueHi there,
When I run the pagedjs-cli from the command prompt, it worked perfectly fine.
```
❯ '/usr/local/bin/node' '/usr/local/bin/pagedjs-cli' '<project-path>/pagedjs-test/source.html' '--output' '<project-path>/pagedjs-test/output.p...Hi there,
When I run the pagedjs-cli from the command prompt, it worked perfectly fine.
```
❯ '/usr/local/bin/node' '/usr/local/bin/pagedjs-cli' '<project-path>/pagedjs-test/source.html' '--output' '<project-path>/pagedjs-test/output.pdf'
✔ Loaded
✔ Rendering 1 pages took 11.299999997019768 milliseconds.
✔ Generated
✔ Processed
✔ Saved to /Users/hameedbs/Projects/stockpilot/httpdocs/pagedjs-test/output.pdf
```
At the same time when I run it through PHP, I get some strange "socket hang up" errors as below
```
<br />
<b>Fatal error</b>: Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command "'/usr/local/bin/node' '/usr/local/bin/pagedjs-cli' '<project-root>/pagedjs-test/source.html' '--output' '<project-root>/pagedjs-test/output.pdf'" failed.
Exit Code: 1(General error)
Working directory: <project-root>/admin
Output:
================
Error Output:
================
- Loading: <project-root>/pagedjs-test/source.html
ErrorEvent {
[Symbol(kTarget)]: WebSocket {
_events: [Object: null prototype] { open: [Function], error: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
_binaryType: 'nodebuffer',
_closeCode: 1006,
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: <Buffer >,
_closeTimer: null,
_extensions: {},
_paused: false,
_protocol: '',
_readyState: 3,
_receiver: null,
_sender: null,
_socket: null,
_bufferedAmount: 0,
_isServer: false,
_redirects: 0,
_url: 'ws://127.0.0.1:54711/devtools/browser/fc8a1dc0-ed37-464d-9938-53eb57492b4a',
_originalUnixSocket: false,
_originalSecure: false,
_originalHostOrSocketPath: '127.0.0.1:54711',
_req: null,
[Symbol(kCapture)]: false
},
[Symbol(kType)]: 'error',
[Symbol(kError)]: Error: socket hang up
at connResetException (node:internal/errors:704:14)
at Socket.socketOnEnd (node:_http_client:505:23)
at Socket.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ECONNRESET'
},
[Symbol(kMessage)]: 'socket hang up'
}
in <project-root>/vendor/pilot.simple.software/php-paged-js/src/PagedJs.php:482
Stack trace:
#0 <project-root>/vendor/pilot.simple.software/php-paged-js/src/PagedJs.php(176): PSS\PhpPagedJs\PagedJs->createPdf()
```
The above PHP code was working a long time but recently we get this issue.
Mac OS X version 13.0.1
Thanks for your help!https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/66Missing src attribute on img tags results in infinite loading2022-07-11T08:34:09ZSebastian HoogstoelMissing src attribute on img tags results in infinite loadingTo reproduce, try to pass the following HTML to the pagedjs cli:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=dev...To reproduce, try to pass the following HTML to the pagedjs cli:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>img without src</title>
</head>
<body>
<main>
<img alt="">
</main>
</body>
</html>
```
If you add a `src` attribute (can be empty), page generation will work flawlessly. Granted, `img` tags without a `src` attribute are illegal. However, maybe this could result in a warning instead.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/62pagedjs-cli produces doubled output when HTML source includes paged.polyfill....2023-03-31T15:01:38ZMatthew Tucker-Simmonspagedjs-cli produces doubled output when HTML source includes paged.polyfill.js script tagIt seems that if the HTML source includes `paged.polyfill.js` in it, then the command-line tool produces doubled pages. Here is a MWE:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/pagedjs/...It seems that if the HTML source includes `paged.polyfill.js` in it, then the command-line tool produces doubled pages. Here is a MWE:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js"></script>
</head>
<body>
Hello world!
</body>
</html>
```
Then:
```
$ pagedjs-cli mwe.html -o mwe.pdf
✔ Loaded
✔ Rendering 1 pages took 10.199999988079071 milliseconds.
✔ Generated
✔ Processed
✔ Saved to /path/to/mwe.pdf
$ pdfinfo mwe.pdf
Creator: Chromium + Paged.js
Producer: Skia/PDF m93
... (removed some output)...
Pages: 2
```
I am trying to use `pagedjs-cli` to generate invoices. I want to be able to preview them in the browser prior to rendering them as pdfs, so I need to include the script tag.
It's an acceptable workaround to simply have two templates, one for the browser that does include the script tag and one for generating the pdf, so this isn't high priority for me. I just thought you might like to know.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/60Solution of infinite loading when adding some fonts in html which are located...2022-04-22T12:58:21ZMathis PoncetSolution of infinite loading when adding some fonts in html which are located in InternetHello there,
**Problem**
When you add some fonts which are located in internet, puppeteer have infinite load issue. To avoid this, you have forget an option to put at moment to setContent which allow to wait until all ressources are lo...Hello there,
**Problem**
When you add some fonts which are located in internet, puppeteer have infinite load issue. To avoid this, you have forget an option to put at moment to setContent which allow to wait until all ressources are loaded. Indeed in **printer.js** you set the content of html like that: `page.setContent(html)` while they are some options to wait the loaded of ressources.
**Solution**:
I see the same issue in puppeteer repo https://github.com/puppeteer/puppeteer/issues/728#issuecomment-334301491
setContent have not only the html content param but also an second which is the option. Inside **option** they are **waitUntil** :
`paged.setContent(html, { waitUntil: 'networkidle0' })`
`waitUntil: 'networkidle0'` allow to wait until they are no request which are sent after an certain duration
I made that in my project, and that's resolve this issuehttps://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/59Page 1 rendered correctly but Page 2 rendering error.2023-01-28T13:25:31ZBen LawPage 1 rendered correctly but Page 2 rendering error.The html file is rendered correctly by all browsers but when pagedjs-cli renders it, the contents of Named Page (First page/Cover Page) and 2nd page is rendered twice in the 2nd page but the first page was rendered correctly.
PDF are at...The html file is rendered correctly by all browsers but when pagedjs-cli renders it, the contents of Named Page (First page/Cover Page) and 2nd page is rendered twice in the 2nd page but the first page was rendered correctly.
PDF are attached to see how browsers renders the document and the errors of pagedjs-cli.
[Sample-Browser.pdf](/uploads/b292d35ec17dafb89ad4cf6a0d0bfee0/Sample-Browser.pdf)
[Sample-pagedjs-cli.pdf](/uploads/f330f5f9d976839988d2c9e417623d84/Sample-pagedjs-cli.pdf)
OS : CentOS 7
Nodejs : v14.19.0
pagedjs-cli version: 1.0.6 (latest)
chromium-browser version: 99.0.4844.84https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/58Resulting PDFs have errors according to mutool, pdfcpu and other tools2022-02-21T18:47:59ZKevin KlementResulting PDFs have errors according to mutool, pdfcpu and other toolsPDFs generated by pagedjs-cli (0.1.6 on linux), even for the simplest files, have errors according to MuPDF ([mutool](https://www.mupdf.com/docs/mutool.html)), [pdfcpu](https://github.com/pdfcpu/pdfcpu) and other tools.
I tested with th...PDFs generated by pagedjs-cli (0.1.6 on linux), even for the simplest files, have errors according to MuPDF ([mutool](https://www.mupdf.com/docs/mutool.html)), [pdfcpu](https://github.com/pdfcpu/pdfcpu) and other tools.
I tested with the simple file:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>A test</title>
</head>
<body>
<p>Hello world!</p>
</body>
</html>
```
According to MuPDF's mutool (`mutool info output.pdf`) the result has these errors:
```
error: expected trailer marker
warning: trying to repair broken xref
warning: repairing PDF document
```
[llpp](https://repo.or.cz/w/llpp.git), which is based on MuPDF, reports these errors as well as "PDF stream Length incorrect", which is how I know about this problem, since it appears whenever I open a file created with pagedjs-cli.
Additionally, `pdfcpu validate output.pdf` gives the following:
```
validating(mode=relaxed) output.pdf ...
validation error (obj#:1): pdfcpu: validateDateObject: <2022-02-21T18:14:48.338Z> invalid date
```
[JHOVE](https://jhove.openpreservation.org/) reports a similar error.
None of these errors are likely to cause a PDF not to be readable, but they are annoying.
Additionally, I'm curious why a PDF created by pagedjs-cli tends to be at least twice as big, sometimes three times as big, in filesize, as the corresponding PDF created by weasyprint. (Running it through ghostscript's `ps2pdf` afterwards shrinks it right down, at least.)https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/57PDF generation crashes `pagedjs-cli` on version 0.1.4 and greater2022-06-01T16:35:14ZBoris Budiniboris@cloud68.coPDF generation crashes `pagedjs-cli` on version 0.1.4 and greaterWhen I attempt to generate a PDF using the attached HTML file, the process gets hung at "Loading" when I execute `pagedjs-cli index.html -o result.pdf`. When I execute `pagedjs-cli index.html --debug` I get the following error:
```
$> ...When I attempt to generate a PDF using the attached HTML file, the process gets hung at "Loading" when I execute `pagedjs-cli index.html -o result.pdf`. When I execute `pagedjs-cli index.html --debug` I get the following error:
```
$> pagedjs-cli index.html --debug
✔ Processed
(node:49191) UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.callFunctionOn): Target closed.
at /Users/chrisknight/.nvm/versions/node/v14.17.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:217:63
at new Promise (<anonymous>)
at CDPSession.send (/Users/chrisknight/.nvm/versions/node/v14.17.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:216:16)
at ExecutionContext._evaluateInternal (/Users/chrisknight/.nvm/versions/node/v14.17.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:204:50)
at ExecutionContext.evaluate (/Users/chrisknight/.nvm/versions/node/v14.17.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:27)
at DOMWorld.evaluate (/Users/chrisknight/.nvm/versions/node/v14.17.0/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:91:24)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:49191) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:49191) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
```
I have been able to replicate this on `paged-cli` v0.1.4 and greater. It works just fine on v0.1.3. Using node v14.16.0 and have tried on Mac and Ubunbtu.[index.html](/uploads/374b6c8a71ddb6a12b0f51edb5c382d3/index.html)[index.html](/uploads/dc7a307e696f0fb4572ef5a70654421a/index.html)
If I remove the `<link href="https://fonts.googleapis.com/css?family=Roboto:wght@400;600" rel="stylesheet" />` line from the HTML, it also works fine in all versions.https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/56Is there any option to get a log file?2021-08-17T10:10:15ZBoris Budiniboris@cloud68.coIs there any option to get a log file?Can I create a log file to search for issues in command line like > name.log?Can I create a log file to search for issues in command line like > name.log?https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/55print-css.rocks "grid" -> unhandled error2021-07-27T11:13:03ZBoris Budiniboris@cloud68.coprint-css.rocks "grid" -> unhandled errorhttps://github.com/zopyx/print-css-rocks/tree/master/lessons/lesson-grid
fails (pagedjs-cli 0.1.3):
```
timeout --foreground -s 9 10 pagedjs-cli -i index.html -o pagedjs.pdf
◴ Loading: index.html(node:1687786) UnhandledPromiseRejection...https://github.com/zopyx/print-css-rocks/tree/master/lessons/lesson-grid
fails (pagedjs-cli 0.1.3):
```
timeout --foreground -s 9 10 pagedjs-cli -i index.html -o pagedjs.pdf
◴ Loading: index.html(node:1687786) UnhandledPromiseRejectionWarning: Error: Evaluation failed: ProgressEvent
at ExecutionContext._evaluateInternal (/usr/local/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:217:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async ExecutionContext.evaluate (/usr/local/lib/node_modules/pagedjs-cli/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:106:16)
at async Printer.render (/usr/local/lib/node_modules/pagedjs-cli/src/printer.js:191:5)
at async Printer.pdf (/usr/local/lib/node_modules/pagedjs-cli/src/printer.js:297:16)
at async /usr/local/lib/node_modules/pagedjs-cli/bin/paged:162:14
(node:1687786) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1687786) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
◶ Loading: index.htmlmake: [../Makefile:17: pagedjs] Error 124 (ignored)
```https://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/54Print a range of pages2021-07-01T11:24:49ZBoris Budiniboris@cloud68.coPrint a range of pagesPuppeteer supports that, would be nice to have that in pagedjs-cli too:
https://pptr.dev/#?product=Puppeteer&version=v10.1.0&show=api-pagepdfoptionsPuppeteer supports that, would be nice to have that in pagedjs-cli too:
https://pptr.dev/#?product=Puppeteer&version=v10.1.0&show=api-pagepdfoptionshttps://gitlab.coko.foundation/pagedjs/pagedjs-cli/-/issues/51Update Puppeteer dependency2021-06-11T13:13:01ZBoris Budiniboris@cloud68.coUpdate Puppeteer dependencyHi,
is it possible to update the Puppeteer dependency to the latest version? Or to remove the version pinning at all?
The current version seems to be a bit outdated and I need to use some newer CSS features (aspect-ratio) that are only ...Hi,
is it possible to update the Puppeteer dependency to the latest version? Or to remove the version pinning at all?
The current version seems to be a bit outdated and I need to use some newer CSS features (aspect-ratio) that are only available in newer versions of Chromium.