Home : Changes Introduced in DotImage 11.0
Q10443 - INFO: Changes Introduced in DotImage 11.0

Release Notes

The full official release notes for DotImage can be found below:

Initial Release - v11.0.0.0.00297
FixPack 1 - v11.0.0.1.00338
FixPack 2 - v11.0.0.2.00358

Breaking Changes

WebDocumentViewer Resource Changes - v11.0.0.1.00338 and newer

WebDocumentViewer resources  - updated Jquery and JqueryUI versions

Old File New File
jquery-1.7.1.min.js jquery-1.11.0.min.js
jquery-ui-1.8.14.custom.css jquery-ui-1.10.4.min.css
jquery-ui-1.8.14.custom.min.js jquery-ui-1.10.4.min.js
clipboard.js -- removed --
clipboard.min.js clipboard.min.js (re-added in 11.0.0.2.00358)

This means you will need to update your script references from

    <script src="WebDocViewer/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="WebDocViewer/jquery.easing.1.3.js" type="text/javascript"></script>
    <script src="WebDocViewer/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
    <script src="WebDocViewer/raphael-min.js" type="text/javascript"></script>

    <script src="WebDocViewer/atalaWebDocumentViewer.js" type="text/javascript"></script>

    <link href="WebDocViewer/jquery-ui-1.8.14.custom.css" rel="Stylesheet" type="text/css" />
    <link href="WebDocViewer/atalaWebDocumentViewer.css" rel="Stylesheet" type="text/css" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">

to

    <script src="WebDocViewer/jquery-1.11.0.min.js" type="text/javascript"></script>
    <script src="WebDocViewer/jquery.easing.1.3.js" type="text/javascript"></script>
    <script src="WebDocViewer/jquery-ui-1.10.4.min.js" type="text/javascript"></script>
    <script src="WebDocViewer/raphael-min.js" type="text/javascript"></script>
    <!-- clipboard-min.js Removed in 11.0.0.0 - 11.0.0.1, required in 11.0.0.2 and newer -->
    <script src="WebDocViewer/clipboard-min.js" type="text/javascript"></script>

    <script src="WebDocViewer/atalaWebDocumentViewer.js" type="text/javascript"></script>

    <link href="WebDocViewer/jquery-ui-1.10.4.min.css" rel="Stylesheet" type="text/css" />
    <link href="WebDocViewer/atalaWebDocumentViewer.css" rel="Stylesheet" type="text/css" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">

 

Known Issues

Missing Classic ASP.NET Web Resource Files (FIXED in 11.0.0.2 and newer)

Users that use Web Resources folders with older ASP.NET controls (This does NOT apply to WebDocumentViewer or WebCapture) may note that the folloing files are missing

C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\ajax-loader_drk.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\AtalaCanvas.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\Background_Splash.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\ClientTools.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\CommentMinimized.png
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\Enums.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\excanvas-compressed.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\mask.png
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\spacer.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebAnnotation.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebAnnotationController.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebAnnotationViewer.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebAnnotationViewerSplash.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebImageViewer.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebImageViewerChild.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebImageViewerSplash.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebThumbnailViewer.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebThumbnailViewerChild.js
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebThumbnailViewerSplash.gif
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\Zoom.cur
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\ZoomIn.cur
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\ZoomOut.cur

This is a known issue and should be addressed in 11.0.0.2 in end of October 2017

In the meantime, we've attached WebResources_11.0.0.1.00338.zip to this case

Alternate download link: WebResources_11.0.0.1.00338.zip

 

TempFile Extraction for Atalasoft.PdfIum.dll

Atalasoft changed to a new PDF engine in 11.0. Due to internal reasons, we need to extract the Atalasoft.PDFium.dll into the TEMP directory of the current user's profile.

For the vast majority of users, this should be completely transparent. However, if you have a particularly locked down system and receive permissions errors relating to the Atalasoft.PDFium.dll or the temp folders, here is the information you will need to resolve the issue:

For windows users/apps running under "normal" accounts that would be c:\users\YOUR_NAME\AppData\Local\Temp\
(full path would be c:\users\YOUR_NAME\AppData\Local\Temp\Atalasoft\DotImage\VERSION_NUMBER\x86orx64\Atalasoft.PDFium.dll )

For services running under system accounts.. including web applications under IIS, the user account that runs it may be a non-interactive account without a profile. In those cases it falls back on
c:\Windows\TEMP\
(full path would be c:\Windows\TEMP\Atalasoft\DotImage\VERSION_NUMBER\x86orx64\Atalasoft.PDFium.dll )

Once it's extracted for that version, it should be able to read from others, and you may just be able to (depending on how locked down your system is) set read/execute permissions to be a bit more Open.

If you're encountering this in a web app or service, your other option would be to ensure that the user running the IIS process / windows service has an actual user profile of its own and that each app has a unique user.

Or, if you're using IIS 7.5, it is possible to configure temp folder for each app
https://serverfault.com/questions/350550/is-it-possible-to-configure-the-location-of-temporary-asp-net-files-folder-in

 

PdfReader Related License Changes

DotImage 11.0 includes an entirely new PdfReader assembly.

Users with existing PRS2 / PRSX2 licenses will be issued new PRP2 / PRPX2 serial numbers automatically.

New purchases of PdfReader add-on will provide PRP2 / PRPX2 serials only.

What this means is that for licensing 11.0 and newer, users will want to activate their new PRP2 / PRPX2 serials instead of their PRS2 / PRSX2 serials.

If you are a currently licensed user of the PdfReader add-on and have existing PRS2 / PRSX2 serials under maintenance, and have not received your new PRP2/PRPX2 serial(s) from Atalasoft, please check with the person within your company who handles the Atalasoft billing/renewals.

If you're unsure of who within your company would have received the updated serials, you may open a support ticket and we can assist.

NOTE: if you need to activate / license a 10.7 or older DotImage with PdfReader, you will need to use your PRS2 / PRSX2 serial(s) as the PRP2/ PRPX2 serials are only for 11.0 and newer.

Support for Large PDF Files > 2 GiB

