### Unattended Install with start /wait Source: https://help.accusoft.com/PrizmDoc/latest/HTML/windows-unattended-install-and-uninstall.html Runs the unattended install with the start /wait command to wait for completion. Without it, the install starts in the background and returns immediately on a console or script. ```powershell > start /wait PrizmDocServer.exe ServiceUser=accusoft.com\PrizmUser ServicePassword=pdpassword DatabaseConnectionString=mysql://prizm-user:password@prizm-server.database.host:3306/prizmdoc_server_db -s -l output.log ``` -------------------------------- ### GET viewing package example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/v3-viewing-packages.html Example request and response for GET /v3/viewingPackages/{packageId}. The response includes expirationDateTime, creationDateTime, bytes, and lifetimeAfterLastUse properties. ```http GET /v3/viewingPackages/U3BlY2lhbCBPcmRlciAjOTM3 ``` ```http HTTP 200 OK Content-Type: application/json { "expirationDateTime": "2122-07-03T00:00:00.000Z", "creationDateTime": "2101-01-01T0:00:00.000Z", "bytes": 180924609, "lifetimeAfterLastUse": "30d" } ``` -------------------------------- ### Start PrizmDoc Server Service Source: https://help.accusoft.com/PrizmDoc/latest/HTML/windows-unattended-install-and-uninstall.html Starts the PrizmDoc Server service after installation. This is the final step after configuring a paid license. ```powershell > net start prizm ``` -------------------------------- ### GET /PCCIS/V1/WorkFile/{fileId}/Info Example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/work-files.html Example GET request to retrieve work file metadata, including the required Accusoft-Affinity-Token header, and the successful JSON response. The response contains fileId, fileExtension, and affinityToken. ```http GET prizmdoc_server_base_url/PCCIS/V1/WorkFile/Xe6zv3dH0kVSzLuaNhd32A/Info Accusoft-Affinity-Token: ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM= ``` ```http HTTP/1.1 200 OK Content-Type: application/json { "fileId": "Xe6zv3dH0kVSzLuaNhd32A", "fileExtension": "pdf", "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=" } ``` -------------------------------- ### Start PrizmDoc Server service Source: https://help.accusoft.com/PrizmDoc/latest/HTML/ts-windows-installation-upgrade-failures.html Starts the PrizmDoc Server service via the net command. Used to verify the server starts successfully after installation. ```cmd net start prizm ``` -------------------------------- ### Example Response Body for GET Viewing Package Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pre-convert.html Example response body for a successful GET request to a viewing package. Shows the JSON structure with input source details, state, and expiration date. ```json 200 OK Content-Type: application/json { "input": { "source": { "type": "document", "fileName": "sample.doc", "documentId": "unT67Fxekm8lk1p0kPnyg8", . . . }, "viewingPackageLifetime": 2592000 }, "state": "complete", "packageExpirationDateTime": "2016-1-09T06:22:18.624Z" } ``` -------------------------------- ### Silent Installation with Sample Installation Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-windows-installation-unattended.html Runs PrizmDocClient.exe silently to install PAS with HTML5 samples. Requires IIS to be installed. Sets SelectedClientFeatures to "ProductFeature,HTML5Viewer" and enables IIS configuration and re-registration. Logs to output.log. ```batch > start /wait PrizmDocClient.exe ServiceUser="accusoft.com\PrizmDocUser" ServicePassword="PrizmDocPassword" SelectedClientFeatures="ProductFeature,HTML5Viewer" SelectedPASFeatures="ALL" DatabaseAdapter="mysql" DatabaseConnectionString="mysql://yusername:password@localhost:3306/prizmdb" IISConfigureSamples="1" IISReregister="1" -s -l output.log ``` -------------------------------- ### getStartIndexInInput() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.SearchTaskResult.html Shows how to get the start index of the search result text within the entire text string. Use getText to get the matched text. ```javascript var mark1 = viewerControl.addMark(1, "TextAnnotation"); mark1.setText("When Full-Text Search is being installed for an existing client without Full-Text Search"); var searchTask = new PCCViewer.SearchTask(searchQuery); var results = searchTask.search(mark1.getText()); var result = results[0]; var startIndex = result.getStartIndexInInput(); alert("The search result starts a character " + startIndex + " in the text string."); ``` -------------------------------- ### demo.config example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/dev-guide-configure-demo-on-windows.html Example configuration file for the demo. It sets the console log file path, HTTP service port, and API service host and port. The file is used to customize the application host address, application port, and services port. ```json { "logging": { "consoleLogFilePath": "%ALLUSERSPROFILE%\Accusoft\Prizm\Logs\CssDemoService.console.log" }, "httpService": { "port": 3000 }, "apiService": { "port": 18681, "host": "localhost" } } ``` -------------------------------- ### getStartIndexInContext() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.SearchTaskResult.html Shows how to get the start index of the search result text within the context text returned by getContext. ```javascript var mark1 = viewerControl.addMark(1, "TextAnnotation"); mark1.setText("When Full-Text Search is being installed for an existing client without Full-Text Search"); var searchTask = new PCCViewer.SearchTask(searchQuery); var results = searchTask.search(mark1.getText()); var result = results[0]; var startIndex = result.getStartIndexInContext(); ``` -------------------------------- ### getPageNumber() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.PiiEntity.html Gets the page number where the PII entity starts. If the entity spans multiple pages, the first page number is returned. ```javascript var piiEntities = piiDetectionRequest.getPiiEntities() var piiEntity = piiEntities[0]; var pageNumber = piiEntity.getPageNumber(); alert("PII entity found on page: " + pageNumber); ``` -------------------------------- ### Start v3 Viewing Package Creation Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pre-convert-documents-to-pdf.html Starts the v3 viewing package creation process by sending a POST request with the source file ID and a unique package ID. The response includes a process ID and initial state of 'processing'. ```http POST /v3/viewingPackageCreators Content-Type: application/json { "input": { "packageId": "MyPackage_IHN0YXJzaGlwIE5vc3Ryb21v", "source": { "type": "workFile", "fileId": "rxpuVUxMFWzAZFUmQ6fmYA" }, "lifetimeAfterLastUse": "30d" } } HTTP 200 OK Content-Type: application/json { "input": { "packageId": "MyPackage_IHN0YXJzaGlwIE5vc3Ryb21v", "source": { "type": "workFile", "fileId": "rxpuVUxMFWzAZFUmQ6fmYA" }, "lifetimeAfterLastUse": "30d" }, "expirationDateTime": "2021-09-13T10:58:15.551Z", "percentComplete": 0, "processId": "_wDAkhncr8_2PUWJc3Vfdw", "state": "processing" } ``` -------------------------------- ### Example pcc.nix.yml (pas service) configuration Source: https://help.accusoft.com/PrizmDoc/latest/HTML/ai-getting-started.html Complete example of a pcc.nix.yml file for the PAS service. Sets the port to 3000, specifies license and solution names, configures the PrizmDoc Server connection, and sets storage paths for documents, markup, and other data. Includes a MySQL database connection string. ```yaml port: 3000 license.key: "YOUR_LICENSE_KEY" license.solutionName: "YOUR_SOLUTION_NAME" secretKey: "mysecretkey" pccServer.hostName: "prizmdoc-server" pccServer.port: 18681 pccServer.scheme: "http" logs.path: "/logs" defaults.viewingSessionTimeout: "20m" documents.storage: "filesystem" documents.path: "/data/documents" documents.legacyMode: true markupXml.storage: "filesystem" markupXml.path: "/data/markup" markupXml.legacyMode: true markupLayerRecords.storage: "filesystem" markupLayerRecords.path: "/data/markupLayerRecords" markupLayerRecords.legacyMode: true formDefinitions.storage: "filesystem" formDefinitions.path: "/data/formDefinitions" imageStamps.storage: "filesystem" imageStamps.path: "/data/imageStamp" imageStamps.validTypes: ["png", "jpg", "jpeg", "gif"] viewingSessionsData.storage: "database" viewingSessionsProcessesMetadata.storage: "database" database.adapter: mysql database.connectionString: "mysql://root:insecurelocal@database:3306/prizmdoc" processManager.url: http://process-manager:3000 ``` -------------------------------- ### Custom Viewer UI Example (simple.html, simple.js, simple.css) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/build-a-custom-user-interface.html The three files that make up the custom viewer UI example: simple.html embeds the ViewerControl and provides the UI buttons and status bar, simple.js creates the viewer and wires up the UI, and simple.css styles the layout. The HTML loads the product resources and jQuery from the Google CDN. The JavaScript uses the PCCViewer.ViewerControl API and waits for the ViewerReady event before enabling buttons and attaching event handlers. The CSS defines the viewer wrapper and container dimensions. ```html Custom Viewer UI Example
Page 1 of 1
ViewerControl goes here
``` ```javascript $(document).ready(function() { // Get the element where the viewer will be embedded. var element = document.getElementById("viewerControlContainer"); // Create the options object for the viewer var options = { documentID : "a_valid_document_id", imageHandlerUrl: "my_pas_proxy", icons : viewerCustomizations.icons, language : viewerCustomizations.languages['en-US'], // printTemplate : "..." // include a print template for printing to work }; // Create the viewer control var viewerControl = new PCCViewer.ViewerControl(element, options); // It's best practice to wait for the "ViewerReady" event before calling the viewer API. viewerControl.on("ViewerReady", function() { // Display the page count when the estimated and actual page count are available. viewerControl.on("PageCountReady", displayPageCount); viewerControl.on("EstimatedPageCountReady", displayPageCount); function displayPageCount(ev) { $("#totalPages").html(ev.pageCount); } // Display the current page number when the page changes. viewerControl.on("PageChanged", function(ev) { $("#currentPage").html(ev.pageNumber); }); // It's safe to enable the UI buttons during the ViewerReady event $(".viewerButton").prop("disabled", false); // ...and then hookup the UI buttons $("#nextPage").click(function() { viewerControl.changeToNextPage(); }); $("#prevPage").click(function() { viewerControl.changeToPrevPage(); }); $("#zoomOut").click(function() { viewerControl.zoomOut(1.25); // Zoom out 1.25x }); $("#zoomIn").click(function() { viewerControl.zoomIn(1.25); // Zoom in 1.25x }); }); }); ``` ```css .viewerWrapper { width: 600px; height: 600px; position: relative; border: 1px solid #aaa; background: #ddd; } #viewerControlContainer { position: absolute; top: 40px; bottom: 0px; left: 0px; right: 0px; } .floatRight { float: right } ``` -------------------------------- ### getStartIndexInPage() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.PiiEntity.html Gets the character index where the PII entity text starts within the page's full text. Use PCCViewer.ViewerControl#requestPageText to obtain the page text and PCCViewer.PiiEntity#getText for the entity text. ```javascript var piiEntities = piiDetectionRequest.getPiiEntities() var piiEntity = piiEntities[0]; var startIndex = piiEntity.getStartIndexInPage(); alert("The PII entity starts at character " + startIndex + " on the page."); ``` -------------------------------- ### Initialize key bindings and set up Viewer Source: https://help.accusoft.com/PrizmDoc/latest/HTML/dev-guide-add-keyboard-shortcuts.html Sets up the Viewer normally and binds a global keydown handler that delegates to handleGlobalKeypress. Use this as the first step to add keyboard support without the jQuery.hotkeys plugin. ```javascript function initKeyBindings (viewerControl) { var handler = function(ev){ return handleGlobalKeypress(ev, viewerControl); }; $(document).on("keydown", handler); } var pluginOptions = { documentID: viewingSessionId, language: languageItems, template: htmlTemplates }; $(document).ready(function () { var viewerControl = $("#viewer1").pccViewer(pluginOptions).viewerControl; initKeyBindings(viewerControl); }); ``` -------------------------------- ### GET /v2/searchTasks/{processId} Request Example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/search-tasks.html Example request to get information about a search task. The request includes the processId in the URL and the Accusoft-Affinity-Token header, which is required when server clustering is enabled. ```http GET prizmdoc_server_base_url/v2/searchTasks/pR5X6nPDgMwat6cxlmn0Q3 Accusoft-Affinity-Token: ejN9/kXEYOuken4Pb9ic9hqJK45XIad9CgQ+BkM= ``` -------------------------------- ### Integrate PrizmDoc viewer: head includes, placeholder div, and pccViewer initialization Source: https://help.accusoft.com/PrizmDoc/latest/HTML/getting-started-viewing-part-1.html These three HTML/JavaScript blocks are the required steps to integrate the PrizmDoc viewer into a page: include the viewer's static CSS and JS files in the (scripts must load in the specified order), declare a placeholder
with a unique id, and instantiate the viewer with the pccViewer call. The viewerAssetsPath and resourcePath values assume the static files are served at viewer-assets/; adjust them if your static files are hosted elsewhere. The documentID is intentionally left commented out and will be set in part 2. ```html ``` ```html
``` ```html ``` -------------------------------- ### GET FormInfo request example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/form-extractors.html Example request to the GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/FormInfo endpoint. It returns what kind of form field data, if any, is available in the viewing session's source document. ```http GET /PCCIS/V1/ViewingSession/uDLbVh9sTmXJAmd1GeXbS9Gn3WHxs8oib2xPsW2xEFjnIDdoJcudPtxciodSYFQq6zYGabQ_rJIecdbkImTTkSA/FormInfo ``` -------------------------------- ### Get start point of a LineAnnotation Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.Mark.html Retrieves the start point coordinates for marks of type LineAnnotation. ```javascript if (mark.getStartPoint) { var startPoint = mark.getStartPoint(); } ``` -------------------------------- ### POST viewingPackageCreators to start pre-conversion Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pre-convert.html Starts the pre-conversion process by creating a viewing package creator. The request body must contain a JSON 'source' object with a 'type' property of "document", "url", or "upload". This example uses "document" as the source type. ```http POST http://localhost:3000/v2/viewingPackageCreators ``` -------------------------------- ### Start PrizmDoc Server on Linux with Docker Source: https://help.accusoft.com/PrizmDoc/latest/HTML/starting-and-stopping-prizmdoc-server-linux.html Starts PrizmDoc Server on Linux using Docker. Requires a config file and license configuration on first run. Mounts config, logs, and data directories from the current working directory. ```bash docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server accusoft/prizmdoc-server ``` -------------------------------- ### Run Docker demo in Windows (PowerShell) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/dev-guide-configure-demo-on-linux.html Use this command in Windows PowerShell to run the PrizmDoc content conversion demo. It mounts the current directory's config folder, publishes port 18001, and accepts the EULA. Requires a server config file and license configured beforehand. ```powershell docker run --rm --env ACCEPT_EULA=YES --volume $pwd/config:/config --publish 18001:18001 accusoft/prizmdoc-server content-conversion-demo ``` -------------------------------- ### Run Docker demo in Linux (bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/dev-guide-configure-demo-on-linux.html Use this command in a Linux bash shell to run the PrizmDoc content conversion demo. It mounts the local config directory, publishes port 18001, and accepts the EULA. Requires a server config file and license configured beforehand. ```bash docker run --rm --env ACCEPT_EULA=YES --volume $(pwd)/config:/config --publish 18001:18001 accusoft/prizmdoc-server content-conversion-demo ``` -------------------------------- ### Initialize default config file on Mac or Linux (bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/prizmdoc-server-docker.html Run this Docker command on Mac or Linux bash to create a new prizm-services-config.yml file in the config directory. Accepts the EULA and mounts the current config directory. ```bash docker run --rm -e ACCEPT_EULA=YES --volume $(pwd)/config:/config accusoft/prizmdoc-server init-config ``` -------------------------------- ### GET FormInfo response example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/form-extractors.html Example successful response from the GET FormInfo endpoint. The response body is JSON with a formType array indicating the types of form data available; here it shows "acroform". ```http HTTP/1.1 200 OK Content-Type: application/json { "formType": ["acroform"] } ``` -------------------------------- ### GET /info Source: https://help.accusoft.com/PrizmDoc/latest/HTML/health.html A request to get information about the service, including the PAS version and the client installer version. ```APIDOC ## GET /info ### Description A request to get information about the service. Returns the PAS version and the client installer version. ### Method GET ### Endpoint /info ### Request Example ``` GET http://localhost:3000/info ``` ### Response #### Success Response (200) ``` HTTP/1.1 200 OK Content-Type: application/json { "version": "X.X.XXXX.XXXX", "clientInstallerVersion": "X.X.X.XXXX" } ``` Where `version` is the PAS version and `clientInstallerVersion` is the version of the installer used to install the PrizmDoc Client. ### Error Responses There are no error states for this request. If the request times out or the connection is refused, then the service is not running or reachable. ``` -------------------------------- ### Start PrizmDoc Server on Mac or Linux (bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/prizmdoc-server-docker.html Starts the custom PrizmDoc Server container on Mac or Linux (bash). Mounts the config, logs, and data directories from the current working directory. ```bash docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server your-company/prizmdoc-server ``` -------------------------------- ### getStartPoint() Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.Mark.html Gets the start point of the mark. ```APIDOC ## getStartPoint() ### Description Gets the start point of the mark. ### Method `getStartPoint()` ### Returns - **Object** - The start point. ``` -------------------------------- ### Start PrizmDoc Server and PAS containers Source: https://help.accusoft.com/PrizmDoc/latest/HTML/migrate-to-docker.html Starts the PrizmDoc Server and PAS containers with the required environment variables, port mappings, and volume mounts. ```bash docker run -d --restart=unless-stopped --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --volume $(pwd)/config/pcc.config:/usr/share/prizm/pccis/ServiceHost/pcc.config --name prizmdoc-server accusoft/prizmdoc-server docker run -d --restart=unless-stopped --env ACCEPT_EULA=YES --publish 3000:3000 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name pas accusoft/prizmdoc-application-services ``` -------------------------------- ### POST /prizmdoc/api/v1/ocrReaders Source: https://help.accusoft.com/PrizmDoc/latest/HTML/api-ref-ocr-readers-general.html Creates and starts a new OCR process. The process is started by this request, but a response is sent before the process is complete. Use the GET /prizmdoc/api/v1/ocrReaders/{processId} URL to get the state and results of an in-progress or completed OCR process. ```APIDOC ## POST /prizmdoc/api/v1/ocrReaders ### Description Creates and starts a new OCR process. The process is started by this request, but a response is sent before the process is complete. Use the GET /prizmdoc/api/v1/ocrReaders/{processId} URL to get the state and results of an in-progress or completed OCR process. ### Method POST ### Endpoint /prizmdoc/api/v1/ocrReaders ### Parameters #### Request Headers - **Content-Type** (string) - Required - Must be `application/json` - **Accusoft-Tenant-Id** (string) - Required - Tenant ID for the created process. Must be included with subsequent calls to access this process. #### Request Body - **input** (object) - Required - An object that defines the source image and fields. - **source** (object) - Required - An object that defines the source image. - **fileId** (string) - Required - The ID of the work file which represents the source image that will be edited. See the work file API topic to find out how to upload a work file. - **fields** (array of objects) - Optional - Allows users to specify multiple areas to be read in a single call to the Worker. - **area** (object) - Optional - The bounding rectangular area of the recognized text. (Default behavior is to read the whole page.) - **x** (integer) - Optional - The distance, in pixels, from the left edge of the image to the left edge of the bounding rectangular area of the recognized text. - **y** (integer) - Optional - The distance, in pixels, from the top edge of the image to the top edge of the bounding rectangular area of the recognized text. - **width** (integer) - Optional - The width, in pixels, of the bounding rectangular area of the recognized text. - **height** (integer) - Optional - The height, in pixels, of the bounding rectangular area of the recognized text. - **page** (string or integer) - Optional - For multi-page images, the page on which the field is expected to be found. May be set to `"all"` to indicate that the field should be read on every page of the document. The `"all"` value is only valid when only one field is requested. The default value is `1`. Examples: `page`: 3, `page`: `"all"`. - **languages** (array of strings) - Optional - An array of predefined language sets for valid characters. Choose from the predefined list: `"afrikaans"`, `"albanian"`, `"azerbaijaniCyrillic"`, `"azerbaijaniLatin"`, `"baltic"`, `"basque"`, `"belarusian"`, `"bosnianLatin"`, `"bulgarian"`, `"catalan"`, `"centralEuropean"`, `"chineseSimplified"`, `"chineseTraditional"`, `"chineseTraditionalHK"`, `"croatian"`, `"cyrillic"`, `"czech"`, `"danish"`, `"dutch"`, `"english"`, `"estonian"`, `"faroese"`, `"finnish"`, `"french"`, `"frisian"`, `"german"`, `"greek"`, `"guarani"`, `"hani"`, `"hungarian"`, `"icelandic"`, `"indonesian"`, `"irish"`, `"italian"`, `"japanese"`, `"kazakhcyrillic"`, `"kazakhLatin"`, `"kirghizCyrillic"`, `"kirundi"`, `"korean"`, `"latin"`, `"latvian"`, `"lithuanian"`, `"luxembourgish"`, `"macedonian"`, `"malay"`, `"norwegian"`, `"polish"`, `"portuguese"`, `"quechua"`, `"rhaetoRomantic"`, `"romanian"`, `"russian"`, `"serbianCyrillic"`, `"serbianLatin"`, `"shona"`, `"slovak"`, `"slovenian"`, `"somali"`, `"sorbian"`, `"spanish"`, `"tajikCyrillic"`, `"thai"`. Note: The `"english"` characters [A..Z a..z] are available in most languages, including `"greek"` and `"cyrillic"`. Multiple languages must be in the same language family with exceptions: `"thai"` and `"english"` may be selected together; `"vietnamese"` and `"english"` may be selected together. When `"chineseSimplified"` and `"chineseTraditional"` are selected, both languages are read and the character with the highest confidence is used in the result. `"chineseSimplified"`, `"chineseTraditional"`, `"chineseTraditionalHK"`, `"japanese"`, `"korean"`, `"thai"` or `"vietnamese"` are only available if the PrizmDoc OCR REST API has been licensed for Asian languages. ### Request Example ```json { "input": { "source": { "fileId": "string" }, "fields": [ { "area": { "x": 0, "y": 0, "width": 0, "height": 0 }, "page": 1, "languages": ["english"] } ] } } ``` ### Response #### Success Response (200) The response is sent before the process is complete. The response contains the process ID and other details. Use the GET /prizmdoc/api/v1/ocrReaders/{processId} URL to get the state and results of an in-progress or completed OCR process. #### Response Example ```json { "processId": "string" } ``` ``` -------------------------------- ### Initialize and Access PrizmDoc Viewer with pccViewer Source: https://help.accusoft.com/PrizmDoc/latest/HTML/external-jQuery.fn.html Demonstrates how to initialize a new viewer using plugin options and how to retrieve an existing viewer instance from a DOM element. ```javascript //Note: these are already included in the PrizmDoc Samples var pluginOptions = { documentID: viewingSessionId, // documentID is a required property language: languageItems // language is a required property }; $(document).ready(function () { // Creates a new viewer in the div with id="viewer1" var viewer = $("#viewer1").pccViewer(pluginOptions); // Can also access the returned object through the plugin. var viewerA = $("#viewer1").pccViewer(); // Does not create a new viewer. viewerA === viewer; // true }); ``` -------------------------------- ### PrizmDoc Server startup console output Source: https://help.accusoft.com/PrizmDoc/latest/HTML/worker-dev-guide-how-to-run-worker.html Expected console output once PrizmDoc Server has started successfully, indicating the product runner, PCCIS watchdog, and the server are running. ```text [info] Starting Product Runner... [info] product-runner has been started correctly. [info] Starting PCCIS Watchdog process... [info] PCCIS Watchdog has been started correctly. ``` -------------------------------- ### removeAll() Example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayerCollection.html Removes all layers from the markup layer collection. The example gets the collection via viewerControl.getMarkupLayerCollection() and calls removeAll(). ```javascript var layerCollection = viewerControl.getMarkupLayerCollection(); // Get the markup layer collection associated with the viewerControl layerCollection.removeAll(); ``` -------------------------------- ### Wait for PrizmDoc Server startup output Source: https://help.accusoft.com/PrizmDoc/latest/HTML/worker-dev-guide-how-to-run-process-manager.html Expected console output indicating that PrizmDoc Server has started correctly. Wait for this output before proceeding. ```text [info] Starting Product Runner... [info] product-runner has been started correctly. [info] Starting PCCIS Watchdog process... [info] PCCIS Watchdog has been started correctly. ``` -------------------------------- ### getCount() - Get the number of layers in the collection Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayerCollection.html Returns the number of layers in the collection. The example gets the collection and then calls getCount(). ```javascript var layerCollection = viewerControl.getMarkupLayerCollection(); // Get the markup layer collection associated with the viewerControl var layerCount = layerCollection.getCount(); ``` -------------------------------- ### getSharpening() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.ViewerControl.html Gets the sharpening factor for the document. ```javascript var sharpening = viewerControl.getSharpening(); ``` -------------------------------- ### Start PrizmDoc Server on Windows (PowerShell) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/prizmdoc-server-docker.html Starts the custom PrizmDoc Server container on Windows (PowerShell). Mounts the config and logs directories from the current working directory. ```powershell docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $pwd/config:/config --volume $pwd/logs:/logs --name prizmdoc-server your-company/prizmdoc-server ``` -------------------------------- ### Silent Installation without Sample Installation Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-windows-installation-unattended.html Runs PrizmDocClient.exe silently to install PAS without samples. Requires ServiceUser and ServicePassword. Sets SelectedClientFeatures to "ProductFeature" to install only the service, disables IIS configuration and re-registration, and logs to output.log. ```batch > start /wait PrizmDocClient.exe ServiceUser="accusoft.com\PrizmDocUser" ServicePassword="PrizmDocPassword" SelectedClientFeatures="ProductFeature" SelectedPASFeatures="ALL" DatabaseAdapter="mysql" DatabaseConnectionString="mysql://username:password@localhost:3306/prizmdb" IISConfigureSamples="" IISReregister="" -s -l output.log ``` -------------------------------- ### getType() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.PiiEntity.html Gets the type of the PII entity. ```javascript var piiEntities = piiDetectionRequest.getPiiEntities() var piiEntity = piiEntities[0]; var type = piiEntity.getType(); alert("The PII entity has type: " + type); ``` -------------------------------- ### getAll() - Get all layers from the collection Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayerCollection.html Retrieves an array of all markup layer objects in the collection. The example gets the collection and then calls getAll(). ```javascript var layerCollection = viewerControl.getMarkupLayerCollection(); // Get the markup layer collection associated with the viewerControl var layers = layerCollection.getAll(); ``` -------------------------------- ### Initialize default config file on Windows (PowerShell) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-docker.html Creates a config directory and initializes a default pcc.nix.yml config file on Windows using PowerShell. The init-config command requires the ACCEPT_EULA environment variable set to YES. ```powershell mkdir config ``` ```powershell docker run --rm -e ACCEPT_EULA=YES --volume $pwd/config:/config accusoft/prizmdoc-application-services init-config ``` -------------------------------- ### getName() Example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayer.html Gets the name of the first markup layer. ```javascript var markupLayer = viewerControl.getMarkupLayerCollection().getAll()[0]; // Get the first markup layer. var layerName = markupLayer.getName(); ``` -------------------------------- ### Start PrizmDoc Server and PAS containers (Linux bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/upgrade-prizmdoc-to-v13-28.html Default commands for Linux bash. Starts containers with volume mounts for config, logs, and data directories. Substitute the container names if different from 'prizmdoc-server' and 'pas'. ```bash docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server accusoft/prizmdoc-server docker run --rm --env ACCEPT_EULA=YES --publish 3000:3000 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name pas accusoft/prizmdoc-application-services ``` -------------------------------- ### getText() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.PiiEntity.html Gets the text content of the PII entity. ```javascript var piiEntities = piiDetectionRequest.getPiiEntities() var piiEntity = piiEntities[0]; var text = piiEntity.getText(); alert("Detected the PII text: " + text); ``` -------------------------------- ### Initialize default config file on Mac or Linux (bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-docker.html Initializes a default pcc.nix.yml config file on Mac or Linux using bash. The init-config command requires the ACCEPT_EULA environment variable set to YES. ```bash docker run --rm -e ACCEPT_EULA=YES --volume $(pwd)/config:/config accusoft/prizmdoc-application-services init-config ``` -------------------------------- ### getViewerControl() - Get the associated viewer control Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayerCollection.html Returns the viewer control associated with the layer collection. The example gets the collection and then calls getViewerControl(). ```javascript var layerCollection = viewerControl.getMarkupLayerCollection(); // Get the markup layer collection associated with the viewerControl var viewerControl = layerCollection.getViewerControl(); ``` -------------------------------- ### getGamma() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.ViewerControl.html Use to get the current gamma factor for the document. ```javascript var gamma = viewerControl.getGamma(); ``` -------------------------------- ### Confirm Docker installation with hello-world Source: https://help.accusoft.com/PrizmDoc/latest/HTML/migrate-to-docker.html Run the hello-world container to confirm a successful Docker installation. The container outputs a confirmation message and then exits and removes itself. ```bash docker run --rm hello-world ``` -------------------------------- ### getName() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MouseTool.html Gets the name of the mouse tool and displays it in an alert. ```javascript // get the mouse tool's name var mouseToolName = myMouseTool.getName(); // do something with the name alert("Mouse tool name is " + mouseToolName); ``` -------------------------------- ### Example response when product is licensed and form detection is available Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-viewing-sessions.html Shows a 200 OK response with all restrictions disabled, including clientFileRetrievalDisabled set to false. Use this as the expected response when the product is licensed and a valid allowedClientFileFormats is provided. ```json HTTP/1.1 200 OK Content-Type: application/json { "delayEnabled": false, "downloadDisabled": false, "markupSavingDisabled": false, "markupLoadingDisabled": false, "contentConvertersDisabled": false, "markupBurnersDisabled": false, "formExtractorsDisabled": false, "formInfoDisabled": false, "clientFileRetrievalDisabled": false } ``` -------------------------------- ### Example response when product is licensed but allowedClientFileFormats is not supplied Source: https://help.accusoft.com/PrizmDoc/latest/HTML/pas-viewing-sessions.html Shows a 200 OK response with all restrictions disabled except clientFileRetrievalDisabled set to true. Use this as the expected response when the product is licensed and a valid allowedClientFileFormats is not supplied. ```json HTTP/1.1 200 OK Content-Type: application/json { "delayEnabled": false, "downloadDisabled": false, "markupSavingDisabled": false, "markupLoadingDisabled": false, "contentConvertersDisabled": false, "markupBurnersDisabled": false, "formExtractorsDisabled": false, "formInfoDisabled": false, "clientFileRetrievalDisabled": true } ``` -------------------------------- ### GET /v2/formExtractors/{processId} example request and response Source: https://help.accusoft.com/PrizmDoc/latest/HTML/form-extractors.html Example request and response for the GET /v2/formExtractors/{processId} endpoint. The request includes the Accusoft-Affinity-Token header, which is required when server clustering is enabled. The response shows a completed acroform extraction with field metadata, bounding boxes, and process status. ```http GET /v2/formExtractors/gLoltqCVnRKzXz2QFNptqw Accusoft-Affinity-Token: D+Rmn9kB4FrLfrHoNL2bag6WpuNn2ox2qhT2GbLdf9A= ``` ```http HTTP/1.1 200 OK Content-Type: application/json { "input": { "fileId": "-eo_zmq3qmPS0WKZlP_Lug", "formType": "acroform" }, "output": { "acroform": { "pages": [ { "page": 1, "height": 792, "width": 612, "fields": [ { "fieldType": "Text", "name": "email", "required": true, "readOnly": "true", "tabOrder": 0, "appearance": { "textColor": "0 g", "font": "Helvetica" }, "boundingBox": { "lowerLeftX": 89, "lowerLeftY": 646, "upperRightX": 239, "upperRightY": 668 }, "options": { "multiline": false, "maxLen": -1 }, "format": { "formatCategory": "None" } }, { "fieldType": "Text", "name": "fullName", "required": false, "readOnly": "false", "tabOrder": 1, "appearance": { "textColor": "0 g", "font": "Helvetica" }, "boundingBox": { "lowerLeftX": 89, "lowerLeftY": 676, "upperRightX": 239, "upperRightY": 698 }, "options": { "multiline": false, "maxLen": -1 }, "format": { "formatCategory": "None" } } ] } ] } }, "expirationDateTime": "2016-10-11T03:30:33.166Z", "percentComplete": 100, "processId": "gLoltqCVnRKzXz2QFNptqw", "state": "complete", "affinityToken": "D+Rmn9kB4FrLfrHoNL2bag6WpuNn2ox2qhT2GbLdf9A=" } ``` -------------------------------- ### GET /v2/viewingPackages/{documentId}/creator Source: https://help.accusoft.com/PrizmDoc/latest/HTML/viewing-packages.html Gets the processId of the viewingPackageCreator which created this viewing package if it still exists. Useful for checking the status of a viewingPackageCreator started by PAS. ```APIDOC ## GET /v2/viewingPackages/{documentId}/creator ### Description Gets the `processId` of the viewingPackageCreator which created this viewing package if it still exists. This URL is useful when you create a viewing session with a `documentId` and want to check the status of the viewingPackageCreator which PAS may have created on your behalf. ### Method GET ### Endpoint /v2/viewingPackages/{documentId}/creator ### Parameters #### Path Parameters - **documentId** (string) - Required - The ID of the viewing package. ### Request Example ``` GET pas_base_url/v2/viewingPackages/unT67Fxekm8lk1p0kPnyg8/creator ``` ### Response #### Success Response (200) - **viewingPackageCreatorId** (string) - The ID of the viewingPackageCreator process. #### Response Example ``` HTTP/1.1 200 OK Content-Type: application/json { "viewingPackageCreatorId": "khjyrfKLj2g6gv8fdqg710" } ``` #### Error Responses If a request is made with an invalid viewing package ID or the creator process has expired, an error will be returned. ``` HTTP/1.1 404 Not Found ``` ``` -------------------------------- ### Start and stop PrizmDemo service from command line Source: https://help.accusoft.com/PrizmDoc/latest/HTML/dev-guide-configure-demo-on-windows.html Use these commands to start and stop the PrizmDemo Windows service from the command line when access to the services management console is unavailable. Note that the start command contains a typo ('PrizmDemp') as it appears in the source. The service must be started or stopped with administrator privileges. ```plaintext net start PrizmDemp net stop PrizmDemo ``` -------------------------------- ### removeItem(layerId) Example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.MarkupLayerCollection.html Removes a specific layer from the collection by its ID. The example retrieves the collection, gets all layers, and removes the first layer using its ID. ```javascript var layerCollection = viewerControl.getMarkupLayerCollection(); // Get the markup layer collection associated with the viewerControl var layers = layerCollection.getAll(); layerCollection.removeItem(layers[0].getId()); ``` -------------------------------- ### Create required PrizmDoc folders Source: https://help.accusoft.com/PrizmDoc/latest/HTML/migrate-to-docker.html Create the /prizmdoc directory and the config, data, and logs subdirectories, then change into the /prizmdoc directory. ```bash sudo mkdir /prizmdoc && cd /prizmdoc && sudo mkdir config data logs ``` -------------------------------- ### Start PrizmDoc containers on Linux (bash) Source: https://help.accusoft.com/PrizmDoc/latest/HTML/upgrade-prizmdoc-to-v14x.html Starts the PrizmDoc Server and PAS containers on Linux (bash) using the default commands. ```bash docker run --rm --env ACCEPT_EULA=YES --publish 18681:18681 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name prizmdoc-server accusoft/prizmdoc-server docker run --rm --env ACCEPT_EULA=YES --publish 3000:3000 --volume $(pwd)/config:/config --volume $(pwd)/logs:/logs --volume $(pwd)/data:/data --name pas accusoft/prizmdoc-application-services ``` -------------------------------- ### getAllMarks() example Source: https://help.accusoft.com/PrizmDoc/latest/HTML/PCCViewer.ViewerControl.html Gets all marks. Returns an empty array if the viewer has not been initialized. ```javascript var allMarks = viewer.getAllMarks(); ```