php - What is the best way to create toc (Table of Content) with DOMPDF? -


i have 3 ways create toc dompdf, , don't know choose ..

the problem: know page numbers after rendering, want toc in advance of document.

all 3 methods use inline php write content in global array

  1. after creating pdf dompdf, create second pdf toc , merge them, using fpfi

    • fpdi reduce styling
  2. after creating pdf dompdf, , remembering contents, generate pdf second time toc, adjusting page numbers

    • dont repeat yourself
    • consistent environment
  3. use placeholder toc , fill after rendering pdf

    • don't know if working

any experts in dompdf have favourite solution ?

wolfgang


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -