Git Product home page Git Product logo

acs-php-viewing-sample's Introduction

ACS PHP Viewing Sample

This is a PHP document viewer sample for using Accusoft's Cloud Services to view a document. This sample code provides the ability to view, annotate, redact, search, and sign dozens of document types directly in the browser, including Microsoft Word, Microsoft PowerPoint, Microsoft Excel, PDF, CAD, DICOM medical images, JPG, PNG, TIFF, GIF, annd more. With trivial changes, the same sample can be used to view documents using Accusoft's Prizm Content Connect on-premises product.

Running the sample

Running the sample is quick and easy. Just follow the steps below.

Configure the server

If you're using Apache, simply add this text to your Apache config file (but replace "/LocationOfTheSample/web" with the path of the sample on your machine).

Alias /acsviewingsamplephp /LocationOfTheSample/web
<Directory /LocationOfTheSample/web>
AllowOverride All
Require all granted
</Directory>

Next you need to test your config file changes and restart the server:

Ubuntu:

apache2 -t
service apache2 restart

RHEL:

apache2ctl configtest
apache2ctl restart

Configure the sample

The last step is to add your API key to the config file (web/pcc.config). To get a key, go to the Accusoft Cloud Portal, log in, then click the "My Keys" tab.

In web/pcc.config, replace "PlaceYourAPIKeyHere" with your API key.

Check permissions

In addition to the web site itself, this sample includes three directories: documents, imagestamps, and annotations.

The documents directory holds documents that you want to view and this directory should be readable by your web server.

The imagestamps directory holds images that you can stamp onto your document and this directory should be readable by your web server.

The annotations directory holds annotations that you create and this directory should be readable and writable by your web server.

Test the sample

Open this URL in your browser to test the sample:

http://localhost/acsviewingsamplephp/html5/index.php?document=sample.doc

Migrating to on-premises

To migrate this sample to an on-premises install of Prizm Content Connect, simply edit the config file. Prizm Content Connect does not need an API key, but you can leave that as-is because it will be ignored.

Change the value of from "https" to "http". Change the value of from "api.accusoft.com" to the name of your server. Change the value of from "443" to the port of your server (depending on how it is configured, but usually 18681 or 18682).

acs-php-viewing-sample's People

Contributors

brevetoxin avatar danaccusoft avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.