Open vishalkrsinha opened 3 years ago
Usually, when it takes more than 30 seconds the reasons is that Paged.js cannot fit the content on a page and loops endlessly.
Any suggestion how to handle such errors.
You should try to reproduce this issue locally. You can also use the --preview
option to open the document in a local browser to troubleshoot (i.e., open DevTools).
Usually, when it takes more than 30 seconds the reasons is that Paged.js cannot fit the content on a page and loops endlessly.
Any suggestion how to handle such errors.
You should try to reproduce this issue locally. You can also use the
--preview
option to open the document in a local browser to troubleshoot (i.e., open DevTools).
Tried running it locally with the same timeout message as a result. Attached is the screenshot for the same.
Not sure, what/how can I troubleshoot the issue?
PS:
Tried using --preview option too but it simply opens it in a local browser.
Yes it should open a local browser with your document. You can then open the DevTools and check the console (if there's any error). You can also inspect the page to make sure that all the content is visible.
Why instead of generating a pdf file, it's generating an HTML file?
Because asciidoctor-web-pdf
is using the browser (i.e., a web page) to generate PDF. So it generates an HTML page and then creates a PDF from it.
Is it possible to share this document? I can try to troubleshoot on my machine.
Is it possible to share this document? I can try to troubleshoot on my machine.
I investigated it further locally & found the root cause for one of my document. Root cause: column widths in a table were not correct. Solution: Changed column widths from fixed width size to 'auto' as below:
Before:
[cols="13,19,18,6,8,8,8,10,10"]
|===
|Trip/open action
|Test Criterion 1
...
Auto-widths:
[cols="auto,auto,auto,auto,auto,auto,auto,auto,auto"]
|===
|Trip/open action
|Test Criterion 1
Will check the same (tomorrow morning) for other documents having Timeout issue & will further update here. Thanks.
Is it possible to share this document? I can try to troubleshoot on my machine.
I have one more document with same timeout issue. But, I couldn't resolve that. Attaching a minimal script that I could prepare for your reference to test & figure out the problem. I guess, issue lies in starting line no 79 (!===). test.txt
Kindly rename the file to .adoc while testing. Thank you in advance.
I have one more document with same timeout issue. But, I couldn't resolve that. Attaching a minimal script that I could prepare for your reference to test & figure out the problem. I guess, issue lies in starting line no 79 (!===).
Paged.js goes into an infinite loop probably because the table contains nested tables (i.e., it contains tables inside table cells).
Paged.js chunker has quite a few issues with tables. The good news is that they are planning on fixing these issues for Paged.js 1.0: https://gitlab.pagedmedia.org/tools/pagedjs/issues/332
The chunker is quite complex and I cannot tell you what exactly you need to change. Using auto width can certainly helps since it makes it easier to fit the content on the page (less constraints).
[cols="auto,auto,auto,auto,auto,auto,auto,auto,auto"]
I don't think this is the right syntax, you should use [cols="9"]
. This definition means that you have 9 columns (and since we don't explicitly specify width, column will be adjusted automatically).
If I remove the sixth row (headEfficiencyOption
) then I get a PDF:
I believe that the nested table is too large and Paged.js cannot figure out how to fit it into the page (looping indefinitely).
Using below Azure-Devops build pipeline script to install asciidoctor-web-pdf on 'ubuntu-latest'.
And getting below installation step result log.
But while using 'asciidoctor-web-pdf' command like below to convert pdf file with latex equations:
asciidoctor-web-pdf $src -o $dest -a stem
get below error message:
Any suggestion how to handle such errors.