-1

I am using epub.js javascript plugin to render epub file in a web application. This is my sample code

 <!-- EPUBJS Renderer -->
 <script src="../build/epub.js"></script>

 <script>
         "use strict";
         var Book = ePub("https://s3.amazonaws.com/moby-dick/");
</script>

<body>
    <div id="main">
      <div id="prev" onclick="Book.prevPage();" class="arrow">‹</div>
      <div id="area"></div>
      <div id="next" onclick="Book.nextPage();" class="arrow">›</div>
    </div>

<script>
   Book.renderTo("area");
</script>

</body>

It works fine and render epub as iframe inside div element. I just want to prevent copying of epub content from browser. Disabling mouse event is a option bt by inspecting browser epub file content is visible and can be easily copied from there. I just want to avoid that. Loading epub content as canvas seems a good idea to achieve this.

Are there any ways to load epub inside canvas or please suggest any other ways to prevent copying epub content from browser.

Is there any epub.js option to do achieve the same ? enter image description here

Yadhu Krishnan
  • 102
  • 2
  • 2
  • 7
  • That's just as pointless isn't it? I can view the source and then get the data by issuing a request direct to https://s3.amazonaws.com/moby-dick/ – Robert Longson Jul 19 '16 at 10:38
  • epub url used here is for demo purpose. actual epub url is dynamically generated by server which changes for every request to particular epub. Its the security we are implementing from our side. – Yadhu Krishnan Jul 19 '16 at 11:02
  • 2
    OK then, if I can't find your content in the DOM, I'll grab it from the network. Dev tools, telerik fiddler, wireshark. Pick my tool. – John Dvorak Jul 19 '16 at 11:08
  • What's the point of using EPUB if you end up "drawing" the text to a canvas? Just convert your EPUB to images on your backend, and serve those. (Yes, you can allow e.g. multiple font sizes by generating different sets of images, one for each reading setting.) (And, if I might add my humble opinion, your company is trying to solve a biz problem with technical means --- basically, some sort of "light" DRM --- something that is always circumventable. Did you consider watermarking your contents instead?) – Alberto Pettarin Aug 28 '16 at 15:55

1 Answers1

1

I sincerely doubt you'll be able to accomplish this; even if you render the document to an image, the text can easily be scraped from the image using every-day tools such as OneNote. I'd be very wary of making anything copy-righted you don't own the rights to publicly available in the manner you're suggesting.

  • People make things that are copy-righted available all the time, they simply use copyright law to enforce their rights. – Robert Longson Jul 19 '16 at 10:50
  • We own full rights to all files since we are creating them. The file used here is for just demo purpose. Scrapping of images using tools is not an issue, we just want to reduce threat maximum as possible at least from those dont have much technical knowledge about such tools. – Yadhu Krishnan Jul 19 '16 at 11:09