Using PDFNet SDK to view and fill out PDF forms on the web.

Q: I am interested in developing the following solution, please tell me if this can be done using your product (PDFNet SDK).

  1. I need to open a pdf that has interactive fields on it
  2. extract all the data that is not interactive as an image
  3. get all the interactive form elements
  4. create an html page having as background image the image from step 2
  5. create html elements (text boxes, checkboxes, dropdowns) on top of the background image so that the user can input the data from within the html form instead of the interactive pdf. Of course all these elements must be placed correctly over the corresponding background image fields (is there a way to get the relative positions of each interactive element?)

A: You can use PDFNet SDK for everything on your list. Depending on your technical requirements there are multiple ways to implement the solution.

  1. I need to open a pdf that has interactive fields on it
  1. extract all the data that is not interactive as an image

For example, please see PDFDraw sample:

PDFDraw: http://www.pdftron.com/pdfnet/samplecode.html#PDFDraw

Alternatively you could convert PDF to HTML along the lines of the following sample:

http://www.pdftron.com/pdfnet/samplecode.html#Pdf2Html

  1. get all the interactive form elements

You can extract forms and other annotation types as shown in the following samples:

InteractiveForms: http://www.pdftron.com/pdfnet/samplecode.html#InteractiveForms

Annotation: http://www.pdftron.com/pdfnet/samplecode.html#Annotation

As an alternative to building your own AJAX viewer you may want to consider using SilverDox ( http://www.pdftron.com/silverdox). The form handling cam be implemented along the lines of markup functionality - by implementing custom annotations (http://www.pdftron.com/silverdox/samplecode.html). SilverDox is currently available as Silverlight SDK, however HTML5 and Flash viewers will be available in the near future.