Lurker News

Comments (265) 53 threads

Earlier comments
buovjaga1 reply#
I tried out paged.js recently for a genealogical report exported from Gramps, but I had to use PrinceXML because counter-reset to start at a page does not work: https://gitlab.pagedmedia.org/tools/pagedjs/issues/91

Apart from this feature everything worked fine.

abhinav222 replies#
Do you have a repo I could play around with? I had the same issue, but for my use case I figured a work around - primarily by using classes. I could spend a few minutes and see if I can get it working for you.

But yes, it’s a deficiency in the system currently

julientaq#
I would be happy to see it too.

Reset page number using counter is working: https://codepen.io/julientaq/details/MWammZV
The property needs to be set to the element, and not to the @page.
But we may have missed a bug though, so i’ll be happy to check your code.

buovjaga#
Sorry, I forgot to check replies! This is the CSS:

  #grampstextdoc {
      counter-reset: page 7;
  }
  @page {
      margin: 2cm 3cm;
      @bottom-center {
          content: counter(page);
      }
  }
dukeofdoom#
Adobe makes it harder and harder to use their PDF reader. I live in Canada, and somehow I'm given forms I legally have to use, that I can only print out in adobe reader v10. I need to go through hassle of installing and uninstalling their terrible product couple times a year.
asaibx2 replies#
This looks great -- well done! I'd love to be able to use it (the CSS in particular) in a number of different projects where creating such nice readable output is a hassle. However I couldn't find a license mentioned anywhere -- either for the associated repo as a whole [0] or the CSS specifically.

Would it be possible to add a license so it's possible to know whether others can use this in other projects without rewriting the CSS from scratch?
[0]: https://github.com/ashok-khanna/pdf

abhinav221 reply#
Thanks :) It’s all free, I will figure out how to add the license tomorrow as I don’t know what’s the right one - basically don’t want people to have any issues with GPL so if I understand then MIT is the right one?

Also paged.js is the property of their team, together with the script of toc.js whilst MathJax is the property of their team too. Have to figure out how to word it.
But if anyone is reading in the meantime, it is open source, no need to attribute anything back to me for my parts. If you are using the text of the guide, you could mention my name, but don’t sweat it either - it wasn’t particularly involved in terms of writing (the hard part was choosing which parts to write about so it’s not too complex but also not too barebone).

adamjhyde1 reply#
Hi, Adam here from Pagedjs. Pagedjs is MIT. Mathjax is Apache 2.0 and isn't part of our work :) Wonderful as it is...we can't claim credit for it! (We Love MathJax - https://github.com/MathJax/MathJax)
abhinav22#
Thanks Adam! I know I come across as one of the biggest fans of paged.js, but it’s such an inspirational project!

The idea to polyfill the required functionality for CSS Print Rules is pure genius, as somebody who looked at all the alternatives. It’s a great example of thinking outside the box.
Thanks again!!

abhinav22#
Also feel free to email me / send me a message on GitHub if you need any help in customizing parts of your CSS. I feel like I have become a guru in this now and can quickly figure out how to use it for specific goals :D

I may write a book on typesetting with CSS, the quality of what is on the web is not the best, but it seems like a huge time sink at the same time...

sharikous#
For me, the best way to read something is a media that is limited in the x direction but has no page limits and can go down as needed. Like most of the websites. Foldable sections, hyperlinks and floating TOCs, are a bonus too.

This is ideal for reading from a tablet or from a desktop and is somewhat printable too,
Unfortunately most tools for producing PDFs from HTMLs assume you want to divide them into pages, and there is no easily produceable "reading format" as widely adopted as PDF. Those page cuts are so annoying when you read from digital media.

Load more comments