SchweizerischeBundesbahnen / ch.sbb.polarion.extension.pdf-exporter

Polarion extension for customised PDF exports
13 stars 0 forks source link

Design PDF Exporter hooks framework #91

Closed nirikash closed 1 week ago

nirikash commented 1 month ago

Description

Currently, users have specific requests regarding the processing of different aspects of PDF exporting, such as coloring specific words and attributes (see #83). Meeting all these requirements can be quite challenging.

To address this, we propose designing a hooks/interceptor framework that allows for custom HTML processing before sending it to WeasyPrint. The PDF exporter will collect and invoke all registered hooks. The integration mechanism can be based on Hivemodule, OSGi services or external Web Hooks.

The input arguments for the hook method will include the HTML stream and context variables. In future steps, it would be beneficial to support not only Java-based hooks but also hooks written in scripting languages.

Motivation

Give flexibility to the users to process exporting HTML using custom code

Proposed Solution (optional)

No response

ukrishne commented 1 month ago

i agree to @nirikash.