Technical FAQs

Question

I am combining multiple PDF documents together, and I need to create a new bookmark collection, placed at the beginning of the new document. Each bookmark should go to a specific page or section of the new document.
Example structure:

  • Section 1
    • Document 1
  • Section 2
    • Document 2

How might I do this using ImageGear .NET?

Answer

You are adding section dividers to the result document. So, for example, if you are to merge two documents, you might have, say, two sections, each with a single document, like so…

  • Section 1
    • Document 1
  • Section 2
    • Document 2

…The first page will be the first header page, and then the pages of Document 1, then another header page, then the pages of Document 2. So, the first header page is at index 0, the first page of Document 1 is at index 1, the second header is at 1 + firstDocumentPageCount, etc.

The following code demonstrates adding some blank pages to igResultDocument, inserting pages from other ImGearPDFDocuments, and modifying the bookmark tree such that it matches the outline above, with "Section X" pointing to the corresponding divider page and "Document X" pointing to the appropriate starting page number…

// Create new document, add pages
ImGearPDFDocument igResultDocument = new ImGearPDFDocument();
igResultDocument.CreateNewPage((int)ImGearPDFPageNumber.BEFORE_FIRST_PAGE, new ImGearPDFFixedRect(0, 0, 300, 300));
igResultDocument.InsertPages((int)ImGearPDFPageNumber.LAST_PAGE, igFirstDocument, 0, (int)ImGearPDFPageRange.ALL_PAGES, ImGearPDFInsertFlags.DEFAULT);
igResultDocument.CreateNewPage(igFirstDocument.Pages.Count, new ImGearPDFFixedRect(0, 0, 300, 300));
igResultDocument.InsertPages((int)ImGearPDFPageNumber.LAST_PAGE, igSecondDocument, 0, (int)ImGearPDFPageRange.ALL_PAGES, ImGearPDFInsertFlags.DEFAULT);

// Add first Section
ImGearPDFBookmark resultBookmarkTree = igResultDocument.GetBookmark();
resultBookmarkTree.AddNewChild("Section 1");
var child = resultBookmarkTree.GetLastChild();
int targetPageNumber = 0;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add first Document
child.AddNewChild("Document 1");
child = child.GetLastChild();
targetPageNumber = 1;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add second Section
resultBookmarkTree.AddNewChild("Section 2");
child = resultBookmarkTree.GetLastChild();
targetPageNumber = 1 + igFirstDocument.Pages.Count;
setNewDestination(igResultDocument, targetPageNumber, child);

// Add second Document
child.AddNewChild("Document 2");
child = child.GetLastChild();
targetPageNumber = 2 + igFirstDocument.Pages.Count;
setNewDestination(igResultDocument, targetPageNumber, child);

// Save
using (FileStream stream = File.OpenWrite(@"C:\path\here\test.pdf"))
{
    igResultDocument.Save(stream, ImGearSavingFormats.PDF, 0, 0, igResultDocument.Pages.Count, ImGearSavingModes.OVERWRITE);
}

...

private ImGearPDFDestination setNewDestination(ImGearPDFDocument igPdfDocument, int targetPageNumber, ImGearPDFBookmark targetNode)
{
    ImGearPDFAction action = targetNode.GetAction();
    if (action == null)
    {
        action = new ImGearPDFAction(
            igPdfDocument,
            new ImGearPDFDestination(
                igPdfDocument,
                igPdfDocument.Pages[targetPageNumber] as ImGearPDFPage,
                new ImGearPDFAtom("XYZ"),
                new ImGearPDFFixedRect(), 0, targetPageNumber));
        targetNode.SetAction(action);
    }
    return action.GetDestination();
}

(The setNewDestination method is a custom method that abstracts the details of adding the new destination.)

Essentially, the GetBookmark() method will allow you to get an instance representing the root of the bookmark tree, with its children being subtrees themselves. Thus, we can add a new child to an empty tree, then get the last child with GetLastChild(). Then, we can set the action for that node to be a new "GoTo" action that will navigate to the specified destination. Upon save to the file system, this should produce a PDF with the below bookmark structure…

Bookmarks example

Note that you may need to use the native Save method (NOT SaveDocument) described in the product documentation here in order to save a PDF file with the bookmark tree included. Also, you can read more about Actions in the PDF Specification.

Question

I have an evaluation license for PrizmDoc. Can I evaluate MSO features with this evaluation license?

Answer

No, regular PrizmDoc evaluation licenses do not have MSO functionality. They will instead use LibreOffice to convert documents. Contact an Accusoft Support Technician or your Account Representative to discuss evaluating PrizmDoc with MSO enabled.

Question

Is it possible to only use PrizmDoc on an internal network? Does the product make attempts to connect to sites that are on the Internet? Does it try to reach Accusoft?

Answer

The only cases where PrizmDoc must be connected to the Internet are as follows:

  • If you are running the PLU in online mode.
  • If your PrizmDoc deployment uses cloud licensing. In this case, PrizmDoc requires Internet access to get to the S3 bucket.

Beyond these cases, PrizmDoc can be installed on an internal network and used normally.

Question

In PrizmDoc, I can get the coordinates of a Click event. However, this corresponds to the window coordinates of my viewer. How can I translate this to coordinates of the actual page?

Answer

As specified in our documentation here, PrizmDoc offers the following method:

convertPageToWindowCoordinates(pageNumber, points)

This appears to do the opposite of what we want: it takes in a page number and coordinates of the page, and converts them and outputs window coordinates. However, we can use this to get what we want. Suppose we test coordinates (0,0) of the page, we should get:

