Skip to content

Commit

Permalink
add outlines for pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
missdeer committed Jan 25, 2024
1 parent 2bab984 commit 08163e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ebook/pdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ func (m *pdfBook) AppendContent(articleTitle, articleURL, articleContent string)
log.Println("set title font failed", err)
}
m.writeTextLine(articleTitle, m.titleFontSize)
m.pdf.AddOutlineWithPosition(articleTitle)

if err := m.pdf.SetFont(m.fontFamily, "", int(m.contentFontSize)); err != nil {
log.Println("set content font failed", err)
}
Expand Down

0 comments on commit 08163e4

Please sign in to comment.