As a "side effect" of updating to the newer Pdfium engine, we now can support PDF files > 2 GiB in size (previously even on 64 bit systems, the max size for a PDF file was 2 GiB due to the use of signed 32 bit integers for stream position pointers internal in the PdfReader library

This limit is no longer in place, so you should be able to read from/ write to PDF files up to 4 GiB in size

 

Client-Side (JavaScript) API Documentation Moved

The DevelopersGuide.pdf which comes with DotImage (C:\Program Files (x86)\Atalasoft\DotImage 11.0\Help\DevelopersGuide.pdf) no longer contains client-side JavaScript API documentation for WebDocumentViewer and WebDocumentThumbnailer. that documentation has been moved to

WebDocumentViewer JavaScript API:
https://atalasoft.github.io/web-document-viewer/

Additionally, we are no longer shipping WingScan API Reference.pdf in the WebCapture Resources folder:
C:\Program Files (x86)\Atalasoft\DotImage 11.0\bin\WebResources\WebCapture

That documentation has been moved to:

WebCaptureService (WingScan) JavaScript API:
https://atalasoft.github.io/web-capture-service/

 

.NET 2.0 and .NET 4.0 dlls updated to 3.5 and 4.5.2

DotImage has shipped with .NET 2.0 dlls since version 6.0 and with .NET 4.0 dlls since version 9.0. Microsoft is dropping support for .NET frameworks 2.0 and 3.0 and also for .NET 4.0, 4.5, and 4.5.1.

DotImage in 11.0 and newer will no longer provide .NET 2.0 and .NET 4.0 DLLs, and instead will ship with .NET 3.5 and .NET 4.5.2 respectively. The .NET 4.5.2 DLLS will work with the .NET 4.6 variants as well.

 

Support for ASP.NET Core Apps for WebDocumentViewer and WebCapture

DotImage 11.0 now has support for .NET Core for web applications using WebDocumentViewer and /or Web Capture.

IMPORTANT NOTE:
Atalasoft DotImage components can be used along with ASP.Net Core libraries, but it requires the application to be built for .Net Framework 4.5.2.

You should create new projects in Visual Studio from the  ASP.NET Core Web Application template, using .NET Framework and ASP.NET Core 1.1 like this:

By default the left combobox has value .NET Core which we do not support. If you try to create new project with default settings, you won't be able to use the WDV.

We have a similar screenshot in our tutorial, but Microsoft updated its template in a recent VisualStudio update.

For more information / guidance on using WebDocumentViewer in an ASP .NET Core project, please have a look at our online tutorial.

Customizing Middleware  / Event Handling (Formerly Custom Handler)

In the tutorial, you will see a brief mention about customizing the middlware:

If you want to customize this middleware, you can choose another overload of the method RunWebDocumentViewerMiddleware that accepts implementation of the interface IWebDocumentViewerCallbacks.

However, it's a bit light on details. So here's the "missing piece"

Instead of this line
app.Map("/wdv", wdvApp => { wdvApp.RunWebDocumentViewerMiddleware(); });

use this line:
app.Map("/wdv", wdvApp => { wdvApp.RunWebDocumentViewerMiddleware(new MyWDVCallbacks()); } );

and add this class

public class MyWDVCallbacks : WebDocumentViewerCallbacks
{
    public override void DocumentInfoRequested(DocumentInfoRequestedEventArgs args)
    {
        Console.WriteLine("**********===DocumentInfoRequested===**********");
        base.DocumentInfoRequested(args);
    }

    public override void ImageRequested(ImageRequestedEventArgs args)
    {
        Console.WriteLine("**********===ImageRequested===**********");
        base.ImageRequested(args);
    }
    
    /*
     * The above was just an example of hooking to the two main events.. you can handle any exposed event here
     *
     * //.. most common ...
     *  AnnotationDataRequested
     *  DocumentSave
     *  DocumentStreamWritten
     *  AnnotationStreamWritten
     *  //.. less common .
     *  PageTextRequested
     *  PdfFormRequested
     *  //.. rarely if ever used .. 
     *  ReleaseDocumentStream
     *  ReleasePageStream
     *  ResolveDocumentUri
     *  ResolvePageUri
     */
}

 

Annotation Burning in WebDocumentViewer

We've added annotation burning to WebDocumentViewer. to use this feature, you need to set the burn property of a given annotation to "true" and update the annotation. Then on save, the annotation will be burned to the saved document instead of saved in annotation data.

// Burn all annotations on a single page
function burnAllAnnosOnPage(pageIndex) {
    var annos = _viewer.getAnnotationsFromPage(pageIndex);
    if (annos != null) {
        for(var i=0; i < annos.length; i++){
            var anno = annos[i];
            anno.burn =
true;
            anno.update();
        }
    }
}

// burn all annos on all pages
function burnAllAnnos() {
    var pageCount = _viewer.getDocumentInfo().count;
    if (pageCount != null && pageCount > 0) {
        for (var i = 0; i < pageCount; i++) {
            burnAllAnnosOnPage(i);
        }
    }
}


now, when you call save on the viewer, any annotations with burn=true will be burned to the image

 

Reloading Individual Pages in WDV/WDT

11.0 introduced the new feature of being able to reload a single changed page in the WebDocumentViewer and WebDocumentThumbnailer controls

If using WDT with WDV, then calling

_thumbs.document.reloadPage(pageIndex);

will reload the thumbnail

_viewer.document.reloadPage(pageIndex);

will reload the Web Document Viewer page

 

PdfGeneratedDocument (DotPdf) ImportPages and Form Merge Conflict Resolution

PdfGeneratedDocument now has a new ImportPages feature designed to easily allow for importing pages from additional external PDFs.

PdfDocument can not combine PDFs where more than one of the documents has AcroForm elements. The new ImportPages feature of PdfGeneratedDocument includes conflict resolution events to allow for handling such cases

Q10428 - HOWTO: Combine Multiple PDF Files With Fillable Forms (AcroForms)

Quick Example:
private void MergePdfWithFormsConflicResolution(string baseFile, string importFile, string outFile)
{
    using (FileStream baseFileStream = new FileStream(baseFile, FileMode.Open, FileAccess.Read, FileShare.Read))
    {
        using (PdfGeneratedDocument genDoc = new PdfGeneratedDocument(baseFileStream))
        {
            using (FileStream importFileStream = new FileStream(importFile, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                genDoc.ImportPages(importFileStream, new ImportOptions
                {
                    //// These are additional options available
                    //InsertIndex = -1,
                    //PagesToImport = new int[] {1,3,5,7},
                    //OwnerPassword = "",
                    //UserPassword = "",
                    //RepairOptions = new Atalasoft.PdfDoc.Repair.RepairOptions(),
                    //// This option is the key one for merging with acroforms conflict resolution
                    FormFieldsConflictHandler = ResolveFormFieldsConflict
                });

                using (FileStream outFileStm = new FileStream(outFile, FileMode.Create))
                {
                    genDoc.Save(outFileStm);
                }
            }
        }
    }
}

/// <summary>
/// Example conflict resolution where we'll let the forms just bring in their fields normally, and only rename fields if needed
///  the rename here is VERY SIMPLE and may not be complex enough (we just pre-end "new" to the field name of any conflicting field"
///  You could do something involving random numbers/letters , GUID etc..
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
private static void ResolveFormFieldsConflict(object sender, FormFieldsConflictEventArgs args)
{
    if (args.AreFieldTypesEqual)
    {
     // no conflict really so just let it ride
        args.ConflictResolution = FormFieldsConflictResult.KeepCurrentFieldAndMergeChildren;
    }
    else {
        // generate new name for field
        args.ExternalField.FieldName = "new" + args.ExternalField.FieldName;
        args.ConflictResolution = FormFieldsConflictResult.KeepBoth;
    }
}

Related Articles
No Related Articles Available.

Article Attachments
WebResources_11.0.0.1.00338.zip

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2017. InstantASP Ltd. All Rights Reserved