Page: (0,0)
Window: (0,0)

Now let’s test point (0,1) of the page, let’s call this a “Unit Distance”. Suppose we get back:

Page: (0, 1)
Window: (0, 5)

If the function gave us this, then we know that the coordinate transformation along the Y-axis is a factor of 5. Now whenever we want to know the correct image coordinate, we can simply divide our window’s Y coordinate by 5. Programmatically, you should be able to take the information from the Unit Distance in both the X and Y axis, and create a function in which you input Window Coordinates and output Page Coordinates.

Question

Which databases types are supported by PrizmDoc for storing annotation/redaction layers as well as viewing package information?

Answer

PrizmDoc provides the option to store viewing package process and creation information, as well as annotation layer JSON information, into a database.

Currently, Microsoft SQL Sever and MySQL is supported for this type of storage. For more information on setting up a database for use with PrizmDoc, please refer to the following documentation:

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#run-database-scripts.html.

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#developer-guide.html.

TAMPA, Fla. – Accusoft, the leader in document and imaging solutions for developers, is proud to announce its beta release testing program, which provides participants with real-time access to its latest product developments.

Customer input is a key factor in Accusoft’s mission to build better software integrations that deliver functionality like OCR, image cleanup, forms processing, file manipulation, and viewing solutions. Thanks to the new beta program, participants will get early access to brand new products and have the opportunity to provide feedback on the latest features for existing products. Developers can also customize what types of betas they would like to opt into so they can focus on products most relevant to their business.

“Our previous betas for PrizmDoc Editor and PrizmDoc Cells were extremely beneficial for everyone involved, “ says Mark Hansen, Product Manager. “Our team received rapid feedback that helped make our products better, while participants had the opportunity to shape those products to meet their specific requirements.”

By signing up for the beta program now, you can participate in the active beta for PrizmDoc Forms integration, which will allow you to repurpose (or use) your PDF forms to easily create, customize, and deploy as web forms anywhere. You’ll also be the first to know about new product offerings and have the ability to opt into beta releases for Accusoft’s existing products, such as ImageGear, FormSuite for Structured Forms, and PrizmDoc Suite.

To learn more about Accusoft’s exciting new beta program, please visit our website at https://www.accusoft.com/company/customers/beta-release-program.

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 viewing documents using Internet Explorer 11, we are noticing an abnormally high CPU utilization. It gets worse when zooming in up to 800% through the PrizmDoc Viewer. It only seems to happen on certain machines. Why might this be happening?

Answer

A possible factor for this type of performance issue can potentially be corrected by enabling Internet Explorer’s hardware acceleration feature.

This feature can be enabled or disabled with the following steps:

  1. Open Internet Explorer 11, click on the Tools icon, and select Internet Options.
  2. Navigate to the Advanced tab and enable the Use software rendering instead of GPU rendering option.
  3. Click Apply and restart the browser.
Question

Can we give network paths for source document location as well?

For example //10.216.2.312/test/test.doc

https://help.accusoft.com/PrizmDoc/latest/HTML/webframe.html#Transfer_Your_Document_to_PrizmDoc_Server.html.

When using http URL, for security reasons, only absolute paths are allowed, but could you map test to documents and use a local file?

Answer

Documents are stored by default in:

C:\ProgramData\Accusoft\Prizm\Documents 

so if the type in the request for source is document it will look in that folder. The configuration for that is set in PAS config:

    {
        "source": {
            "type": "document",
            "fileName": "1040ez.pdf"
        }
    }
Question

Where does PrizmDoc store E-Signatures and how can I retrieve them?

Answer

PrizmDoc does not store E-Signatures on the server. However, PrizmDoc does store them in the browser’s local storage so that an end user can use the same signature across multiple documents and multiple sessions within the same browser.

In the Viewer Sample, end users are able to save their individual signatures for their own record using the “Download Signature” button under the Manage E-Signatures menu. This will download a plain-text JSON file of the selected signature.

In the E-Signing Sample, if you want to retrieve the E-Signature from your own browser, you can open the developer tools (F12 on Chrome), go to the application tab, select local storage, and inside you can find the JSON of the E-Signature in the value of pccvEsignSignatures.

Question

I have just installed PrizmDoc to my Windows server. When checking the status using http://localhost:18681/admin, the service is showing in a starting phase and ms-office-conversion-service is showing a clock icon, but it never starts.

What are some reasons as to why this might occur?

Answer

This can happen if your PrizmDoc license has the MSO feature enabled and you do not have Microsoft Office 2013 or 2016 installed, or Office 2013 or 2016 is not activated.

To fix this issue you can either:

  • Install Microsoft Office 2013 or 2016, activate it, and reboot the server.

Or:

  • Switch PrizmDoc to use LibreOffice until you are able to install Microsoft Office by modifying C:\Prizm\prizm-serivices-config.yml and updating the line:

    #fidelity.msOfficeDocumentsRenderer: auto
    

    to:

    fidelity.msOfficeDocumentsRenderer: libreoffice
    
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

When looking at the configuration files for both PAS (pcc.win.yml, pcc.nix.yml) and PrizmDoc Server (prizm-services-config.yml), there appear to be similar settings for Viewing Session timeouts: defaults.viewingSessionTimeout (PAS) and viewing.sessionLifetime (Server). What is the difference between the two?

Answer

The difference is as follows:

PAS

defaults.viewingSessionTimeout

This setting is used when the viewing session POST requests use source.type="viewingPackage".

Prizm Server

viewing.sessionLifetime

This setting is used for all other viewing session POST requests.