Skip to content

Commit c1dc843

Browse files
authored
DOC-2503: Add example to exportpdf_converter_style for configuring watermarks to exported document. (#3819)
1 parent 60dafc2 commit c1dc843

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

modules/ROOT/partials/configuration/exportpdf_converter_style.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,26 @@ tinymce.init({
2626
},
2727
exportpdf_converter_style: 'p { color: cyan !important }' // requires both "exportpdf_converter_style" and "exportpdf_service_url" to be set.
2828
});
29+
----
30+
31+
[TIP]
32+
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].
33+
34+
=== Example: Adding watermarks to exported PDF documents
35+
36+
[source,js]
37+
----
38+
exportpdf_converter_style: `
39+
body::after {
40+
content: "CONFIDENTIAL";
41+
position: fixed;
42+
top: 50%;
43+
left: 50%;
44+
transform: translate(-50%, -50%) rotate(-45deg);
45+
font-size: 48px;
46+
color: rgba(0, 0, 0, 0.1);
47+
z-index: 1000;
48+
pointer-events: none;
49+
}
50+
`
2951
----

0 commit comments

Comments
 (0)