Technical FAQs

Question

When loading PDF documents into PrizmDoc that contain embedded highlights, rather than appearing translucent, the highlights are appearing opaque and are covering the underlying text. Why is this happening?

Answer

Prior to version 13.4 of PrizmDoc, this was occurring due to limitations in web browsers. The SVG attribute comp-op="multiply" was not widely supported in modern browsers.

With PrizmDoc version 13.4, the way highlights were rendered was changed to resolve this issue.

How PrizmDoc’s Video Playback Feature Enhances Legal Applications

Video playback has become an indispensable feature for today’s applications, reflecting the evolution of user preferences and the ubiquity of multimedia content in our digital age. As the consumption of video content surges, from tutorials, entertainment, and online courses to marketing materials and user-generated content, applications that offer smooth and versatile video playback capabilities cater directly to this user demand, enhancing engagement and retention rates.

Moreover, video communicates complex ideas efficiently, appeals to visual learners, and often enhances user experience with a richer, more immersive medium. In today’s highly competitive digital marketplace, integrating robust video playback functionality can be the deciding factor for an application’s success, ensuring that it meets contemporary user expectations and remains relevant in a video-centric digital ecosystem.

Introducing PrizmDoc Video Playback

Given the growing importance of video, the Accusoft engineering team has incorporated video playback into PrizmDoc’s growing feature set. PrizmDoc has long made it easy to integrate seamless document viewing into web-based applications, but the new video playback feature now allows developers to natively embed video functionality into their software. Thanks to PrizmDoc video playback, there’s no longer any need to host videos on external sites or rely upon vulnerable software plugins to incorporate videos into their application workflows.

The new video playback feature carries on PrizmDoc’s longstanding tradition of efficiency and outstanding performance by delivering high quality video content with minimal processing lags and accommodating multiple file formats. As with other PrizmDoc features, developers can quickly incorporate video playback through a simple API call. This makes it easy to roll out video features without having to build complex functionality from scratch.

Video Playback Benefits for Legal Applications

The legal industry stands to benefit immensely from the use of video playback. Incorporating video features into LegalTech applications allows legal teams to work more effectively and deliver better services to their clients. Here are just a few of the benefits of video playback for the legal industry:

Better Case Preparation

Incorporating video playback functionality into legal software revolutionizes the way lawyers work and offers them unprecedented advantages in case preparation and courtroom representation. With video playback, lawyers can revisit crucial deposition testimonies, witness interviews, or surveillance footage at the touch of a button, eliminating the need for extensive manual sifting through transcripts or notes. This visual evidence can be used to enhance comprehension, validate statements, and build more persuasive arguments. 

With the growing use of virtual court proceedings, having integrated video playback capabilities ensures that legal professionals can present key evidence seamlessly, without toggling between multiple platforms. In essence, video playback in legal software streamlines processes, promotes meticulous case analysis, and provides lawyers with a compelling tool to bolster their arguments and client representation.

Improved Communication & Collaboration

Video playback in legal applications offers a transformative advantage by enhancing communication and collaboration among stakeholders. Unlike traditional methods, video captures the nuances of testimonies, allowing viewers to discern tone, emotion, and non-verbal cues often lost in written transcripts. This depth can be particularly evident when observing video depositions, where the demeanor and specific phrasing of witnesses are critical. Additionally, complex scenarios or events can be better understood when demonstrated through video, making it an indispensable tool for lawyers when explaining intricate case details to clients or colleagues.

This sensory-rich medium allows lawyers to brief their teams more effectively, reducing reliance on memory or textual notes, ensuring everyone remains aligned, and facilitating strategic discussions. Clients, too, benefit immensely. Video content can demystify the often-complex legal processes, empowering them with a clearer understanding of proceedings and making them active participants in their cases. Furthermore, when videos are shared with opposing counsel, it can improve transparency and potentially lead to faster resolutions by pinpointing areas of agreement or contention, thereby laying the groundwork for more informed negotiations.

Increased Efficiency

