From e241d5e0f34c381403c96e5cae3980866e28fb24 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Thu, 14 Aug 2025 13:50:48 +1000 Subject: [PATCH] DOC-2503: Add example to exportpdf_converter_style for configuring watermarks to exported document. --- .../exportpdf_converter_style.adoc | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/ROOT/partials/configuration/exportpdf_converter_style.adoc b/modules/ROOT/partials/configuration/exportpdf_converter_style.adoc index c71f611982..bab144bf40 100644 --- a/modules/ROOT/partials/configuration/exportpdf_converter_style.adoc +++ b/modules/ROOT/partials/configuration/exportpdf_converter_style.adoc @@ -26,4 +26,26 @@ tinymce.init({ }, exportpdf_converter_style: 'p { color: cyan !important }' // requires both "exportpdf_converter_style" and "exportpdf_service_url" to be set. }); +---- + +[TIP] +Watermarks can be added to exported PDF documents using CSS. Add the watermark styles to the `exportpdf_converter_style` option, targeting `body::after` instead of `#tinymce::after` for proper rendering. For more information see: link:https://exportpdf.converter.tiny.cloud/docs#section/General/CSS[General/CSS]. + +=== Example: Adding watermarks to exported PDF documents + +[source,js] +---- +exportpdf_converter_style: ` + body::after { + content: "CONFIDENTIAL"; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) rotate(-45deg); + font-size: 48px; + color: rgba(0, 0, 0, 0.1); + z-index: 1000; + pointer-events: none; + } +` ---- \ No newline at end of file