Can we add a personalised watermark when printing a PDF?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

Afternoon all. This is an "I wonder if it's possible" question rather than an absolute necessity.

If I host a PDF behind some kind of firewall where the user has to have permission to view a PDF (this would be done using our licensing application, nothing to do with Flare), is there any way that you know of that we could allow the user to print or save the PDF with some kind of PERSONALISED watermark or similar , such as their username, so if the PDF did escape into the wild, it would be obvious where it came from?

I have no idea where to start looking for something like this, and you may well tell me it's just not possible.

As an alternative to that, if I only had HTML5 outputs, would I be able to put a similar restriction on the files so if they print them (or save to a single file) we could add that kind of thing?

Producing a PDF for each user, or even each customer, is not an option because there would be far too many.

Thanks for putting on your creative thinking hats.

EDITED FOR CLARITY
Last edited by ChoccieMuffin on Thu Jan 31, 2019 4:03 am, edited 1 time in total.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Can we add a personalised watermark when printing a PDF?

Post by Psider »

For web output, I think you could put a div in your masterpage that contains the watermark text you want, have it display:none in the default section of the stylesheet, and display:block for @media print.

Assuming you use a master page, of course. :)

I do this to put a "Draft" watermark on my review website (I don't currently have Flare, but I think I also did this at a previous company where I did), and while I don't do it only for printing, the principle is sound.

I can't think of any way to add it on the fly to a pdf, unless your server admins have some tool that could do it. Maybe you could permanently watermark the pdf? Although I assume there's some reason you don't want to do this.


html:

Code: Select all

<div class="draft">
	<p>Draft</p>
</div>
css:

Code: Select all

div.draft { display: none;}
@media print {
	div.draft {
		display: block;
		font-size: 20em;
		opacity: 0.3;
		filter: Alpha(opacity=30);
		position: fixed;
		-ms-transform: rotate(-45deg);
		transform: rotate(-45deg);
		top: 60%;
		left: 40%;
		margin: 0;
		z-index: 3;
	}
}
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

Thanks Psider, but I was thinking of a personalised watermark, such as the user's username, rather than the same watermark on every copy, so if it got out into the wild we'd know which user had let it loose. My bad, I didn't make it clear enough in my original post so I'll go back and edit it for clarity.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Can we add a personalised watermark when printing a PDF?

Post by Psider »

I think you'll need help from developers/web admins for that.

For online help I imagine it should be possible for the devs or server admin to write some little tool that could pass the user name in a format the help could understand, and plug it in to a div like I described. I don't think javascript by itself can do it, for security reasons. Maybe ASP could, if this is all hosted on windows servers? But yeah, devs and web admins. :)

PDF I have no idea about, sorry.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

Thanks, Psider, I'll keep that in mind for when we move forward, I should be able to get a bit of assistance from our devs, if I scream, cry and stomp my foot enough.

Anybody got any suggestions for PDF? Can it be done?
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
AlexFox
Sr. Propeller Head
Posts: 149
Joined: Thu Oct 19, 2017 1:56 am

Re: Can we add a personalised watermark when printing a PDF?

Post by AlexFox »

Check out this thread I made: viewtopic.php?f=10&t=30056

It seems to do what you're after.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

Thanks, AlexFox. I read through the thread (though I couldn't see the images - think you need to upload images to the forums rather than link them however you did) but I don't think that does the trick for me. From what I understand, this is a way to add a watermark where the possible values are included in a variable set, and the watermark is added when the PDF is generated. I wanted to generate a "vanilla" PDF and add a watermark when it's printed. This isn't something I'd expect to be able to do in Flare, I was just wondering if anyone had worked out some fancy fix to allow this to be done.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
AlexFox
Sr. Propeller Head
Posts: 149
Joined: Thu Oct 19, 2017 1:56 am

Re: Can we add a personalised watermark when printing a PDF?

Post by AlexFox »

I can see the images, maybe you have a security setting blocking them?

To achieve what you're describing you'd likely need to embed some JavaScript in each PDF that can update a watermark on the print event, but from what I've read - this won't work in the basic Adobe Reader (that the majority of people use).

Doesn't seem realistic, unfortunately :(
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

AlexFox wrote:I can see the images, maybe you have a security setting blocking them?

To achieve what you're describing you'd likely need to embed some JavaScript in each PDF that can update a watermark on the print event, but from what I've read - this won't work in the basic Adobe Reader (that the majority of people use).

Doesn't seem realistic, unfortunately :(
I feared you'd say something like that, but if you don't ask, you don't know. Thanks anyway.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Can we add a personalised watermark when printing a PDF?

Post by Psider »

I did some googling, and this link indicates there are tools that can do pdfs server-side (dynamic watermarking). Although this one is part of a specialist content server (?). But maybe it'll give you an idea of some words to throw at your devs/IT people. :)

https://docs.oracle.com/cd/E21043_01/do ... ermark.htm
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Can we add a personalised watermark when printing a PDF?

Post by ChoccieMuffin »

Thanks psider. I don't hold out a lot of hope there, tbh. Devs are usually too busy doing other stuff to deal with docs at the best of times. But I appreciate your googling.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Post Reply