ietf-tools / xml2rfc

Generate RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies
https://ietf-tools.github.io/xml2rfc/
BSD 3-Clause "New" or "Revised" License
69 stars 38 forks source link

ToC in PDF output lacks page numbers #558

Closed ietf-svn-bot closed 3 years ago

ietf-svn-bot commented 3 years ago

resolution_wontfix type_defect | by julian.reschke@gmx.de


(reported against *_txt as there does not seem to be a component for PDF output)

In PDF output, the ToC has no page numbers.

However, RFC 7995 says:

"The table of contents, including page numbers, is useful when printed. Section numbers and page numbers in the table of contents should also be hyperlinked to their respective sections in the body of the document." -- https://greenbytes.de/tech/webdav/rfc7995.html#rfc.section.3.1.8


Issue migrated from trac:558 at 2022-02-08 07:10:18 +0000

ietf-svn-bot commented 3 years ago

@henrik@levkowetz.com commented


This is a consequence of generating PDF from pre-rendered HTML. At the HTML rendering step, there is no knowledge of where the page breaks will occur, and the HTML to PDF engine has no mechanism to allow manipulation of the generated ToC during generation of following pages.

With the current implementation choices, page numbers cannot be provide in the PDF.

ietf-svn-bot commented 3 years ago

@rjsparks@nostrum.com changed status from new to closed

ietf-svn-bot commented 3 years ago

@rjsparks@nostrum.com changed resolution from ` towontfix`

ietf-svn-bot commented 3 years ago

@rjsparks@nostrum.com commented


There was a strong requirement in the original request for the renderers that the PDF be generated from the HTML instead of generating it directly. (Remember the long conversations about PrinceXML and later WeasyPrint). Unless we change that design principle, I don't think we can realize this change.

ietf-svn-bot commented 3 years ago

@julian.reschke@gmx.de commented


Paged HTML can have page numbers in the ToC, and this actually works with rfc2629.xslt-produced HTML when run through PrinceXML.

Please re-open.

ietf-svn-bot commented 3 years ago

@julian.reschke@gmx.de uploaded file rfc7991.pdf (507.7 KiB)

Example PDF, produced with PrinceXML from https://greenbytes.de/tech/webdav/rfc7991.html

ietf-svn-bot commented 3 years ago

@tony@att.com commented


this should NOT be closed. It is a bug that should be fixed.

(I don't see an option to reopen it in the Modify Ticket choices.)

ietf-svn-bot commented 3 years ago

@julian.reschke@gmx.de commented


FWIW, I checked WeasyPrint, and it supports page numbers fot his purpose. What's missing is paged media related CSS rule for the Toc.

Please re-open.

ietf-svn-bot commented 3 years ago

@julian.reschke@gmx.de commented


I'll also note that the CSS in the HTML version should actually contain all information for paged media; for instance, it does not include information about headers and footers (which is apparently included in thre HTML passed to WeasyPrint).