Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Easy table of content feature with go to links and page numbers

Aperta
#1,249 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

The issue proposes adding a BookmarkPageNumber class that resolves a bookmark’s page number when the document closes, but names no source files or tests. First read the document closing and bookmark handling code, then check how generated page numbers can be covered by tests. Done means a table of contents can show links and the correct page numbers for bookmarked content.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Is your feature request related to a problem? Please describe.
I need to generate a PDF containing a table of content with go to links and page numbers at the beginning of the document.

Describe the solution you'd like
It would be amazing to have a way to insert a page number of a bookmark that was not currently known. Maybe something like this could be done to fill the table of content with page number:

final Paragraph par = new Paragraph();
final Chunk c = new Chunk(chapTitle));
c.setLocalGoto(bookmark);
par.add(c);
par.add(new Chunk(new DottedLineSeparator()));
par.add(new Chunk(new BookmarkPageNumber(bookmark));
summaryChapter.add(par);

I imagine a class BookmarkPageNumber taking a bookmark name as parameter and will write the page number when the document is closed.

Describe alternatives you've considered
The only way I found is to insert the table of content at the end of the book.

Your real name
no

Additional context

Lingua principale
Java
Stelle
4.4k
Fork
714
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di LibrePDF/OpenPDF

Tutte le issue di LibrePDF/OpenPDF

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.