Coder Social home page Coder Social logo

Comments (5)

MarcinZiabek avatar MarcinZiabek commented on May 18, 2024 1

The suggested feature is analyzed and planned to be implemented in one of the nearest updates. W know which changes are required to make it work. I am not able to provide any exact time roadmap though.

In case of any suggestions or requirements, let's continue the discussion here.

from questpdf.

MarcinZiabek avatar MarcinZiabek commented on May 18, 2024 1

Update: good news! I am working on this change right now. Please expect this feature to be available in the next release 2021.08. Any updates regarding API design and breaking changes I will post here.

from questpdf.

MarcinZiabek avatar MarcinZiabek commented on May 18, 2024 1

@MarkoH17 This functionality is available within the QuestPDF 2021.08 release.

Please refer to the documentation about placeholders in the PageNumber element: https://www.questpdf.com/documentation/api-reference.html#page-number

As well as to the internal example with a table of content: https://github.com/QuestPDF/library/blob/main/QuestPDF.ReportSample/Layouts/TableOfContentsTemplate.cs

from questpdf.

MarcinZiabek avatar MarcinZiabek commented on May 18, 2024

@MarkoH17 Thank you for your suggestion. Indeed, it is a missing feature that many may find really important. I am aware that the QuestPDF library lacks the ability to create tables of contents and show the total number of pages on each page. I am struggling with how to exactly implement such features. In most common implementations, it is common that you need to perform the layouting algorithm twice which may significantly reduce the performance. Once - to get information about page number where the given element has appeared, and then second - to draw the content with proper information. To some extent, with specifically crafted layouts, you may need an infinite number of passes.

I will try to fit this feature in one of the future updates. So far, I am planning to improve text rendering capabilities, debugging experience and redesign documentation.

Do you have any suggestions how the API may look like for such mentioned table of contents feature? I see it may be a special component/element or some kind of text tags that will be replaced with values during report rendering.

from questpdf.

MarkoH17 avatar MarkoH17 commented on May 18, 2024

@MarcinZiabek This is great! I will test this out on a few projects I have going. Closing this issue, as support for page numbers was added in the 2021.08 release.

from questpdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.