View Full Version : Adding an additional watermark to already watermarked ePub file


ldardini
01-05-2011, 09:45 AM
Hello,
we are a public library and we want to explore the idea of "lending" ebooks. We want to stay far from DRM limited eBooks, but we find acceptable the watermarked one. To be sure the books we lend are not published on the Internet, we'd like to add another watermark with the name of the user who borrow the eBook. Is there a way to do this? Adding another watermark to an already watermarked ePub file? In the end the eBook will have the watermark from the "book seller" and the watermark of my public library along with the name of the person who borrow the ebook.

Thank you

Leandro

Jellby
01-05-2011, 10:44 AM
What kind of watermark are you thinking about? Just adding the name of the user in the title page (for instance) so that it's visible when reading the book? Yes, that's possible and easy (and it's also easy to remove). Making it automatic might be a bit more tricky, because filenames and XHTML code can vary quite a bit from one book to another.

If you mean a different kind of watermark, please specify.

ldardini
01-07-2011, 04:25 AM
Hello,
thank you for your answer. I am still exploring the way "social" DRM or watermarking is applied. I think I have misunderstood the terms... while a DRM protected file has some encryption in it, a watermark is a clean plain file with some hidden text inside, like comments in JPG images or pattern in the spacing between words. Have I understood correclty?

Thank you

Leandro

Jellby
01-07-2011, 05:21 AM
I think I have misunderstood the terms... while a DRM protected file has some encryption in it, a watermark is a clean plain file with some hidden text inside, like comments in JPG images or pattern in the spacing between words. Have I understood correclty?

Well, I don't think there is a fixed definition of watermark (in this context), but yes, that is correct. Also, a watermark is anything the author/creator of the ebook may want it to be, and it can be obvious (as a "This book was borrowed by John Doe" text in the title page) or hidden (as the things you mention). But, since there is no standard protocol, format or specification, there's no way to know if a given file has a watermark or not, and any modification you do to a file might remove an existing watermark.

In sum, it is possible to add as many watermarks as you want to an ePUB file, but none is 100% safe, as it can be easily removed or invalidated (intentionally or not). Plain text is easy to find and remove. Whitespaces can be altered if someone decides to edit the file (to correct a typo, for example). Comments or watermarks in image files can disappear if a user wants to convert the images to a different format (to save space, or make it work better with his reader...).

Freeshadow
01-08-2011, 04:55 PM
I believe some kind of "watermarking" d'only be possible if one could produce epubs with readonly zip containers.
would certainly help as a step away from DRM; commercial RPG PDFs use watermarking too. If there d'be some epub equivalent to PDF/A it would sure be good.

SeeUsmile
01-03-2012, 01:47 PM
Jellby, Came across this thread, I'm looking for an easy coding to have a disclaimer appear on any page accessed in my epub.....Can you assist?
What kind of watermark are you thinking about? Just adding the name of the user in the title page (for instance) so that it's visible when reading the book? Yes, that's possible and easy (and it's also easy to remove). Making it automatic might be a bit more tricky, because filenames and XHTML code can vary quite a bit from one book to another.
If you mean a different kind of watermark, please specify.

SBT
01-03-2012, 03:12 PM
@Freeshadow: Read-only zip files won't help - nothing to prevent extracting the files and rezipping them in a new zip archive. Only way it would work is if only certain kinds of ereading software had read privileges - and then you have a proprietary DRM system

@SeeUsmile: Apologies for butting in, hope replies from other than the redoubtable Jellby can be of interest too ;-)
The only way I can think of offhand is to put a repeated floating text box/image on the left- or righthand side, sufficiently frequently to ensure that it appears on every page on all viewers.
Not pretty...
In epub3 you'll probably be able to have a fixed header/footer, maybe even a background image?

@ldardini: Watermarking is a subject I find fascinating. As has been commented, it is probably impossible to make a rock solid watermarking solution for epubs. A few points to bear in mind:
Epub watermarking, unlike encryption, depends on the method being secret.
The social aspect of watermarking vs. DRM must be very visibly conveyed. Some kind of preamble that says "Be nice, don't share, 'cause we've been nice and not used DRM. This file has been watermarked visibly and invisibly as your personal copy. We trust you not to try and remove these marks." (It's my conviction piracy has become more rampant because media companies treat their customers with suspicion of criminal intent, which customers then feel compelled to justify;-)
The watermarking must instil a well-founded fear in a would-be pirate that he or she can never be sure of having removed all watermarks from the file.
From this follows that several watermarking methodologies must be used concurrently, and that they must be updated or changed frequently as they are discovered and revealed by pirates.
Except for deliberate visible watermarking, e.g. an "ex libris" or "this book lent to John Doe", the visual appearance of two ebooks with different watermarks must be the same.
Hiding information in images is well-studied.
Hiding information in the zip-file itself is likely to be ineffective, as a would-be pirate will normally find it most convenient to create a new zip archive for their modified copy.
Hiding information in a xhtml/opf file is not so well-studied. I believe there are some commercial solutions. There is a wealth of possibilities in producing quite different files that map to the same visual output. Spacing, line breaks, id tags, even character encoding can all be different in the xhtml encoding and still be equivalent. Unfortunately, this hidden information can be efficiently removed by converting the xhtml to text, and then reencoding the text as xhtml. This method can be made less appealing by closely integrating text and images, by using complex layouts like tables etc.

@Jellby: At first sight it doesn't seem too difficult to automatically insert some kind of ex libris into an epub file.
unzip
Create the ex libris as a standalone xhtml file.
insert references to it in the manifest and spine in the opf file
rezip
Isn't the opf-file fairly strictly defined, with a not too complex xml dtd? Then you should be able to do something like this and be fairly confident of a valid result, shouldn't you?

JSWolf
01-03-2012, 11:01 PM
@Jellby: At first sight it doesn't seem too difficult to automatically insert some kind of ex libris into an epub file.
unzip
Create the ex libris as a standalone xhtml file.
insert references to it in the manifest and spine in the opf file
rezip
Isn't the opf-file fairly strictly defined, with a not too complex xml dtd? Then you should be able to do something like this and be fairly confident of a valid result, shouldn't you?

And that is so easy to remove it isn't funny.

SBT
01-04-2012, 04:20 AM
@JSWolf: You misunderstand me; but then I suppose I should have clarified better that I considered it different from watermarking. Of course it is trivial to remove, and that's why I call it an ex libris and not a watermark. It's just a way of personalizing a copy of an ebook. As such its function is as a psychological barrier against piracy. Hopefully, would-be pirates will think twice before uploading a book whose second page says something like
"This book belongs to John Smith, who apparently has trusted you enough to lend you a copy. Wouldn't it be ungrateful to redistribute it? Of course it is easy to rip out this page, but can you be sure of removing all kinds of hidden watermarks in this book? How would you like it if a book traceable back to you appeared on Pirate Bay?:("

SBT
01-04-2012, 04:25 AM
I suppose a watermark, digital or physical, is characterized by being embedded, and difficult to separate from the medium, without impairing the quality of the information conveyed.

SeeUsmile
01-04-2012, 09:47 AM
@SBT Thank you for the response! I'm a newbie, self taught Im using Indesign 5.5, Sigil and Calibre. My problem is I can't stop trying until I get it right! :) I mastered most things others have tried and given up cause i like a challenge.
With that being said I also, love shortcuts so if you can get me started with the creation of epub3 header/footer solution i can take it from there :)

JSWolf
01-06-2012, 04:49 PM
If you go down the road of ePub 3 now, you'll end up with eBooks that almost nobody can read.

SBT
01-07-2012, 02:18 PM
@SeeUSmile: Sorry, just about the only thing I know about EPUB3 is that it's the all-singing, all-dancing solution to all our problems :)
@JSWolf: Well, somebody has to start making EPUB3 books sometime... Isn't there decent support for fall-back to EPUB2 in the EPUB3 standard? Or is that just wishful imagination on my part?

JSWolf
01-08-2012, 12:37 PM
@SeeUSmile: Sorry, just about the only thing I know about EPUB3 is that it's the all-singing, all-dancing solution to all our problems :)
@JSWolf: Well, somebody has to start making EPUB3 books sometime... Isn't there decent support for fall-back to EPUB2 in the EPUB3 standard? Or is that just wishful imagination on my part?

Sure someone has to start making ePub3 eBooks, but until there is software widely available enough to handle ePub3, it's just a waste of time.

ePub3 software should handle ePub2 eBooks.

DaleDe
01-08-2012, 07:39 PM
One way to add a watermark is to use an SVG image with a bitmap background where the background is the actual image and SVG is used to add some text over the top. If the user does not realize that it is SVG which is not too common then they can change the image only to find that it didn't work.

Dale