Skip to main content
Question

DocumentPDFStyler: Table sorting

  • June 2, 2026
  • 2 replies
  • 40 views

nmegannety
Participant
Forum|alt.badge.img+4

I am creating a table for my PDF report which is sorted on months of the year, I have a sorter just before my DocumentPDFStyler table that feeds it. It sorts the months chronologically, however in the pdf output the order is not respected. I am sorting on the month number ascending, everything in my workspace and the outputs look correct, and then the output is sorted months 1-12 but June appears at the end after December. 

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+71
  • Celebrity
  • June 2, 2026

Can you share your workspace (and some sample data)? Or at least the logic that does the sorting 


debbiatsafe
Safer
Forum|alt.badge.img+22

Hi ​@nmegannety 

It’s worth nothing that PDFDocumentStyler doesn’t add any information about order on output features. The transformer only adds format attributes about table headers, row values, styling, etc.

Document PDF writer will add each item to the output PDF in the order in which features are sent to the writer. In your case, the DocumentPDF writer adds each table row feature to the table in the order that features enter the writer. 

I suspect feature order is changed after the DocumentPDFStyler transformer that creates the table. Moving the Sorter or adding another Sorter directly before the DocumentPDF writer might help.