The integration of video playback within legal applications presents a notable advantage in increasing efficiency for legal professionals. In the past, the absence of built-in playback capabilities meant that lawyers often had to download and launch videos in separate external applications, causing interruptions in their workflow. Now, with the advent of direct video playback in the document viewing interface, there’s a seamless transition between reading textual documents and viewing related video content. This streamlined process ensures that lawyers and their teams no longer grapple with the cumbersome process of managing external video files, thereby saving valuable time.

By consolidating tasks within a singular interface, legal professionals can maintain their focus, review case materials more swiftly, and ultimately make more informed decisions without the constant shift between applications. The simplicity and efficiency offered by this integration not only optimize legal workflows but also enhance the user experience, leading to more agile and effective case management.

Enhance LegalTech Applications with PrizmDoc Video Playback

PrizmDoc’s new video playback feature delivers tremendous benefits for legal applications. This enhancement empowers legal professionals to integrate and access video content directly within their LegalTech software, eliminating the need for third-party platforms or external tools. As a result, users experience a swifter and more cohesive workflow, particularly when cross-referencing between legal documents and relevant videos. By consolidating these capabilities and minimizing associated costs, LegalTech software developers can channel their efforts and resources into innovating further, ensuring that their applications remain at the forefront of a rapidly evolving industry landscape.

To learn more about how PrizmDoc’s video playback feature can benefit your LegalTech application, talk to one of Accusoft’s PrizmDoc specialists today.

Docubee

 

It’s never been a more pressing time to go digital. With over half of the world working remotely, we all need an easier way to complete our daily tasks. For some, this presents a unique challenge. Manual processes that require physical paper are now much more difficult in a work-from-home world. Expense report automation is one such challenge.

Finding a way to digitally automate those processes is now key. Especially when it comes to filing expense reports. Accusoft puts employees’ safety first, which is why we implemented new work-from-home protocols. While this comes with its own unique challenges, we are streamlining our processes by using our own technology to automate manual processes, like expense reports.


Digital Process Automation

Docubee is a business process automation tool, powered by Accusoft technology, that enables businesses to streamline a variety of different processes including document sharing, form creation, data collection, and digital signatures.

While Docubee is used for a variety of different processes, Accusoft is now using the tool to help employees during these unprecedented times. Accusoft was able to rethink the way we work, including the way we process expense reports.

Since most employees with a corporate card were always in the office, the process was more of a face-to-face interaction. Employees with a corporate card would print out their credit card statements at the end of each month, gather all receipts and invoices, print them out, write down a reference number for tracking, get their manager’s wet signature, and deliver the package to the accounting department.

“While this process has always worked for Accusoft, the Coronavirus forced us to take a deeper look at how we operate,” said Anthony Sanchez, Chief Financial Officer at Accusoft. “We have a great tool that can help us automate, and we are taking advantage of this opportunity to make the transition.”


A New Process for All

Using Docubee’s document sharing and workflow routing capabilities, employees were able to collect all of their receipts and invoices digitally, attach them to the new workflow, send them to their manager for a digital signature, and route the collection of paperwork to accounting for final approval. 

“Docubee is crucial in times like these,” says Steve Wilson, President of Docubee. “Our technology is powered by Accusoft’s powerful SDKs and APIs. As a business process automation tool, Docubee can help a variety of businesses take their processes digital.”

Accusoft discovered that using Docubee for filing expense reports is the perfect solution for the current circumstances and beyond. It streamlined the process for everyone involved, enabling employees to share statements more efficiently and managers to approve them with ease.

Do you have a manual process that has become more difficult during these work-from-home circumstances? Learn how you can take these processes digital and make your team more productive. Discover what you can do with Docubee.

Question

I am trying to perform OCR on a PDF created from a scanned document. I need to rasterize the PDF page before importing the page into the recognition engine. When rasterizing the PDF page I want to set the bit depth of the generated page to be equal to the bit depth of the embedded image so I may use better compression methods for 1-bit and 8-bit images.

ImGearPDFPage.DIB.BitDepth will always return 24 for the bit depth of a PDF. Is there a way to detect the bit depth based on the PDF’s embedded content?

Answer

To do this:

  1. Use the ImGearPDFPage.GetContent() function to get the elements stored in the PDF page.
  2. Then loop through these elements and check if they are of the type ImGearPDEImage.
  3. Convert the image to an ImGearPage and find it’s bit depth.
  4. Use the highest bit depth detected from the images as the bit depth when rasterizing the page.

The code below demonstrates how to do detect the bit depth of a PDF page for all pages in a PDF document, perform OCR, and save the output while using compression.

private static void Recognize(ImGearRecognition engine, string sourceFile, ImGearPDFDocument doc)
    {
        using (ImGearPDFDocument outDoc = new ImGearPDFDocument())
        {
            // Import pages
            foreach (ImGearPDFPage pdfPage in doc.Pages)
            {
                int highestBitDepth = 0;
                ImGearPDEContent pdeContent = pdfPage.GetContent();
                int contentLength = pdeContent.ElementCount;
                for (int i = 0; i < contentLength; i++)
                {
                    ImGearPDEElement el = pdeContent.GetElement(i);
                    if (el is ImGearPDEImage)
                    {
                        //create an imGearPage from the embedded image and find its bit depth
                        int bitDepth = (el as ImGearPDEImage).ToImGearPage().DIB.BitDepth; 
                        if (bitDepth > highestBitDepth)
                        {
                            highestBitDepth = bitDepth;
                        }
                    }
                }
                if(highestBitDepth == 0)
                {
                    //if no images found in document or the images are embedded deeper in containers we set to a default bitDepth of 24 to be safe
                    highestBitDepth = 24;
                }
                ImGearRasterPage rasterPage = pdfPage.Rasterize(highestBitDepth, 200, 200);
                using (ImGearRecPage recogPage = engine.ImportPage(rasterPage))
                {
                    recogPage.Image.Preprocess();
                    recogPage.Recognize();
                    ImGearRecPDFOutputOptions options = new ImGearRecPDFOutputOptions() { VisibleImage = true, VisibleText = false, OptimizeForPdfa = true, ImageCompression = ImGearCompressions.AUTO, UseUnicodeText = false };
                    recogPage.CreatePDFPage(outDoc, options);
                }
            }
            outDoc.SaveCompressed(sourceFile + ".result.pdf");
        }
    }

For the compression type, I would recommend setting it to AUTO. AUTO will set the compression type depending on the image’s bit depth. The compression types that AUTO uses for each bit depth are: 

  • 1 Bit Per Pixel – ImGearCompressions.CCITT_G4
  • 8 Bits Per Pixel – ImGearCompressions.DEFLATE
  • 24 Bits Per Pixel – ImGearCompressions.JPEG

Disclaimer: This may not work for all PDF documents due to some PDF’s structure. If you’re unfamiliar with how PDF content is structured, we have an explanation in our documentation. The above implementation of this only checks one layer into the PDF, so if there were containers that had images embedded in them, then it will not detect them.

However, this should work for documents created by scanners, as the scanned image should be embedded in the first PDF layer. If you have more complex documents, you could write a recursive function that goes through the layers of the PDF to find the images.

The above code will set the bit depth to 24 if it wasn’t able to detect any images in the first layer, just to be on the safe side.

Question

When I click on the download button a ‘download options’ pane appears to the left of the Viewer.

Is there a way I can modify the client code such that clicking the download button skips this step and just downloads the document as a PDF, burning in all the marks/redactions/e-signatures?

Answer

To clear the event listener for the download button and attach your own, you can add this in your client-side JavaScript after the Viewer has been initialized:

$("button.pcc-icon.pcc-icon-download").off("click");

$("button.pcc-icon.pcc-icon-download").on("click", function (event) {
    $("div.pcc-select-download div.pcc-label").html("PDF");
    $("div[data-pcc-checkbox=\"burnMarks\"]").addClass("pcc-checked");
    $("button[data-pcc-download=\"download\"]").click();
});

This will add a new click listener to the download button. In the example above, the click listener sets download parameters (type is set to “PDF”, and marks/redactions/esignatures are included), and then immediately calls the click event on the “download” button that would normally be in the download pane. This should make it so that when the user clicks the download button, the notification dialog immediately appears instead of the download pane, as shown below:

From here the user can click the “save” button to download the resultant document.

TAMPA, FLA. (Dec. 1, 2021) Last night, the Tampa Bay Software CEOs (TBSC) met for their quarterly social meeting at the Current Hotel in the Rox Rooftop Bar. Hosted by Accusoft, this networking event provided a great venue for discussion about attracting top talent to the area’s innovative businesses, driving growth opportunities for the high tech industry in Tampa, and sharing mutual problems and uncovering solutions.

“Our tech community and the opportunity for further innovation in Tampa Bay is growing”,  said Jack Berlin, CEO at Accusoft. “With this great collaboration of software CEOs, we can bring the local tech community together, to attract top talent, effectively communicate to our leaders what our tech community needs, and learn from each other to drive further growth.”

The Software CEO Council comprises the area’s premier businesses, executives, and entrepreneurs of Tampa Bay’s technology community. Its mission is to create the largest communal ecosystem for tech startups in the state of Florida and put Tampa Bay on the map as a beacon for innovation and success, to foster talent and fuel growth. Council companies include A-LIGN, Accusoft, Applied Data Corporation, ComplianceQuest, CrossBorder Solutions, Digital Hands, Geographic Solutions, Haneke Design, MercuryWorks, Sourcetoad, Spirion, Transcendent and Vendita.

Pictured above left to right: Greg Ross-Munro, Prashanth Rajendran, Kevin Coppins, Dan Gaertner, Chris Karlo, Shamus Hines, Charlotte Baker, Jack Berlin, Jody Haneke.

For more information about TBSC, visit the group’s website at https://www.tampasoftwareceos.com/.

About Tampa Bay Tech

Tampa Bay Tech is a 501(c)6 non-profit technology council that has been engaging and uniting the local technology community for 20 years. With over 100 companies representing thousands of tech employees – as well as thousands of students within the area’s colleges and universities – Tampa Bay Tech provides programming and initiatives to support all those in the technology space. Through their membership and partnerships, their mission is to build a radically connected, flourishing tech hub where opportunity is abundant for all. Join the TBTech community at tampabay.tech and follow us on Facebook, Linkedin, Instagram, and Twitter.

About Accusoft

Founded in 1991, Accusoft is a software development company specializing in content processing, conversion, and automation solutions. From out-of-the-box and configurable applications to APIs built for developers, Accusoft software enables users to solve their most complex workflow challenges and gain insights from content in any format, on any device. Backed by 40 patents, the company’s flagship products, including OnTask, PrizmDoc™ Viewer, and ImageGear, are designed to improve productivity, provide actionable data, and deliver results that matter. The Accusoft team is dedicated to continuous innovation through customer-centric product development, new version release, and a passion for understanding industry trends that drive consumer demand. Visit us at www.accusoft.com.

Question

When printing non-standard size raster images with PrizmDoc they can sometimes become cutoff if too tall or wide. How can I correctly print a non-standard size raster image with PrizmDoc?

Answer

(This explanation is done for a tall portrait image, but can be altered to work for a wide landscape image by flipping the width and height.)

To do this, you have to add a custom paper size to viewerCustomization.js and specify a smaller width so that there is enough room to fit the height of the image on a single page.

To find the correct width value so that the image will fit on a single page, you will need to do some math. In this example, we’ll use an image that is 1305×2823. In this case, the width is 46.2% of the height. If you want to print onto 8.5×11 inch paper, then the width you want to set for your new custom paper size is 11*0.462, which comes out to 5.082.

So now that you have the width, you need to create the new custom paper size. In viewerCustomization.js in the templates section, find the "print" template and add the following code where the other printing paper sizes are located.

/*custom */
.portrait .custom.page { width: 5.082in; height: 11in; margin: 0 auto !important; }
.portrait .custom.pageIE { width: 9.5in; height: 9.5in; margin: 0 auto !important; }
.portrait .custom.pageSafari { width: 8.9in; height: 8.9in; margin: 0 auto !important; }
.portrait .custom.nomargins { width: 11in !important; height: 11in !important; }

/* even without margins, Safari enforces the printer's non-printable area */
.portrait .custom.nomargins.pageSafari { width: 9.32in !important; height: 9.32in !important; }

.landscape .custom.page { height: 5.082in; width: 11in; margin: 0 auto !important; }
.landscape .custom.pageIE { height: 9.05in; width: 9.05in; margin: 0 auto !important; }
.landscape .custom.pageSafari { height: 8.4in; width: 8.4in; margin: 0 auto !important; }
.landscape .custom.nomargins { height: 11in !important; width: 11in !important; }
.landscape .custom.nomargins.pageSafari { height: 9.32in !important; width: 9.32in !important; }
/*custom end*/

As you can see, the width for .portrait .custom.page was set to 5.082in, and the height set to 11in. This will scale the 1305×2823 image to fit on a single 8.5×11 page when printing. By flipping the values and setting them in .landscape you would be able to print a 2823×1305 image on a single landscape page. (Just to note, I only edited the values for .custom.page for portrait and landscape. The others would most likely need to be changed.)

Next you need to add an option for your new paper size to the "paperSize" selection tag in the "printOverlay" section of templates in viewerCustomization.js. Your select tag should end up looking something like this:

<select data-pcc-select="paperSize" class="pcc-print-select">
    <!-- US and International-->
    <option value="letter"><%= paperSizes.letter %></option>
    <option value="legal"><%= paperSizes.legal %></option>
    <option value="tabloid"><%= paperSizes.tabloid %></option>
    <option value="foolscap"><%= paperSizes.foolscap %></option>
    <!-- A formats-->
    <option value="a3"><%= paperSizes.a3 %></option>
    <option value="a4"><%= paperSizes.a4 %></option>
    <option value="a5"><%= paperSizes.a5 %></option>
    <!-- Architectural-->
    <option value="a6"><%= paperSizes.a6 %></option>
    <option value="a"><%= paperSizes.a %></option>
    <option value="b"><%= paperSizes.b %></option>
    <option value="c"><%= paperSizes.c %></option>
    <option value="d"><%= paperSizes.d %></option>
    <option value="e"><%= paperSizes.e %></option>
    <option value="e1"><%= paperSizes.e1 %></option>
        
    <option value="custom">Custom</option>
</select>

The new print option should now appear in the PrizmDoc print settings when selecting a paper size, and it should print the image on a single page.

One thing to note is that you will have to do this for each differently sized image. If you are unsure of the size of uploaded documents, this solution will most likely not be usable.

Question

Can I host multiple PrizmDoc viewers on a single page?

Answer

It is possible to host multiple viewers on a single page. The following example leverages Bootstrap’s tab implementation:

<!DOCTYPE html>

<html lang="en">
<head>
    <!-- Metadata -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="description" content="" />

    <!-- Title -->
    <title>AccuSample</title>

    <!-- Libraries -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css">

    <!-- PrizmCSS -->
    <link rel="stylesheet" href="https://pcc-demos.accusoft.com/static/viewer-latest/css/viewercontrol.css">
    <link rel="stylesheet" href="https://pcc-demos.accusoft.com/static/viewer-latest/css/viewer.css">

    <!-- Inline Stylesheet -->
    <style>
        body {
            overflow-y: hidden;
        }
        #viewer1, #viewer2 {
            height: calc(100vh - 3em);
            width: 100%;
        }
    </style>

</head>
<body>
    <!-- #main -->
    <main class="container">
        <ul class="nav nav-tabs" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" id="viewer1-tab" data-toggle="tab" href="#viewer1">Viewer 1</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" id="viewer2-tab" data-toggle="tab" href="#viewer2">Viewer 2</a>
            </li>
        </ul>

        <div class="tab-content">
            <div class="tab-pane fade show active" id="viewer1" role="tabpanel">
                <div id="viewer1">
                </div>
            </div>
            <div class="tab-pane fade" id="viewer2" role="tabpanel">
                <div id="viewer2">
                </div>
            </div>
        </div>
    </main>

    <!-- Libraries -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.1/umd/popper.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>

    <!-- PrizmJS -->
    <script src="https://api.accusoft.com/v1/docstore/viewer/assets/classic/bundle.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/jquery.hotkeys.min.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/viewercontrol.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/viewer.js"></script>

    <!-- Inline Script -->
    <script>
        var viewingSessionId1;
        var viewerControl1;
        var viewingSessionId2;
        var viewerControl2;

        $(document).ready(function() {
            $.ajax({
                "type": "post",
                "url": "https://api.accusoft.com/PAS/V1/ViewingSession",
                "headers": {
                    "acs-api-key": ""
                },
                "data": JSON.stringify({
                    "source": {
                        "type": "url",
                        "url": ""
                    }
                })
            }).done(function(response) {
                viewingSessionId1 = response["viewingSessionId"];

                // Initialize viewer
                viewerControl1 = $("#viewer1").pccViewer({ 
                    documentID: viewingSessionId1,
                    imageHandlerUrl: "https://api.accusoft.com/v2/viewers/proxy",
                    language: languageItems,
                    template: htmlTemplates
                }).viewerControl;
            });

            $.ajax({
                "type": "post",
                "url": "https://api.accusoft.com/PAS/V1/ViewingSession",
                "headers": {
                    "acs-api-key": ""
                },
                "data": JSON.stringify({
                    "source": {
                        "type": "url",
                        "url": ""
                    }
                })
            }).done(function(response) {
                viewingSessionId2 = response["viewingSessionId"];

                // Initialize viewer
                viewerControl2 = $("#viewer2").pccViewer({ 
                    documentID: viewingSessionId2,
                    imageHandlerUrl: "https://api.accusoft.com/v2/viewers/proxy",
                    language: languageItems,
                    template: htmlTemplates
                }).viewerControl;
            });
        });
    </script>
</body>
</html>
Question

Can I host multiple PrizmDoc viewers on a single page?

Answer

It is possible to host multiple viewers on a single page. The following example leverages Bootstrap’s tab implementation:

<!DOCTYPE html>

<html lang="en">
<head>
    <!-- Metadata -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta name="description" content="" />

    <!-- Title -->
    <title>AccuSample</title>

    <!-- Libraries -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css">

    <!-- PrizmCSS -->
    <link rel="stylesheet" href="https://pcc-demos.accusoft.com/static/viewer-latest/css/viewercontrol.css">
    <link rel="stylesheet" href="https://pcc-demos.accusoft.com/static/viewer-latest/css/viewer.css">

    <!-- Inline Stylesheet -->
    <style>
        body {
            overflow-y: hidden;
        }
        #viewer1, #viewer2 {
            height: calc(100vh - 3em);
            width: 100%;
        }
    </style>

</head>
<body>
    <!-- #main -->
    <main class="container">
        <ul class="nav nav-tabs" role="tablist">
            <li class="nav-item">
                <a class="nav-link active" id="viewer1-tab" data-toggle="tab" href="#viewer1">Viewer 1</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" id="viewer2-tab" data-toggle="tab" href="#viewer2">Viewer 2</a>
            </li>
        </ul>

        <div class="tab-content">
            <div class="tab-pane fade show active" id="viewer1" role="tabpanel">
                <div id="viewer1">
                </div>
            </div>
            <div class="tab-pane fade" id="viewer2" role="tabpanel">
                <div id="viewer2">
                </div>
            </div>
        </div>
    </main>

    <!-- Libraries -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.1/umd/popper.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>

    <!-- PrizmJS -->
    <script src="https://api.accusoft.com/v1/docstore/viewer/assets/classic/bundle.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/jquery.hotkeys.min.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/viewercontrol.js"></script>
    <script src="https://pcc-demos.accusoft.com/static/viewer-latest/js/viewer.js"></script>

    <!-- Inline Script -->
    <script>
        var viewingSessionId1;
        var viewerControl1;
        var viewingSessionId2;
        var viewerControl2;

        $(document).ready(function() {
            $.ajax({
                "type": "post",
                "url": "https://api.accusoft.com/PAS/V1/ViewingSession",
                "headers": {
                    "acs-api-key": ""
                },
                "data": JSON.stringify({
                    "source": {
                        "type": "url",
                        "url": ""
                    }
                })
            }).done(function(response) {
                viewingSessionId1 = response["viewingSessionId"];

                // Initialize viewer
                viewerControl1 = $("#viewer1").pccViewer({ 
                    documentID: viewingSessionId1,
                    imageHandlerUrl: "https://api.accusoft.com/v2/viewers/proxy",
                    language: languageItems,
                    template: htmlTemplates
                }).viewerControl;
            });

            $.ajax({
                "type": "post",
                "url": "https://api.accusoft.com/PAS/V1/ViewingSession",
                "headers": {
                    "acs-api-key": ""
                },
                "data": JSON.stringify({
                    "source": {
                        "type": "url",
                        "url": ""
                    }
                })
            }).done(function(response) {
                viewingSessionId2 = response["viewingSessionId"];

                // Initialize viewer
                viewerControl2 = $("#viewer2").pccViewer({ 
                    documentID: viewingSessionId2,
                    imageHandlerUrl: "https://api.accusoft.com/v2/viewers/proxy",
                    language: languageItems,
                    template: htmlTemplates
                }).viewerControl;
            });
        });
    </script>
</body>
</html>
Question

How do I get Viewing Packages working in PrizmDoc?

Answer

Viewing Package Full Setup Instructions

We recommend pre-converting documents through a feature called viewing packages and it can be turned on in PAS Configuration.

viewingPackagesdefault: disabled – Enable Pre-Conversion Services and APIs, which allow you to pre-convert documents and cache on-demand document views in PAS, to improve the speed at which documents can be viewed, as well as reduce the processing time in PrizmDoc Server for repeat document views.

Enable Viewing Packages Feature

feature.viewingPackages: enabled

Since viewing packages also use a database you will need to create a database for PAS, configure a database, and run the scripts that are included to create the tables necessary for viewing packages to work.

Configuring Database


Install Microsoft SQL Express

Note 1: If you have Visual Studio installed, you might have to uninstall the recent versions of C++ that are installed before MSSQL Express will successfully install.

Remove Visual Studio C++ Redistributables

Note 2: When installing, use all default install settings except for setting a custom database instance id and set mixed mode authentication so a custom password can be set.

Turn On TCP/IP For Database Instance

Step 1:

step 1 enable tcp/ip

Step 2:

enable tcp/ip

Set Port 1433 for TCP/IP Connection

set port 1433 for tcp/ip connection

Restart SQL Express Instance

Right-click and select "Restart" or double-click and select "Restart".

restart sql express instance

Install Microsoft SQL Management Studio

Install from this downloads page

Connect To Database Instance In Microsoft SQL Management Studio

Connect To Database Instance In Microsoft SQL Management Studio

Create A Database In Microsoft SQL Management Studio

Create A Database In Microsoft SQL Management Studio

PAS Config Database Settings

feature.viewingPackages: "enabled"

database.adapter: "sqlserver"
database.host: "localhost"
database.port: 1433
database.user: "sa"
database.password: "Password1"
database.database: "prizmdb"


# Default timeout for the duration of a viewing session

defaults.viewingSessionTimeout: "20m"

viewingPackagesData.storage: "database"
viewingPackagesProcesses.storage: "database"
viewingSessionsData.storage: "database"
viewingSessionsProcessesMetadata.storage: "database"

viewingPackagesArtifactsMetadata.storage: "database"
viewingPackagesArtifacts.storage: "filesystem"
viewingPackagesArtifacts.path: "%ALLUSERSPROFILE%\\Accusoft\\Prizm\\ViewingPackages"

Create the database tables

Create the database tables

Restart PAS

Restart PAS


Create Viewing Package

viewing-package-creator

Get State of Viewing Package Creator Processing

viewing package creator process

Get Viewing Package Info With Document Id

viewing package info with document id

Create Viewing Session From Viewing Package With Document Id

Create Viewing Session From Viewing Package

View Document In Viewing Package With The Created Viewing Session Id

View Document In Viewing Package With The Created Viewing Session Id

For examples of creating viewing packages, click on the link below to see the various ways of using them:

Viewing Package Creators