Not exactly sure what to do for the trees (probably offer a choice of download the PML vs. download the tree currently visible). But for tabular outputs from filters it is clear, download the whole table (regardless of how much is currently visible).
Maybe can reuse code from Kontext, which offers tabular formats. Or maybe just save TSV in UTF-8 and that is it.
Not exactly sure what to do for the trees (probably offer a choice of download the PML vs. download the tree currently visible). But for tabular outputs from filters it is clear, download the whole table (regardless of how much is currently visible).
Maybe can reuse code from Kontext, which offers tabular formats. Or maybe just save TSV in UTF-8 and that is it.