## Print2Flash Document API Sample for HTML5 documents

### Sample function:

This sample demonstrates how a Print2Flash document in HTML5 format can be embedded into a web page and programmatically manipulated using Print2Flash Document API.

### Installation instructions:

1. Unpack the sample folder to disk.
2. Upload the sample files to a web site.

### Usage instructions:

The sample contains the following major files:

- sample.html - sample source code;
- docviewer.html - standard Print2Flash document viewer;
- doc.xml file and doc_files folder - Print2Flash document that is used in the sample obtained by conversion of a document to Flash using Print2Flash.

To launch the sample, just launch a web browser and open the sample.html page from the web site. You should see a sample HTML5 document embedded in a web page. You can manipulate the document either from its native gray toolbar or using buttons located above the document. These buttons are contained in the sample web page and the button clicks are communicated to the embedded Print2Flash document via Print2Flash Document API. Above the Print2Flash document you should see a current page number indicator which is updated if you scroll the document. These updates are performed with Print2Flash Document API events.

Note that security policy in some browsers may not allow this sample to work directly from disk. That's why you may need to upload the sample files to a web site.

To see the source code, you need to open the sample.html file in a text editor. Of course, you can load your own Print2Flash documents using this sample. Note that to access Print2Flash documents via Print2Flash Document API you should clear "Disable Print2Flash Document API support" option in the Protection tab of Document Options window when converting the document.

Copyright (C) Print2Flash Software. All rights reserved | www.print2flash.com