Answers.Body: <p><strong>Answer</strong>:
  the easiest way is to add URL-links in the PDF text, because is the unique widespread (standard) option to online interactivity, present in near all PDF-readers. Some variations: 1) a link to a complete online form webpage; 2) one link for each question/answer.</p>
  
  <p><strong>Comment</strong>: <a href="https://ebooks.stackexchange.com/q/2418/2531">why to use PDF? and about EPUB?</a>. EPUB is HTML, so have standard support to HTML interactivity.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-22T16:46:46.303Z
Answers.Text: Two reasons (I may be wrong, though): 1) epub is HTML, but most reader has poor support for JS and other interactivity as far as I know, on the other hand Adobe is pretty standard for PDF and supposedly handle JS 2) epub is dominant of handhold devices, but PDF is still pretty OK wherever, including desktops
Answers.UserDisplayName: Greg
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-22T19:42:13.657Z
Answers.Text: HTML not need Javascript to use forms... But, yes, good reasons for stay with PDF... Well,  similar reasons say to not use Adobe-specific tech. Good links are not a "dream of interface", but in general, with some authentication, is enough.
Answers.UserDisplayName: Peter Krauss
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-22T09:57:43.110Z
Answers.LastActivityDate: 2014-08-22T09:57:43.110Z
Answers.LastEditDate: 2017-04-13T13:00:05.480Z
Answers.UserDisplayName: Peter Krauss
Answers.Body: <p>If you are writing an ebook reading application you can send whatever kind of data you want back to a server that the application knows how to talk to.</p>
  
  <p>However, it sounds like you would like to write your ebooks in PDF so that you could have the PDF contain a form that automatically gets filled in and submitted back to you so you could collect analytics about who is reading your book and how long they have been reading it. This, I think, is not possible without collaboration between the author and an ebook application writer.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-20T02:14:42.257Z
Answers.Text: Thank you. Yes, I was asking PDFs as PDF is a widely used format, and Acrobat allows (encourages?) PDF based forms and similar, active documents.
Answers.UserDisplayName: Greg
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-20T14:32:00.850Z
Answers.Text: Yeah, unfortunately for those forms and interactive documents to work, you have to be viewing them in a PDF viewer that understands those concepts (forms and form submission) and this is not something a large number of ebook reading applications have available at this point.
Answers.UserDisplayName: Brandon Haugen
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-08-19T21:18:06.963Z
Answers.LastActivityDate: 2014-08-19T21:18:06.963Z
Answers.UserDisplayName: Brandon Haugen
Body: <p>Is there any way to send directly data from a PDF document back to a server? </p>
  
  <p>I would like to collect data from readers of an ebook, preferably more or less automatically (with their full consent of the reader). Most ebook reader do not allow to send data e.g. reading analytics back to the writer, however PDF Forms supposedly designed explicitly with the purpose to collect data. However, the exact details and limitations are not clear for me even after reading their website:</p>
  
  <ul>
  <li><p>Can I send any kind of data back to a server, or is there any restriction (e.g. only text that was typed some kind of From field)?</p></li>
  <li><p>Can I send data automatically, e.g. after once the reader set the permissions or every single time I have to wait till the reader pushes some "send" button? </p></li>
  </ul>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-08-22T16:53:53.673Z
Comments.Text: It may not clear from the question, but when i am asking "sending data" I mean running e.g. a JS script and sending data on for example what pages the reader read, what does he do if running some interactive element, e.g. answering a test inside the book.
Comments.UserDisplayName: Greg
Tags: <pdf><security>
Title: Sending data automatically to a server from a PDF document
UserDisplayName: Greg
ThreadText: # Sending data automatically to a server from a PDF document
  
  (Asked by: username_0 on 2014-08-11)
  
  Is there any way to send directly data from a PDF document back to a server?
  
  I would like to collect data from readers of an ebook, preferably more or less automatically (with their full consent of the reader). Most ebook reader do not allow to send data e.g. reading analytics back to the writer, however PDF Forms supposedly designed explicitly with the purpose to collect data. However, the exact details and limitations are not clear for me even after reading their website:
  
  * Can I send any kind of data back to a server, or is there any restriction (e.g. only text that was typed some kind of From field)?
  * Can I send data automatically, e.g. after once the reader set the permissions or every single time I have to wait till the reader pushes some "send" button?
  
  **Tags:** pdf, security
  
  > **Comments:**
  > **username_0**: It may not clear from the question, but when i am asking "sending data" I mean running e.g. a JS script and sending data on for example what pages the reader read, what does he do if running some interactive element, e.g. answering a test inside the book.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2014-08-22. Score: 2 | Accepted answer
  
  **Answer**:
  the easiest way is to add URL-links in the PDF text, because is the unique widespread (standard) option to online interactivity, present in near all PDF-readers. Some variations: 1) a link to a complete online form webpage; 2) one link for each question/answer.
  
  **Comment**: [why to use PDF? and about EPUB?](https://ebooks.stackexchange.com/q/2418/2531). EPUB is HTML, so have standard support to HTML interactivity.
  
  > **Comments:**
  > **username_0**: Two reasons (I may be wrong, though): 1) epub is HTML, but most reader has poor support for JS and other interactivity as far as I know, on the other hand Adobe is pretty standard for PDF and supposedly handle JS 2) epub is dominant of handhold devices, but PDF is still pretty OK wherever, including desktops  
  > **username_1**: HTML not need Javascript to use forms... But, yes, good reasons for stay with PDF... Well,  similar reasons say to not use Adobe-specific tech. Good links are not a "dream of interface", but in general, with some authentication, is enough.  
  
  ---
  
  ### Answer by username_2 on 2014-08-19. Score: 1
  
  If you are writing an ebook reading application you can send whatever kind of data you want back to a server that the application knows how to talk to.
  
  However, it sounds like you would like to write your ebooks in PDF so that you could have the PDF contain a form that automatically gets filled in and submitted back to you so you could collect analytics about who is reading your book and how long they have been reading it. This, I think, is not possible without collaboration between the author and an ebook application writer.
  
  > **Comments:**
  > **username_0**: Thank you. Yes, I was asking PDFs as PDF is a widely used format, and Acrobat allows (encourages?) PDF based forms and similar, active documents.  
  > **username_2**: Yeah, unfortunately for those forms and interactive documents to work, you have to be viewing them in a PDF viewer that understands those concepts (forms and form submission) and this is not something a large number of ebook reading applications have available at this point.  
  
  ---
  
  