Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,249 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
java
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Java
Estrellas
4.4k
Forks
714
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LibrePDF/OpenPDF

Todos los issues de LibrePDF/OpenPDF

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.