watermark a pdf transform
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
watermark a pdf transform
Post by Jeff_Reynolds »
Does anyone have a setup for passing a string from a DITA Scenario parameter (like args.css.param.watermark), to watermark a pdf?
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: watermark a pdf transform
Post by julien_lacour »
Hello,
What Oxygen version are you using and what transformation scenario are you running?
Regards,
Julien
What Oxygen version are you using and what transformation scenario are you running?
Regards,
Julien
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Re: watermark a pdf transform
Post by Jeff_Reynolds »
Hi Julien,
I have Editor 23.0. I am running a PDF xform using HTML & CSS, through the Ashes publishing template (with some CSS changes).
I have Editor 23.0. I am running a PDF xform using HTML & CSS, through the Ashes publishing template (with some CSS changes).
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: watermark a pdf transform
Post by julien_lacour »
Hello,
The How to Add a Draft Watermark on All Pages topic from our user-guide will surely help you.
Starting with Oxygen 25.0 it is possible to add the watermark in the foreground, if you upgrade to this version you can follow this topic instead.
Regards,
Julien
The How to Add a Draft Watermark on All Pages topic from our user-guide will surely help you.
Starting with Oxygen 25.0 it is possible to add the watermark in the foreground, if you upgrade to this version you can follow this topic instead.
Regards,
Julien
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Re: watermark a pdf transform
Post by Jeff_Reynolds »
If there any way to pass a string in at build time?
-
- Posts: 39
- Joined: Mon Jul 25, 2022 11:18 am
Re: watermark a pdf transform
Post by andrei_pomacu »
Hi,
You could pass a string as a watermark path using a custom parameter.
Firstly, you need to create a new parameter with args.css.param as prefix, your parameter could look like this args.css.param.watermark and have as values the path towards an image file.
To create a parameter in Oxygen you need to edit your transformation scenario and add a new parameter with the name and value like in the picture below.
Here is an example of how CSS rule should look like:
Regards,
Andrei
You could pass a string as a watermark path using a custom parameter.
Firstly, you need to create a new parameter with args.css.param as prefix, your parameter could look like this args.css.param.watermark and have as values the path towards an image file.
To create a parameter in Oxygen you need to edit your transformation scenario and add a new parameter with the name and value like in the picture below.
new_param.png
To actually add the image in the PDF view you need to catch the parameter value and and use it in PDF using CSS. To do that you need to use oxy_xpath() function. In the oxy_xpath you must locate the parameter added, so you need to catch it using the name after the args.css.param prefix. If you created an args.css.param.watermark parameter, the function will be oxy_xpath('/*/@*[local-name()="watermark"][1]').Here is an example of how CSS rule should look like:
Code: Select all
@page {
background-image: url(oxy_xpath('/*/@*[local-name()="watermark"][1]'));
background-position: center;
background-repeat: no-repeat;
background-size: your_width your_height;
}
Andrei
You do not have the required permissions to view the files attached to this post.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service