Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Drawing TOC in a specific page/area #529

Open
ricardogama opened this issue Sep 28, 2023 · 0 comments
Open

[FEATURE] Drawing TOC in a specific page/area #529

ricardogama opened this issue Sep 28, 2023 · 0 comments

Comments

@ricardogama
Copy link

ricardogama commented Sep 28, 2023

Is your feature request related to a problem? Please describe.

We're trying to generate a document where the first page includes some content, let's say a title, an image, and a small table, and also the Table of Contents (TOC).

Currently the TOC functionality always renders a dedicated page as first page of the document (or second if DrawFirstPage is not set).

Since in our example the TOC is fairly small (just a couple of lines), it makes a huge waste os space and overall harder to navigate the document by having it as a separate page, while it makes more sense to include it in the first page with the other elements.

Describe the solution you'd like

Either:

  • Render the TOC in a specific place, let's say same as c.Draw, where we could easily include the TOC like any other element, like an image or a table.
  • (less flexible) Allow customization functions to the TOC struct, like AddImage or DrawBefore, so we could include other elements to the TOC page.

Context

The idea is to achieve something like this (poor image editing skills):

Screenshot 2023-09-28 at 4 14 49 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant