PrizmDoc® v14.4 Release - Updated
PrizmDoc / 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.

    Use the Viewing Package Creators API to create a viewing package; make sure to set the packageType request parameter to pdf.

    When viewing documents, check if the corresponding package exists, by using the GET /v2/viewingPackages/{documentId} request. If it does, create the viewing session from the viewing package, by setting the type parameter of the POST /ViewingSession request to viewingPackage. Otherwise, create a regular viewing session.

    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.

    If only a small portion of your source documents have associated markup, you may choose to only create viewing packages for those documents, and view the rest of your documents without the use of viewing packages.

    When viewing documents, check if the corresponding package exists, by using the GET /v2/viewingPackages/{documentId} request. If it does, create the viewing session from the viewing package, by setting the type parameter of the POST /ViewingSession request to viewingPackage. Otherwise, create a regular viewing session.