Enable the same data export of markups functions into a legend creation function. The legend function is somewhat limited and could possibly use the same programming code as the export to CSV file but show up as a legend on the PDF.