ggrossetie / asciidoctor-web-pdf

Convert AsciiDoc documents to PDF using web technologies
https://asciidoctor.org
MIT License
455 stars 92 forks source link

Page break issue and header-footer issue #678

Open aksigkvgithub opened 1 year ago

aksigkvgithub commented 1 year ago

Let me congratulate the entire teams of asciidoctor-web-pdf, who have made their best contribution in terms of creating a correct pdf output of an asciidoctor .adoc file. Even the asciidoctor-pdf is not rendering any of stem block (both asciimath and latexmath) without the asciidoctor-mathematical gem, which does not install despite hundereds of my efforts. Docker hangs my computer, so much memory it demands. I have tried the old solutions too, eg. asciidoctor-fopub, which also fails to be built by gradle, due to various types of unknown version issues.

In my pursuit, I found this asciidoctor-web-pdf, which was easily installed with node.js. And I could render a very nice output from it.

However, I wish to point out two issues, which may be taken as a feedback:

1) there seems to be page break issue a the wrong place in the pdf 2) I am not able to produce header-footer in the pdf 3) For your perusal, am attaching below all the relevant files of one my academic prouject, named: 'Missing plot technique' 4) For your information, let me add that I had to convert all the .adoc and .yml files to .txt format because github was not allowing them to be submitted.

If possible kindly guide me. Thanking in advance.

Missing plot technique in designs.txt

1.Introduction-missing-plot.txt

2.Missing-plot-in-CRD.txt

3.Missing-plot-in-RBD.txt

4.Missing-plot-in-LSD.txt

Missing plot technique in designs-web.pdf

ggrossetie commented 1 year ago

Hey, thanks!

there seems to be page break issue a the wrong place in the pdf

Could you please take screenshots on where you think the page break is at the wrong place? We are using Paged.js which tries its best but sometimes you will need an explicit page break.

I am not able to produce header-footer in the pdf

What did you try? Do you have an example of footer that you want to include? Did you read https://github.com/ggrossetie/asciidoctor-web-pdf#running-elements ?

For your perusal, am attaching below all the relevant files of one my academic prouject, named: 'Missing plot technique' For your information, let me add that I had to convert all the .adoc and .yml files to .txt format because github was not allowing them to be submitted.

👍🏻

aksigkvgithub commented 1 year ago

Thank you, Sir, for your quick reply,

Could you please take screenshots on where you think the page break is at the wrong place? We are using Paged.js which tries its best but sometimes you will need an explicit page break.

Sir, I have already attached the pdf file,

Missing plot technique in designs-web.pdf

generated from the project. In that, you can see the break at page number-1 is not proper, because the para number ii., at the end of page-1, should have gone to next page, instead what is happening is that the para number ii. remains at the page-1 itself while its text paragraph goes to page-2.

If you see at the end of page-5, a single block of 6 rows table breaks at row-3 and goes to page-6, whereas there is a lot of space at page-5 itself where it could have been printed.

At the end of page-6, lot of space is left and whole lot of R-codes go to page-7, whereas it could have been broken at appropriate row at page-6 only.

Again, at the end of page -8, a similar break of para v. occurs just as at page-1, wherein the number v. is at page -8 itself, whereas its text-paragraph goes to page-9..

Next, similar to what occurred at page-6, occures at page-13 too, wherein a whole lot of R-codes goes to page-14, whereas a lot of space is still available at the end of page-13, and it should have broken at some appropriate row at the end of page-13.

What did you try? Do you have an example of footer that you want to include? Did you read https://github.com/ggrossetie/asciidoctor-web-pdf#running-elements ?

Yes. I did see the instructions of how to include extended theme for running-elements in the asciidoctor-manual; and accordingly I have included all my article sections and pdf theme files. Let me explain below:

Please look at my main project file already attached as,

Missing plot technique in designs.txt

wherein please change the extension .txt to .adoc, because the github does not allow to submit the .adoc files. In this main project file I have included the attribute,

:includedir: Missing-plot-Sub-folders

for inluding all my sub-articles, already submitted at links, in that order, as

1.Introduction-missing-plot.txt 2.Missing-plot-in-CRD.txt 3.Missing-plot-in-RBD.txt 4.Missing-plot-in-LSD.txt

Please change all extensions .txt to .adoc. Apart from above I have also included the following attributes in the main project file for running-elements for footer as follows:

:pdf-themesdir: resources/themes/extend-theme.yml :pdf-theme: extend

Earlier I had forgotten to send you the theme files, so, I am attaching them now as follows:

extend-theme.txt

footer-theme.txt

These files were placed in appropriate relative subdirectories of the project directory "Missing plot technique in designs" according to the pdf theme attributed explained above. Please also change here too the file extensions of theme files in aprropriate sub-directories from .txt to .yml for the reasons of github filters, which does not allows the .yml file too.

If any typo is there, then kindly excuse me.

Please guide me if you can find some solution.

Thanking you in advance.