Skip to content

Add sorting hook for dw2pdf plugin#328

Open
annda wants to merge 1 commit intosamuelet:masterfrom
cosmocode:dw2pdf
Open

Add sorting hook for dw2pdf plugin#328
annda wants to merge 1 commit intosamuelet:masterfrom
cosmocode:dw2pdf

Conversation

@annda
Copy link

@annda annda commented Dec 2, 2025

Recent refactoring of dw2pdf has introduced a new event DW2PDF_NAMESPACEEXPORT_SORT.

This PR adds a simple sort function which sorts pages based on their indexmenu tag (indexmenu_n).

This sorting will only take place if dw2pdf receives parameter book_order=indexmenu or book_order=indexmenu_strict. In the strict mode, tags are required for PDF export and an exception will be thrown if one of the pages is missing a tag.

@annda annda force-pushed the dw2pdf branch 2 times, most recently from 5060131 to 98cad17 Compare January 27, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant