PrizmDoc® Viewer v13.28 Release - Updated
PrizmDoc Viewer / Developer Guide / Keep Markup Intact with Documents
In This Topic
    Keep Markup Intact with Documents
    In This Topic

    Introduction

    Since PrizmDoc continuously improves the rendering of documents, upgrading to a new PrizmDoc version causes some documents to display differently than how they displayed prior to the upgrade. In particular, some text may shift to another line or even another page. The same may occur if you upgrade your system to a new OS version, install or remove fonts, or make other system wide updates.

    If you have previously created markup (annotations or redactions) and saved for future use, instead of immediately burning it to your documents, such an update may cause the markup to mis-align with the rendered document.

    In order to keep your saved markup intact with rendered documents, use PrizmDoc PDF-only Viewing Packages.

    A PDF-only Viewing Package is a PDF version of your document stored by PrizmDoc, along with the source document and the metadata that stores your viewing session parameters. For emails that have attachments and PDF Portfolio documents, the viewing package also contains PDF versions of all attachments and portfolio contents. Storing the content as a PDF allows PrizmDoc to render documents the same even after PrizmDoc or system updates.

    Source documents which already have a fixed layout (PDF, raster or CAD documents), do not have such an issue with markup. However, since you may not know the format of your documents in advance, we recommend that you create viewing packages for all kinds of documents. If the format is fixed, PrizmDoc will only store the source document in the viewing package and will not additionally create a PDF, to avoid the unnecessary usage of resources.

    Another important benefit of viewing packages is that they take much less time to display than original documents, especially when documents are large.

    Pre-requisites

    • You need to use the PrizmDoc Application Services (PAS) component.
    • PAS must be configured with a database connection and a document storage; Viewing Packages must also be enabled.
    • You will need unique documentId's for your viewing packages. You can choose to either create them on-the-fly, based on source documents and viewing parameters, or generate them randomly and associate with your documents via a database.

    Use Case: Keeping Markup Intact for New Documents

    If you are already on the latest version of PrizmDoc, or just started using PrizmDoc, create a PDF-only Viewing Package every time a user views a new document.

    It is easiest to use the On-Demand Caching approach, which allows you to trigger a Viewing Package creation process in the background as soon as a document is uploaded for viewing, and use the resulting Viewing Package when it is ready. When viewing a document, use the same POST /ViewingSession request as you used previously, specify the documentId that corresponds to your document, and set the packageType request parameter to pdf. If the specified viewing package already exists and is ready to use, PrizmDoc will use its artifacts for viewing. If the viewing package does not exist yet, PrizmDoc will trigger its creation.

    If most of your source documents are only viewed a small number of times, and markup is only created for a small subset of documents, you may want to create viewing packages when you create markup, as opposed to creating a viewing package for every document. In this case, you can specify the documentId in the POST MarkupLayers request. If the viewing package does not exist yet, PrizmDoc will start the creation of a new PDF Viewing Package in the background. When viewing documents, use the same POST /ViewingSession request as you used previously, specify the documentId that corresponds to your document, and set the createViewingPackage parameter to false. This will allow you to only use viewing packages when they exist, while avoiding the creation of a viewing package for every viewed document.

    Use Case: Preparing for an Upgrade when you have Existing Markup

    If you have previously created markup and need to upgrade to a new version of PrizmDoc (e.g. from 13.x to 14.4), you should go through your documents and create viewing packages for them. You can use our template script as a starting point.

    A high level pseudocode for the script is given below.

    For each document in your storage:

    • Calculate the Document ID
    • Create the viewing package
    • Analyze the result. If PrizmDoc returns DocumentIdAlreadyInUse, then you have already created this viewing package.

    When viewing a document, use the same POST /ViewingSession request as you used previously, specify the documentId that corresponds to your document and set the packageType request parameter to pdf. If the specified viewing package already exists and is ready to use, PrizmDoc will use its artifacts for the viewing. If the viewing package does not exist yet, PrizmDoc will trigger its creation.

    If most of your source documents are only viewed a small number of times, and markup is only created for a small subset of documents, you may want to only create viewing packages for selected documents. In this case, when viewing documents, use the same POST /ViewingSession request as you used previously, specify the documentId that corresponds to your document and set the createViewingPackage parameter to false. This will allow you to only use viewing packages when they exist, while avoiding the creation of a viewing package for every viewed document.