Skip to main content

Previewer Setup for Local Environment

Use Docker To get the Previewer Up and Running: For local use

Taken from Accusoft’s Try It link:
Accusoft: Try It! 

  1. Make sure you have stopped Prizm and Prizm Application Services so the ports won’t conflict
  2. Download Docker Desktop (Windows): Docker Desktop 
  3. Open up PowerShell and run this command: docker pull accusoft/prizmdoc-viewer-eval:latest
  4. Find our Solution Name and License Key in LastPass under Prizm License and replace YOUR_SOLUTION_NAME and YOUR_LICENSE_KEY in the command below of your choice
  • Option 1 (Recommended)-
    If you want to be able to restart the docker container use this (once this is run you only have to click stop or play in the Docker Desktop app):
    docker run -p 8888:8888 -p 3000:3000 -p 18681:18681 -e ACCEPT_EULA=YES -e LICENSE_SOLUTION_NAME=YOUR_SOLUTION_NAME -e LICENSE_KEY=YOUR_LICENSE_KEY --name prizmdoc-viewer-eval accusoft/prizmdoc-viewer-eval:latest
    • Once you can see the container named accusoft/prizmdoc-viewer-eval:latest in Docker Desktop you can close PowerShell. This will stop the container. Hit play in Docker Desktop to start it back up again.
  • Option 2-
    If you want the docker container to be removed when you stop it use this:
    docker run --rm -p 8888:8888 -p 3000:3000 -p 18681:18681 -e ACCEPT_EULA=YES -e LICENSE_SOLUTION_NAME=YOUR_SOLUTION_NAME -e LICENSE_KEY=YOUR_LICENSE_KEY --name prizmdoc-viewer-eval accusoft/prizmdoc-viewer-eval:latest
  1. It takes a few minutes for everything to start up, even though it says it's running in Docker. Confirm that everything is running with these checks:
  1. Once the application loads or all the checks come back with OK you are ready to start using the PrizmDoc Previewer with the AccusoftPreviewer solution.

Note: To get updates, just click the delete icon in Docker Desktop and repeat the steps above.

For debugging the front end of the Previewer:

On you machine, make sure you have node.js, npm, and gulp installed.

  • Node needs to be a specific version. Please use this msi: https://nodejs.org/download/release/v11.3.0/node-v11.3.0-x86.msi . If you have another version already installed, it's sufficient to simply uninstall node.js on your machine through the settings app.
  • Make sure npm is installed. You can do this by opening the command line and type npm -v. If you find out you don't have it installed, just run sudo apt install npm. If there are errors installing npm, make sure you update first by running sudo apt-get update.
  • To install gulp, simply run the command npm install -global gulp.

Now you've got what you need. To run the previewer and debug it:

  1. Run Utopia and Utopia\UtopiaPreviewers\AccusoftPreviewer at the same time.
  2. In the source code, open the source code and go to the following directory: Utopia\UtopiaPreviewers\AccusoftPreviewer\AccusoftPreviewer\wwwroot\ViewerSources
  3. Open a powershell window in that directory and run the command ./builddev.bat
  4. In the Utopia window, open the dev tools and make sure the cache is disabled
  5. In the Utopia dev tools, you'll see a "Previewer" item in the tree view - if you expand it, you should see webpack://, which you can expand and find ./modules
  6. If you don't see ./modules then you'll need to right click the Previewer in the browser and select Reload Frame. Then repeat steps 4 and 5.
  7. In the ./modules directory, you'll see the client code for debugging.
  8. Go eat a donut. You deserve it. You're ready to debug with the Previewer!

The Way of Pain - To get the Previewer up and running:

  1. Download and install the PrizmDoc Server and Client
  • if the following steps dont't work to install the PrizmDoc Server and Client, see Quinn's comment
  • https://v953w.app.goo.gl/ef1g 
  • For the user, the best thing to do is create a new system user and set a password to use for PrizmDoc. You CAN use your own user, but be aware -- if you change your password, PrizmDoc will not work until you update the password, see this link on how to update https://www.accusoft.com/faqs/is-it-possible-to-change-the-login-accounts-on-prizmdoc-services-in-windows/ 
  • Also for user, if you created a new one, you may need to add the user to the Window's Administrators group.
  • For the Server pick 'I have purchased a license' and then pick OEM. Then License info is the Development-Shared folder in Last Pass.
  • Use the default URL for the client installer
  • Other than the User/Password info, you should be able to just keep defaults on all options.
  1. Restart your computer, yes... you have to.

  2. Make sure the PrizmDoc server and client are running, (Demo isn't required to be running). These are services that need to be running called 'PrizmDoc' and 'PrizmApplicationServices'

  3. Start the Utopia Project found Utopia\UtopiaPreviewers\AccusoftPreviewer - While this is running you can preview files in your local Utopia instance and the previewer project webpage will be a HTTP Error 403.14 - Forbidden type page.

Note: Azure storage needs to be running or the previewer will timeout while loading

Note: Make sure your port number is correct in the AccusoftPreviewer.csproj file. The line <IISExpressSSLPort>44318</IISExpressSSLPort> got changed to <IISExpressSSLPort>44300</IISExpressSSLPort>. VS automatically sets this in some fashion, so make sure your hitting the correct port, I also made the mistake of trying to line it up to port 50560 (not the 44300 or the correct one 44318) which didn't help finding the problem. To not have problems in the future you need to update the ssl port in 3 different files.

  • C:\src\Utopia\UtopiaPreviewers\AccusoftPreviewer\AccusoftPreviewer\AccusoftPreviewer.csproj
  • C:\src\Utopia\UtopiaPreviewers\AccusoftPreviewer\AccusoftPreviewer\AccusoftPreviewer.csproj.user
  • C:\src\Utopia\UtopiaPreviewers\AccusoftPreviewer.vs\AccusoftPreviewer\config\applicationhost.config
    image.png