NoPrint macro ignored from TOC generation

Description

During our evaluation if "Content Exporter" might be a suitable solution for exporting requirements documents, we found an issue with the TOC generator.
We discovered a problem when trying to PDF-export a page including Content excluded with the noprint-macro (see [1]).
The text and other elements are ignored regularly for the PDF export.
But when it comes to headings, these headings are ignored for the page content export, but headings inside this noprint-area are still included in the TOC generated from Content Exporter.
The Input is hidden from Export via CSS with ".noprint{ display: none ; }", as suggested from Atlassian in [1].

Is there any way to exclude partial content of pages during export even not showing up in the TOC, but being visible inside the page?

[1] https://confluence.atlassian.com/doc/advanced-pdf-export-customizations-198806890.html#AdvancedPDFExportCustomizations-HidingTextfromthePDFOutput

Environment

None

Preliminary Test Cases

None

Assignee

Daniel Marczisovszky [META-INF]

Reporter

Alexandra Terék

Labels

None

Access to limited visibility issues

None

Product platform

None

Ready for Development

None

Target version

None

Priority

Major