locked
Developing a web based e-book app RRS feed

  • Question

  • User-1244191539 posted

    Good day

    Does anyone know of an api to be used to develop a web based e-book reader app with Web Forms?

    My client is distributing free academic reading material and does require a simple free solution.

    I have no idea where to start!

    Looking forward to hear from you.

    Jaco Pretorius

    Monday, March 16, 2020 3:26 PM

Answers

  • User-1330468790 posted

    Hi, Systellence,

     

    For your first question: 

    • Is this Google API for free or are there fees payable? 

    You don't need to pay for it. However, you will always use the viewer combined with Google book API which has a requirement of three terms of service:.

    https://developers.google.com/books/terms

    1.Fees: 

    You may not charge users any fee for the use of your application, unless you have entered into a separate agreement with Google or obtained Google's written permission.

    2.Content Removal:

    You must remove from your site or application any content provided through the Books API that is alleged to infringe the rights of third parties to the extent required by applicable law or upon request from Google. You also will provide contact information that rights holders can use to contact you and request removals.

    3.Privacy:

    You must notify users of your websites and applications that any content they submit through the Books API, including their name or nicknames, may be made publicly available on Google services as described by the Books Privacy Policy at https://books.google.com/googlebooks/privacy.html and Help Center article at https://support.google.com/books/bin/answer.py?hl=en&answer=100088.

     

    For your second question: 

    • Will it be easy to make the documents only printable or perhaps only available for viewing purposes?

    As far as I know, I am afraid that there is no way to limit the abilities about printing or downloading if you are using the embedded file viewer. When the user can view the file, the file is already downloaded in the client side.

     

    Notice:

    According to your description, it seems that you have your own PDF materials so that what you need might be a viewer with functionalities that

    • Encodes the PDF file and decodes the file and display it.
    • Set controls for printing it (when user is able to print the file, it should be downloaded somewhere in user'site).

    However, it is very difficult to find a free version of this kind of viewer.  There are some free trial versions but still need to pay after free trial.

    What's more,  Google API is often used together with the Google Books API while it might not fit your requirement

     

    Sorry if the information does not help.

     

    Best regards,

    Sean 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 18, 2020 2:18 AM

All replies

  • User-1330468790 posted

    Hi, Systellence,

      

    It depends on what kind of e-book you use. There should be many approaches to implement an e-book reader.

    Could you please provide more details?

      

    For example, if you have lots of PDF materials for readers, you could either

    • bind the url of the material inside an embedded <object/> element. (not compatible for IE 8)

    Or

    • choose to use google books api if you are accessing the e-book on the list of google books.

      

    More details, you can refer to below code:

    Script:

    <script type="text/javascript" src="https://www.google.com/books/jsapi.js"></script>
        <script type="text/javascript">
            google.books.load();
    
            function initialize() {
                var viewer = new google.books.DefaultViewer(document.getElementById('viewerCanvas'));
                viewer.load('ISBN:0738531367');
            }
    
            google.books.setOnLoadCallback(initialize);
        </script>

    .aspx Page:

     <div>
                <asp:LinkButton ID="lnkView" runat="server"  Text="View PDF Object" OnClick="View" ></asp:LinkButton>
                <hr />
                <label>Embed Object: Not compatible with IE 8:</label>
                <br />
                <asp:Literal ID="ltEmbed" runat="server" />
                <hr />
    
            </div>
            <div>
                <label>Google PDF viewer: iframe</label>
                <br />
                <div id="viewerCanvas" style="width: 600px; height: 500px"></div>
            </div>

    Code behind:

    protected void Page_Load(object sender, EventArgs e)
            {
    
            }
    
            protected void View(object sender, EventArgs e)
            {
                string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"1000px\" height=\"800px\">";
                embed += "If you are unable to view file, you can download from <a href = \"{0}\">here</a>";
                embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
                embed += "</object>";
                ltEmbed.Text = string.Format(embed, ResolveUrl("~/Images/lifeCycle.pdf"));
    
                
            }

    Demo:

    Google files loaded when the page is loaded.

    Click button will load local files. 

    Google API Reference:

    https://developers.google.com/books/docs/viewer/developers_guide

    Hope this can help you.

    Best regards,

    Sean

    Tuesday, March 17, 2020 3:27 AM
  • User-1244191539 posted

    Good day Sean,

    I appreciate your feedback! The client is a non-profit organization that has to make academic material available as they support the design of roads etc. They will use PDF documents where their audience should not be able to download the PDF but perhaps only print them. They have to know who accessed the material etc and through that alert the users if there are new revisions of the documents etc. So it is a simple solution they need. Because they are a non-profit organization they don't want to pay an institution to publish their documentation.

    So in short:

    • PDF documents only to be printed
    • Simple interface

    Is this Google API for free or are there fees payable? Will it be easy to make the documents only printable or perhaps only available for viewing purposes?

    Again, thank you very much!

    Kind regards,

    Systellence

    Tuesday, March 17, 2020 6:09 AM
  • User-1330468790 posted

    Hi, Systellence,

     

    For your first question: 

    • Is this Google API for free or are there fees payable? 

    You don't need to pay for it. However, you will always use the viewer combined with Google book API which has a requirement of three terms of service:.

    https://developers.google.com/books/terms

    1.Fees: 

    You may not charge users any fee for the use of your application, unless you have entered into a separate agreement with Google or obtained Google's written permission.

    2.Content Removal:

    You must remove from your site or application any content provided through the Books API that is alleged to infringe the rights of third parties to the extent required by applicable law or upon request from Google. You also will provide contact information that rights holders can use to contact you and request removals.

    3.Privacy:

    You must notify users of your websites and applications that any content they submit through the Books API, including their name or nicknames, may be made publicly available on Google services as described by the Books Privacy Policy at https://books.google.com/googlebooks/privacy.html and Help Center article at https://support.google.com/books/bin/answer.py?hl=en&answer=100088.

     

    For your second question: 

    • Will it be easy to make the documents only printable or perhaps only available for viewing purposes?

    As far as I know, I am afraid that there is no way to limit the abilities about printing or downloading if you are using the embedded file viewer. When the user can view the file, the file is already downloaded in the client side.

     

    Notice:

    According to your description, it seems that you have your own PDF materials so that what you need might be a viewer with functionalities that

    • Encodes the PDF file and decodes the file and display it.
    • Set controls for printing it (when user is able to print the file, it should be downloaded somewhere in user'site).

    However, it is very difficult to find a free version of this kind of viewer.  There are some free trial versions but still need to pay after free trial.

    What's more,  Google API is often used together with the Google Books API while it might not fit your requirement

     

    Sorry if the information does not help.

     

    Best regards,

    Sean 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 18, 2020 2:18 AM
  • User-1244191539 posted

    Hi Sean

    You have been a great help! Much appreciated!

    Kind regards,

    Wednesday, March 18, 2020 4:29 AM