Atalasoft Dev Team Blog2018-10-11T09:54:48+00:00http://atalasoft.github.ioAtalasoft from KofaxNuGet Tutorial - Web Document Viewer (2018)2018-10-11T00:00:00+00:00http://atalasoft.github.io/2018/10/11/nuget-tutorial-wdv<p>Hi, this is Denis.</p>
<p>This blog entry is an update to our previous article <a href="/2016/06/21/nuget-tutorial-wdv/">NuGet Tutorial I - Web Document Viewer</a> which was written in 2016. Many things were changed since that, so it’s time to update that guide.</p>
<!--more-->
<p>I assume that you have heard about <a href="http://www.atalasoft.com/Technical-Details/net-technical?s=2">Web Document Viewer</a> (WDV) already and look forward for how to use it!</p>
<p>Here and next I will use VS2017 (15.8.6), so the user interface will be quite different from what we used in original article. And the target framework for the application will be .NET 4.5.2 which is the same as we targets with DotImage assemblies. However you can use any other framework that is more preferable for you.</p>
<p>So, let’s start with empty ASP.NET project:</p>
<p><img src="/images/2018/10/nuget-tutorial-empty-project.png" alt="Create new empty ASP.NET project" /></p>
<p>We are going to use Empty ASP.NET template - because we want to see what exactly should we write to use WDV in our project.</p>
<p><img src="/images/2018/10/nuget-tutorial-empty-asp-project.png" alt="Select Empty ASP.NET template" /></p>
<p>Next step is to add DotImage packages to the project. To do that,
right-click on the project and select <em>Manage NuGet Packages</em>:</p>
<p><img src="/images/2018/10/nuget-tutorial-add-packages.png" alt="Select Empty ASP.NET template" /></p>
<p>For the purposes of this tutorial we need to install two packages:</p>
<ul>
<li>
<p><strong>Atalasoft Web Document Viewer</strong> - JavaScript WDV/WDT components including
all additional dependencies we have (<a href="https://jquery.com/">jQuery</a>,
<a href="http://dmitrybaranovskiy.github.io/raphael/">Raphael.js</a>,
<a href="https://jqueryui.com/">jQuery.UI</a>). It also has a dependency on a <a href="https://clipboardjs.com/">Clipboard.js</a>, but since there are no
a separate NuGet package for it, we include it in our package.</p>
</li>
<li>
<p><strong>Atalasoft DotImage WebContorls (32-bit)</strong> - server side code that supports
Web Document Viewer. I’m using 32-bit package here, since IIS Express is 32-bit process by default.
In real life you may want to choose 64-package.</p>
</li>
</ul>
<p>During installation of these two packages a lot of stuff happens behind the scenes:</p>
<ul>
<li>NuGet infrastructure downloads .NET assemblies along with all dependencies, specified in
package definition. All the assemblies are referenced automatically, so you don’t need
to do it explicitly:
<img src="/images/2018/10/nuget-tutorial-references.png" alt=".NET References" /></li>
<li>Web Document Viewer is a JavaScript component that also has some dependencies on
other 3rd party libraries. NuGet downloads them as well and adds to the project:
<img src="/images/2018/10/nuget-tutorial-js-resources.png" alt=".NET References" /></li>
</ul>
<p>Once you have both packages installed, you are ready to add some code. The process is very
similar to what is described in our <a href="https://atalasoft.github.io/web-document-viewer/tutorial-demo-application.html">Dev guide</a> - I will briefly cover it below.</p>
<p>We are going to start with adding Generic Handler to the project
(right-click on the project and select <em>Add -> New Item…</em>) Enter <em>WebDocViewerHandler</em>
as a name of the handler:</p>
<p><img src="/images/2018/10/nuget-tutorial-add-handler.png" alt="Select Empty ASP.NET template" /></p>
<p>Replace generated code with the following:</p>
<script src="https://gist.github.com/guest512/05ce7268b75776c4cd5af31f5a7e53cb.js"></script>
<p>We plan to show PDF files in our viewer, so let’s register
<a href="https://www.atalasoft.com/docs/dotimage/docs/html/T_Atalasoft_Imaging_Codec_Pdf_PdfDecoder.htm">PdfDecoder class</a>
to support PDF rendering on server side. For web applications, the most simple
way to achieve this is to add <em>Global.asax</em> file with the following content:</p>
<script src="https://gist.github.com/guest512/85dbafaadaee2feebe24ac4e1e5e331f.js"></script>
<p>The final thing we need to do on the server side, is to add some files for rendering.
I created <em>Documents</em> folder in my web site structure and put a PDF there:</p>
<p><img src="/images/2018/10/nuget-tutorial-sample-document.png" alt="Sample PDF Document" /></p>
<p>Now we have sever side ready, so we can move on and create a simple <em>index.html</em> web page
(right-click on the project and select <em>Add -> HTML Page</em>). Below is HTML markup you
can use to add and initialize Web Document Viewer / Thumbnailer:</p>
<script src="https://gist.github.com/guest512/d73f6cbbc8499e5a6c33f7b7c877f03e.js"></script>
<p>That’s it! You just need to start you web site and in a moment you will see your PDF
file and will be able to play with it using Web Document Viewer:</p>
<p><img src="/images/2018/10/nuget-tutorial-done.png" alt="Complete Application" /></p>
<h2 id="conclusion">Conclusion</h2>
<p>The steps I described here can be completed in 5-10 minutes even if you try to use Atalasoft toolkit for the first time. But you can achieve the same result even faster if you clone ready-to-go project from GitHub repository we created to hold our tutorial projects - all you need to do is to open the project in Visual Studio and run it - all necessary NuGet packages will be downloaded automatically during the build.</p>
Any CPU Support (kind of)2016-10-28T10:00:00+00:00http://atalasoft.github.io/2016/10/28/any-cpu-support<p>AnyCPU is great. Period. You don’t need to think about architecture. It just works.
Everyone loves to build AnyCPU applications, they are much easier to port to
different platforms (hello <a href="http://www.mono-project.com/">Mono</a>,
hello <a href="https://www.microsoft.com/net/core">.NET Core</a>), they are supported on both
x86 and x64 architectures.</p>
<!--more-->
<p>There is only one disadvantage. You are not always able to build AnyCPU assembly.</p>
<blockquote>
<p>disappointed noise, tears, people stop programming and start visiting kitchen
classes - a great choice of profession to be honest.</p>
</blockquote>
<p>Why you can’t? Typical reasons:</p>
<ul>
<li>3rd party library you use is not available as AnyCPU.</li>
<li>You have portion of the library written in C++</li>
</ul>
<p>I guess these are the most common reasons, at least we are facing them here in
Atalasoft - we have a number of dependencies that are architecture-specific,
so we are forced to provide both x86 and x64 flavors of our assemblies.</p>
<p><strong>We</strong> are forced, but <strong>you</strong> don’t have to be! There is an easy trick that would
allow you to build AnyCPU apps using architecture-specific DotImage assemblies.
Sounds like magic? Read on! :)</p>
<h2 id="technical-details">Technical Details</h2>
<p>Solution is pretty simple - we just need to add a bit of intelligence and load
correct version of an assembly at runtime, depending on process architecture.</p>
<p>There are some small tricks to make this mechanism work under IIS with
<a href="https://msdn.microsoft.com/en-us/library/ms404279.aspx">shadow copy enabled</a>, but
luckily it is pretty easy to achieve. Basically, here is the annotated code that does the trick:</p>
<script src="https://gist.github.com/kolomiets/162562a0aacae96c951f0de4aba6394e.js"></script>
<h2 id="project-configuration">Project configuration</h2>
<p>Additional project configuration is required to simplify deployment of architecture
specific assemblies during project build.</p>
<p>First, we need to disable <em>Copy Local</em> setting for referenced assemblies
to prevent them from being copied to output folder during project build:</p>
<p><img src="/images/2016/10/any-cpu-demo-copy-local.png" alt="Copy Local configuration" /></p>
<p>Second, we need to copy both x86 and x64 versions of the assemblies to output folder
during the project’s build, and the most simple way to achieve that is to use
<em>Copy to Output Directory</em> setting as shown below (first you need to add these
files to the project using <em>Add -> Existing Item…</em> option):</p>
<p><img src="/images/2016/10/any-cpu-demo-copy-to-output.png" alt="Copy assemblies to output folder" /></p>
<p>Once you did these changes, project build will produce a nice folder structure we need:</p>
<p><img src="/images/2016/10/any-cpu-demo-output.png" alt="Build results" /></p>
<h2 id="conclusion">Conclusion</h2>
<p>There is nothing specific about Atalasoft assemblies in this approach. We used
it successfully in different projects with different architecture-specific libraries.</p>
<p>For your convenience
I put this simple project on <a href="https://github.com/Atalasoft/any-cpu-demo">any-cpu-demo GitHub repository</a>,
so you could easily fork it there.</p>
<p>Cheers!</p>
Web Document Viewer - Bower package2016-09-01T10:00:00+00:00http://atalasoft.github.io/2016/09/01/bower-tutorial-wdv<p><strong>Motivation</strong></p>
<p>Since lately we have introduced NuGet packages for our <a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">Web Document Viewer component</a> we have worked out another scenario of separating frontend and backend development.
<!--more-->
There are special package managers to deliver frontend components only. We have looked into them and chosen <a href="https://bower.io/">Bower</a>. Therefore we created a new package for introducing the ability to manage our viewer as a standard frontend web component.</p>
<p><strong>Introduction</strong></p>
<p><a href="https://bower.io/">Bower</a> is a package manager for frontend dependencies. Bower has a cross-platform support and can be used outside .Net projects.</p>
<p>The Web Document Viewer component is included in our main product <a href="http://www.atalasoft.com/Products/DotImage">DotImage</a> and the files distributed in the Bower package are also available as a part of DotImage standalone installation, as well as they can be obtained from the <a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">NuGet package</a>. But as soon as we speak about cross-platform frontend development we need to use frontend-specific package, i.e. supported by Bower.</p>
<p>In this article we are going to step through a simple application creation using our new Bower package called <a href="https://github.com/Atalasoft/web-document-viewer">web-document-viewer</a>.</p>
<p><strong>How to install Bower</strong></p>
<p>Bower installation is held using <a href="https://www.npmjs.com/">npm</a>. Npm is also an online repository for JavaScript dependencies, but it implies server-side JavaScript components management (NodeJS). The difference between npm and Bower lies mainly in the way of managing the dependencies concerning versioning. Bower dependencies can contain only one version of a concrete library (i.e. JQuery 1.8.3), so that dependency tree has a linear structure, whereas npm dependencies may reference to different versions of a concrete library (i.e. JQuery 1.8.3 for one component and JQuery 3.1.0 for another component), so that the dependency tree may have a deep tree structure.</p>
<p>Bower prerequisites are <a href="http://nodejs.org/">node, npm</a> and <a href="http://git-scm.org/">git</a>.</p>
<p>To install Bower using git bash type the following command:</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">$ </span>npm install <span class="nt">-g</span> bower </code></pre></figure>
<p><a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">Previously</a> we have described how to create a simple application using our NuGet packages. Here we are going to describe a similar thing, but for frontend Bower package. So we will use both NuGet (for server-side) and Bower (for client-side).</p>
<p><strong>Using Bower with Visual Studio 2015</strong></p>
<p>The steps to setup a simple project we want to include our package into are the following:</p>
<ol>
<li>Create ASP.NET Web Application (File->New->Project) as it is shown in the screenshots below.
<img src="/images/2016/09/1.png" alt="New Project" />
<img src="/images/2016/09/2.png" alt="New Web Spplication" /></li>
<li>Include NuGet package Atalasoft.dotImage.WebControls to support server-side logics. (The same as it is described <a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">here</a>, see the screenshots below.)
<img src="/images/2016/09/3.png" alt="Manage NuGet Packages" />
<img src="/images/2016/09/4.png" alt="WebControls x64" /></li>
<li>Implement server-side like <a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">here</a>. Add a new Generic Handler and inherit it from WebDocumentRequestHandler class from Atalasoft.Imaging.WebControls namespace as it is shown below.
<img src="/images/2016/09/5.png" alt="Add a Generic Handler" />
<img src="/images/2016/09/6.png" alt="Simple Handler" />
<script src="https://gist.github.com/ElenaLenchic/46118aeb13f38396eab3124fccd4624f.js"></script>
And now our server-side logics is ready. We are going to implement the client-side logics.</li>
<li>Add a Bower configuration file to the project.
<img src="/images/2016/09/7.png" alt="Add Bower config" /></li>
<li>Open recently added bower.json file and add a new dependency “web-document-viewer”.
<img src="/images/2016/09/8.png" alt="Edit Bower config" /></li>
<li>Save the file. The dependencies will be downloaded automatically into the default folder “bower_components” (<a href="https://bower.io/docs/config/">configurable</a>). You can see it when browsing the directory with the project. It is useful to include this directory in the project.
<img src="/images/2016/09/9.png" alt="Show all files" />
<img src="/images/2016/09/10.png" alt="Include in project" />
There is also another way to manage Bower dependencies. It is presented in the context menu for the project.
<img src="/images/2016/09/11.png" alt="Manage Bower packages" />
This command will show the list of installed Bower packages:
<img src="/images/2016/09/12.png" alt="Manage Bower packages Installed" />
As you see the “web-document-viewer” and also “jquery-easing” are not listed here. We have posted a question about it on <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/bcf8f403-ac9a-4d3c-8471-a9e2e2ff119e/bower-package-manager-in-visual-studio-2015-does-not-find-bower-packages?forum=visualstudiogeneral">Social Microsoft website forum</a> and <a href="https://github.com/bower/bower.github.io/issues/264">Bower GitHub issues</a>. In fact there is a number of packages that do not appear in the Visual Studio UI Package Manager for Bower. Hopefully, this issue is soon resolved.
<br /> We can also switch to the “Browse” tab in the Bower Package Manager to see all the available packages:
<img src="/images/2016/09/13.png" alt="Manage Bower packages Browse" />
We can install, uninstall or update packages using corresponding buttons. There is also an option to save these changes to bower.json file (ticked by default).</li>
<li>Add a new index.html file into the project.
<img src="/images/2016/09/15.png" alt="Add html page" />
<img src="/images/2016/09/16.png" alt="specify name index.html" /></li>
<li>Replace all the code with the following:</li>
</ol>
<p><strong>Example code</strong>
<script src="https://gist.github.com/ElenaLenchic/db540f18316050f83433868f734ed454.js"></script>
Now we are ready to start our application.
<br /><strong>Note:</strong> If you have installed 64-bit version of DotImage library you need to set a proper Solution platform:
<img src="/images/2016/09/17.png" alt="Platform configuration" />
As well as before launching it is necessary to tick “Use the 64 bit version of IIS Express for web sites and projects” in the option dialog window (Tools->Options).
<img src="/images/2016/09/18.png" alt="Web project options" />
Then we can press F5 to launch the application.
<br />As an example we can open a test file located in our test images directory (using a browser console):</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">
_thumbs.openUrl<span class="o">(</span><span class="s1">'./TestImages/Test.tif'</span><span class="o">)</span> </code></pre></figure>
<p>As a result we see the Test.tif file opened in the Web Document Viewer:</p>
<p><img src="/images/2016/09/19.png" alt="WDV in browser" /></p>
<p>The TestWithBower project source code is available <a href="https://github.com/Atalasoft/nuget-tutorials/tree/master/TestWithBower">here</a>.</p>
<p><strong>Using Bower with console</strong></p>
<p>The same bower package management can be done using console.</p>
<p>At first we need to browse to the directory where we are going to install dependencies in the git bash console.</p>
<ul>
<li>To initialize Bower type the following command:</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">$ </span>bower init </code></pre></figure>
<p>This will open file bower.json in the current direcory or initiate its creation in interactive mode:
<img src="/images/2016/09/14.png" alt="Bower init" /></p>
<p>After filling in all fields the interactive mode and confirming that it looks good the file bower.json will appear or update in the current browsing directory.</p>
<ul>
<li>To install web-document-viewer package type the following command:</li>
</ul>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"> <span class="nv">$ </span>bower install <span class="nt">--save</span> web-document-viewer#10.7.0 </code></pre></figure>
<p>This will install the “web-document-viewer” component with all its dependencies. By default all downloaded files are placed in the folder bower_components. However this can be <a href="https://bower.io/docs/config/">configured</a>. The installed files can be referenced using this path. I.e.</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"> <span class="nt"><script </span><span class="na">src=</span><span class="s">"bower_components/atalasoft-web-document-viewer/atalaWebDocumentViewer.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
</code></pre></figure>
<p>The complete example code is presented earlier in this article.</p>
<p>Option</p>
<figure class="highlight"><pre><code class="language-bash" data-lang="bash"><span class="nt">--save</span></code></pre></figure>
<p>indicates that it is necessary to save the installed package into the current Bower configuration file.</p>
<p>The numbers after # indicate the version of the package it is necessary to install.</p>
<p>All downloaded dependency files are placed by default in the “bower_components” folder, where it can set references directly or copy the files into another folder. There are tools like <a href="http://gulpjs.com/">Gulp</a>, <a href="http://gruntjs.com/">Grunt</a> and <a href="https://bower.io/docs/tools/">others</a> to automate these files management. They are task-runners that can (among other commands) execute files copying before build etc.</p>
<p><strong>A few words about Bower package configuration file</strong></p>
<p>Bower configuration file (bower.json) is obligatory for each Bower package. It can be created while development and kept in actual state, which is quite useful when working with a project: the same configutation file for development and package distribution. It contains package name, licensing information, list of dependencies etc. It is downloaded as a part of a package. It also includes the names of the main files of the package to be included as a script or a stylesheet reference into the web-page and the file versions.</p>
<p>Bower package contains meta-information about the Bower package. More information about creating Bower packages is available <a href="https://bower.io/docs/creating-packages/">here</a>.</p>
<p><strong>References</strong></p>
<ol>
<li>Bower <a href="https://bower.io/">https://bower.io/</a></li>
<li>Atalasoft blog archive on GitHub <a href="http://atalasoft.github.io/archive/">http://atalasoft.github.io/archive/</a></li>
<li>Atalasoft web site <a href="https://www.atalasoft.com/">https://www.atalasoft.com/</a></li>
<li>Atalasoft NuGet Tutorial <a href="http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/">http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv/</a></li>
</ol>
NuGet Tutorial II - Web Capture Service2016-08-03T10:32:00+00:00http://atalasoft.github.io/2016/08/03/nuget-tutorial-wcs<p>Hi, my name is Denis Legashov, and I am a software developer at Atalasoft company.</p>
<p>This is the second post about NuGet packages for DotImage product,
and today I want to tell you about <a href="http://www.atalasoft.com/Technical-Details/net-technical?s=18">Web Capture Service (WCS)</a> - tiny but powerful instrument to import or scan images from the browser.</p>
<!--more-->
<p>WCS is a simple application that allows you to perform scanning from the browser and uploads image on the capture server.
It supports different browsers. However, you do not need to install any extensions or plugins for each.
Only install WCS itself on the local machine and write some JS code for your web application. So this is what I want to demonstrate.</p>
<p>From the first tutorial, we already knew how to create ASP.NET project, so, I skip these steps and move on to the adding packages. We need to install all packages from the first tutorial and a new one - Atalasoft Web Capture Service. So, the full list of the packages will be next:</p>
<ul>
<li><strong><a href="https://www.nuget.org/packages/Atalasoft.Web.Document.Viewer/">Atalasoft Web Document Viewer</a></strong> - JavaScript WDV/WDT components including all additional dependencies we have (jQuery, Raphael.js, jQuery.UI)</li>
<li><strong><a href="https://www.nuget.org/packages/Atalasoft.dotImage.WebControls.x86/">Atalasoft DotImage WebContorls</a></strong> - server side code that supports Web Document Viewer.</li>
<li><strong><a href="https://www.nuget.org/packages/Atalasoft.Web.Capture.Service/">Atalasoft Web Capture Service</a></strong> - contains installation file of the WCS and JavaScript API.</li>
</ul>
<p>After installation complete, we create app.js in the Scripts folder where we write code to provide some scanning logic, and index.html to show results of scanning.</p>
<p>On the page, we place some controls: Atalasoft Web Document Viewer, two buttons, and some checkboxes for basic scan settings, like a dpi, paper size, pixel type - color or grayscale, and show or not scanner settings vendor dialog.</p>
<script src="https://gist.github.com/guest512/c91b37b007b5e0ef03bb32bb03cd36aa.js">
</script>
<p>Also in the index.html we add references to the scripts and styles, and that is all for the page.</p>
<script src="https://gist.github.com/guest512/280f80df87671448174e146346470055.js">
</script>
<p>Now we need to write some code on JavaScript in the app.js. Let’s create a simple function where we can initialize viewer and Web Capture Service with some event handlers where we will log them into the console.</p>
<script src="https://gist.github.com/guest512/39d758586021dabdb504377c1004d765.js">
</script>
<h2 id="start-scanning">Start scanning</h2>
<p>We want to perform scanning with our custom settings, so let’s create a click handler for “Scan” button. Also, we need a helper function to collect scan options.</p>
<script src="https://gist.github.com/guest512/995a3a35b129dbeb5b97d16bd1709f9f.js">
</script>
<p>Here a list of options we use in this sample where we click on “Scan” button:</p>
<ul>
<li><strong>pixelType</strong> - sets the pixel type of the document getting scanned.</li>
<li><strong>resultPixelType</strong> - specifies the pixel format for images delivered to your application after scanning and post-processing.</li>
<li><strong>dpi</strong> - sets scanner dpi</li>
<li><strong>paperSize</strong> - specifies paper size</li>
<li><strong>showScannerUI</strong> - flag determines whether or not show the scanning device user interface.</li>
</ul>
<p>Also, we have an Import button on the index.html, so we need to create default scanning options which are use for import. We declare them in initialize method with this code:</p>
<script src="https://gist.github.com/guest512/32a616f10c31855c83a2edec2ce864af.js">
</script>
<p>As you see, I have added deliverables option with property localFile.
This option allows us to scan every scanned or import image or page in a multipage image in the persistent store in specified format.
We need this for further image processing.
All images save encrypted, so we need to pass encryption key somehow. The simplest way to do this is add one line of code in the onScanClientReady handler.</p>
<script src="https://gist.github.com/guest512/0ceb9972769730cbeb7266fc6be1c23d.js">
</script>
<p>Okay, now our sample works. It scans and imports images and saves them in the persistent store on the local machine, but we want to see results on the web page. Let’s do this!</p>
<h2 id="upload-and-view-images">Upload and view images</h2>
<p>WCS can upload scanned images to the server, so we simply need to add three more event handlers and most important for us is the onUploadCompleted event. When WCS completes upload image, we show it in the WebDocumentViewer.</p>
<script src="https://gist.github.com/guest512/6e1a1679f377b720f22fb3d5a80179ea.js">
</script>
<p>The final part of the sample is to upload images to the server, by default, WebCaptureHandler uploads it to the local folder with name “atala-capture-upload.”
Moreover, by default upload behavior is different for scan operation and import. After scan operation, all pages are combined into one multipage tiff, and it uploads to the server.
However, for import upload by default does not happen at all. So, we need to extend our onImageAcquired event handler like this:</p>
<script src="https://gist.github.com/guest512/d67abbf6c91edbe1ec8d2f2b151ca9a2.js">
</script>
<p>In this code, we discard image to remove it from memory (it is already saved in the local persistent store) and upload to a server as a base64 string, specifying container format,
and additional options like a jpeg compression quality.</p>
<p>After all additions and edits complete version of app.js looks like this:</p>
<script src="https://gist.github.com/guest512/e550a3b5c65371f20fc181f7d6d300ca.js">
</script>
<p>So when you build your site and perform scanning you will see something like this:</p>
<p><img src="/images/2016/08/nuget-tutorial-wcs-result.png" alt="Scan results" /></p>
<h2 id="conclusion">Conclusion</h2>
<p>Here a simple sample about how to work with WebCaptureService, and how it allows you to perform scan operations directly from the browser using only JavaScript.</p>
PdfCodeEditor2016-07-08T00:00:00+00:00http://atalasoft.github.io/2016/07/08/pdfcodeeditor<h2 id="introduction">Introduction</h2>
<p>Hello, my name is Dmitry Goryachev and I’m a software engineer from Atalasoft.
Let me introduce the tool, which I created to explore and edit PDF-files – <a href="https://github.com/gdv1811/PdfCodeEditor">PdfCodeEditor</a>.</p>
<!--more-->
<p><img src="/images/2016/07/pdfcodeeditor-gui.png" alt="PdfCodeEditor GUI" /></p>
<p>PdfCodeEditor is the open-source simple text editor based on <a href="http://avalonedit.net/">AvalonEdit</a> and <a href="https://avalondock.codeplex.com/">AvalonDock</a> controls.</p>
<h2 id="scenario">Scenario</h2>
<p>When I began working with PDF as a developer, I found some tools for viewing internals of PDF (<a href="http://www.o2sol.com/pdfxplorer/overview.htm">PDFXplorer</a>, “Browse Internal PDF Structure” in Acrobat Reader Pro DC and etc.). However, these tools do not work with damaged PDF-files.
First time I worked with <a href="https://notepad-plus-plus.org/">Notepad++</a> with HEX-plugin, but switching to HEX for viewing character offset and back is very annoying. Also after point-fixes, in some specific cases, I got broken PDF-streams due to the saving.</p>
<p>For these purposes, I created PdfCodeEditor. Now it allows open damaged PDF-files, edit them and save without issues.</p>
<h2 id="features">Features</h2>
<ul>
<li>Syntax highlighting and hiding streams in regions</li>
<li>Viewing actual offset of the characters</li>
<li>Go to definition on Ctrl + left mouse/F12</li>
<li>Navigation to the next or previous offset</li>
<li>Navigation to the specified offset</li>
<li>Standard Search panel from AvalonEdit</li>
<li>Saving does not damage the PDF-streams</li>
</ul>
<h2 id="plans">Plans</h2>
<ul>
<li>Support <a href="https://chocolatey.org/">Chocolatey</a></li>
<li>Object-tree to simplify navigation</li>
<li>Viewing decoded streams</li>
<li>Viewing streams as HEX, Image, Text, etc.</li>
<li>Auto-updating xreftables after edit</li>
</ul>
<p>If you are interested in contributing, join to <a href="https://github.com/gdv1811/PdfCodeEditor">PdfCodeEditor on GitHub</a>.
Thank you for attention, see you later!</p>
NuGet Tutorial I - Web Document Viewer2016-06-21T03:09:00+00:00http://atalasoft.github.io/2016/06/21/nuget-tutorial-wdv<p>Hi, Dmitry is here.</p>
<p>Today I want to start a series of simple but motivating posts about <a href="/2016/05/03/introducing-nuget/">NuGet packages
for DotImage product</a> and how they can be useful to speed up development of imaging
and capture-oriented applications.</p>
<!--more-->
<p>We start with <a href="http://www.atalasoft.com/Technical-Details/net-technical?s=2">Web Document Viewer</a></p>
<ul>
<li>JavaScript component that allows you to work
with images, thumbnails, PDF Forms and annotations. There are many features
that the viewer provides, but we want to stick with ease of use here, right?</li>
</ul>
<p>So, let’s start with empty ASP.NET project:</p>
<p><img src="/images/2016/06/nuget-tutorial-empty-project.PNG" alt="Create new empty ASP.NET project" /></p>
<p>We are going to stick with Empty ASP.NET template - we want to write some code,
didn’t we?</p>
<p><img src="/images/2016/06/nuget-tutorial-asp-project.PNG" alt="Select Empty ASP.NET template" /></p>
<p>Next step is to add a number of DotImage packages to the project. To do that,
right-click on the project and select <em>Manage NuGet Packages</em>:</p>
<p><img src="/images/2016/06/nuget-tutorial-add-packages.PNG" alt="Select Empty ASP.NET template" /></p>
<p>For the purposes of this tutorial we need to install two packages:</p>
<ul>
<li><strong>Atalasoft Web Document Viewer</strong> - JavaScript WDV/WDT components including
all additional dependencies we have (<a href="https://jquery.com/">jQuery</a>,
<a href="http://dmitrybaranovskiy.github.io/raphael/">Raphael.js</a>,
<a href="http://jqueryui.com/">jQuery.UI</a>)</li>
<li><strong>Atalasoft DotImage WebContorls (32-bit)</strong> - server side code that supports
Web Document Viewer. I’m using 32-bit package here, since IIS Express is 32-bit process.
In real life you may want to choose 64-package.</li>
</ul>
<p>During installation of these two packages a lot of stuff happens behind the scenes:</p>
<ul>
<li>NuGet infrastructure downloads .NET assemblies along with all dependencies, specified in
package definition. All the assemblies are referenced automatically, so you don’t need
to do it explicitly:
<img src="/images/2016/06/nuget-tutorial-references.PNG" alt=".NET References" /></li>
<li>Web Document Viewer is a JavaScript component that also has some dependencies on
other 3rd party libraries. NuGet downloads them as well and adds to the project:
<img src="/images/2016/06/nuget-tutorial-js-resources.PNG" alt=".NET References" /></li>
</ul>
<p>Once you have both packages installed, you are ready to add some code. The process is very
similar to what is described in our
<a href="http://www.atalasoft.com/docs/dotimage/docs-concept/#DotNet/Web Document Viewer/Web Document Viewer Guide.html">Dev guide</a></p>
<ul>
<li>I will briefly cover it below.</li>
</ul>
<p>We are going to start with adding Generic Handler to the project
(right-click on the project and select <em>Add -> New Item…</em>) Enter <em>WebDocViewerHandler</em>
as a name of the handler:</p>
<p><img src="/images/2016/06/nuget-tutorial-add-handler.PNG" alt="Select Empty ASP.NET template" /></p>
<p>Replace generated code with the following:</p>
<figure class="highlight"><pre><code class="language-csharp" data-lang="csharp"><span class="k">using</span> <span class="nn">Atalasoft.Imaging.WebControls</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">nuget_tutorials</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">class</span> <span class="nc">WebDocViewerHandler</span> <span class="p">:</span> <span class="n">WebDocumentRequestHandler</span>
<span class="p">{</span> <span class="p">}</span>
<span class="p">}</span></code></pre></figure>
<p>We plan to show PDF files in our viewer, so let’s register
<a href="https://www.atalasoft.com/docs/DotImage/docs/html/8CBB6DDE.htm">PdfDecoder class</a>
to support PDF rendering on server side. For web applications, the most simple
way to achieve this is to add <em>Global.asax</em> file with the following content:</p>
<figure class="highlight"><pre><code class="language-csharp" data-lang="csharp"><span class="k">using</span> <span class="nn">System</span><span class="p">;</span>
<span class="k">using</span> <span class="nn">Atalasoft.Imaging.Codec</span><span class="p">;</span>
<span class="k">using</span> <span class="nn">Atalasoft.Imaging.Codec.Pdf</span><span class="p">;</span>
<span class="k">namespace</span> <span class="nn">nuget_tutorials</span>
<span class="p">{</span>
<span class="k">public</span> <span class="k">class</span> <span class="nc">Global</span> <span class="p">:</span> <span class="n">System</span><span class="p">.</span><span class="n">Web</span><span class="p">.</span><span class="n">HttpApplication</span>
<span class="p">{</span>
<span class="k">protected</span> <span class="k">void</span> <span class="nf">Application_Start</span><span class="p">(</span><span class="kt">object</span> <span class="n">sender</span><span class="p">,</span> <span class="n">EventArgs</span> <span class="n">e</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// Enable PDF rendering
</span>
<span class="n">RegisteredDecoders</span><span class="p">.</span><span class="n">Decoders</span><span class="p">.</span><span class="nf">Add</span><span class="p">(</span><span class="k">new</span> <span class="nf">PdfDecoder</span><span class="p">());</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span></code></pre></figure>
<p>The final thing we need to do on the server side, is to add some files for rendering.
I created <em>Documents</em> folder in my web site structure and put a PDF there:</p>
<p><img src="/images/2016/06/nuget-tutorial-sample-document.PNG" alt="Sample PDF Document" /></p>
<p>Now we have sever side ready, so we can move on and create a simple <em>index.html</em> web page
(right-click on the project and select <em>Add -> HTML Page</em>). Below is HTML markup you
can use to add and initialize Web Document Viewer / Thumbnailer:</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="cp"><!DOCTYPE html></span>
<span class="nt"><html</span> <span class="na">xmlns=</span><span class="s">"http://www.w3.org/1999/xhtml"</span><span class="nt">></span>
<span class="nt"><head></span>
<span class="nt"><title></title></span>
<span class="c"><!-- Script includes for Web Viewing --></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"Scripts/jquery-1.7.1.min.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"Scripts/jquery-ui-1.8.14.min.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
<span class="nt"><script </span><span class="na">src=</span><span class="s">"Scripts/atalaWebDocumentViewer.js"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></script></span>
<span class="c"><!-- Style for Web Viewer --></span>
<span class="nt"><link</span> <span class="na">href=</span><span class="s">"Content/themes/base/jquery-ui.css"</span> <span class="na">rel=</span><span class="s">"Stylesheet"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="nt">/></span>
<span class="nt"><link</span> <span class="na">href=</span><span class="s">"Scripts/atalaWebDocumentViewer.css"</span> <span class="na">rel=</span><span class="s">"Stylesheet"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="nt">/></span>
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></span>
<span class="nx">$</span><span class="p">(</span><span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
<span class="k">try</span> <span class="p">{</span>
<span class="c1">// URL that points to our Web Document Viewer handler
</span>
<span class="kd">var</span> <span class="nx">serverUrl</span> <span class="o">=</span> <span class="s1">'WebDocViewerHandler.ashx'</span><span class="p">;</span>
<span class="c1">// Initialize Web Viewing
</span>
<span class="kd">var</span> <span class="nx">viewer</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Atalasoft</span><span class="p">.</span><span class="nx">Controls</span><span class="p">.</span><span class="nx">WebDocumentViewer</span><span class="p">({</span>
<span class="na">parent</span><span class="p">:</span> <span class="nx">$</span><span class="p">(</span><span class="s1">'.atala-document-container'</span><span class="p">),</span>
<span class="na">toolbarparent</span><span class="p">:</span> <span class="nx">$</span><span class="p">(</span><span class="s1">'.atala-document-toolbar'</span><span class="p">),</span>
<span class="na">serverurl</span><span class="p">:</span> <span class="nx">serverUrl</span><span class="p">,</span>
<span class="na">allowannotations</span><span class="p">:</span> <span class="kc">true</span>
<span class="p">});</span>
<span class="c1">// Initialize Thumbnail Viewer
</span>
<span class="kd">var</span> <span class="nx">thumbs</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Atalasoft</span><span class="p">.</span><span class="nx">Controls</span><span class="p">.</span><span class="nx">WebDocumentThumbnailer</span><span class="p">({</span>
<span class="na">parent</span><span class="p">:</span> <span class="nx">$</span><span class="p">(</span><span class="s1">'.atala-document-thumbnailer'</span><span class="p">),</span>
<span class="na">serverurl</span><span class="p">:</span> <span class="nx">serverUrl</span><span class="p">,</span>
<span class="c1">// Note that specify relative URL to our
</span>
<span class="c1">// sample document on server here:
</span>
<span class="na">documenturl</span><span class="p">:</span> <span class="s1">'Documents/DotImage.pdf'</span><span class="p">,</span>
<span class="na">viewer</span><span class="p">:</span> <span class="nx">viewer</span>
<span class="p">});</span>
<span class="p">}</span> <span class="k">catch</span> <span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">alert</span><span class="p">(</span><span class="s1">'Thrown error: '</span> <span class="o">+</span> <span class="nx">error</span><span class="p">.</span><span class="nx">description</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="nt"></script></span>
<span class="nt"></head></span>
<span class="nt"><body></span>
<span class="nt"><h1></span>Atalasoft Web Document Viewer Demo<span class="nt"></h1></span>
<span class="nt"><div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"atala-document-toolbar"</span> <span class="na">style=</span><span class="s">"width: 1000px;"</span><span class="nt">></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"atala-document-thumbnailer"</span> <span class="na">style=</span><span class="s">"width: 200px; height: 500px; float: left"</span><span class="nt">></div></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"atala-document-container"</span> <span class="na">style=</span><span class="s">"width: 800px; height: 500px; float: left"</span><span class="nt">></div></span>
<span class="nt"></div></span>
<span class="nt"></body></span>
<span class="nt"></html></span></code></pre></figure>
<p>That’s it! You just need to start you web site and in a moment you will see your PDF
file and will be able to play with it using Web Document Viewer:</p>
<p><img src="/images/2016/06/nuget-tutorial-done.PNG" alt="Complete Application" /></p>
<h2 id="conclusion">Conclusion</h2>
<p>The steps I described here can be completed in 5-10 minutes even if you try
to use Atalasoft toolkit for the first time. But you can achieve the same result even faster
if you clone ready-to-go project from GitHub repository we created to hold
our tutorial projects - all you need to do is to open the project in Visual Studio
and run it - all necessary NuGet packages will be downloaded automatically
during the build. If you are fast enough, it can be done in a minute (proof link is badly needed) :)</p>
<p>See you soon, happy coding!</p>
ScriptCs support for DotImage2016-06-02T03:09:00+00:00http://atalasoft.github.io/2016/06/02/scriptcs-support<p>Hi, Dmitry is here.</p>
<p>It is interesting and very motivating to discover more and more features that we can
utilize after we created NuGet packages for DotImage product. It is like a good
investment - you get more and more dividends over time :)</p>
<p>Recently I discovered another cool area where NuGet packages are especially useful - scripting. <!--more--></p>
<h2 id="the-issue">The issue</h2>
<p>It turned out that I repeat the same routine steps over and over, almost every day
when I work with the product or try to reproduce an issue:</p>
<ul>
<li>Open fresh Visual Studio instance (I usually have a couple VS instances open already
with large solutions - it is a waste of time to close them)</li>
<li>Create new console application project (at the end I constantly have a bunch of
<em>ConsoleApplication{N}</em> folders in my working folder - that annoys me a lot; you may
say it is a lack of discipline and I would agree, but I know that many people
have the same problem)</li>
<li>Remove <em>Class1.cs</em> (how many times did you do this?)</li>
<li>Add a bunch of references to the assemblies I’m going to use (now, with NuGet
packages it is much easier, but still requires some work)</li>
<li>Import a number of commonly used namespaces</li>
<li>Write some code (finally!)</li>
</ul>
<p>Usually I need to write pretty trivial code to reproduce the issue or to play
with particular image. I hate to spend so much time for preparation work.</p>
<h2 id="solution">Solution</h2>
<p>And I don’t have to do all this after all! Recently I stumbled upon a project that offers a huge
productivity gain for the kind of workflow I described above - <a href="http://scriptcs.net"><strong>scriptcs</strong></a>.</p>
<p><em>scriptcs</em> is a full featured <a href="https://en.wikipedia.org/wiki/Read–eval–print_loop">REPL</a>
for C# language. You may write your scripts, reference assemblies, consume NuGet packages,
all without running Visual Studio instance! It means that I can bring my console
window forward and start hacking right away!</p>
<p><a href="http://scriptcs.net">Scriptcs home page</a> has a great tutorial to let you start
quickly and painlessly. You will be able to run the REPL or run your scripts in
your text editor of choice in minutes. However, you may miss some Visual Studio
features, like IntelliSense and warnings. Good news is that you can use
<a href="http://www.omnisharp.net">OmniSharp</a> with your <a href="http://www.omnisharp.net/#integrations">favorite text editor</a>
to get almost all features you may expect from modern IDE in terms of code writing experience.</p>
<p><img src="/images/2016/06/scriptcs-editor.png" alt="Atom with scriptcs support" /></p>
<h2 id="motivating-example">Motivating example</h2>
<p>Ok, I spent so much time telling you all this, let’s do some coding!</p>
<p>I’m going to show you a basic example of scriptcs script (sorry) that helps to solve
common imaging problem that arise again and again - splitting multipage TIFF file
into single page ones (honestly, it is one of the most common basic imaging operations
that everyone want to perform at some point).</p>
<p>To start our journey into scripting world, we need to create new folder for the script
and install DotImage NuGet packages we are going to use:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell">scriptcs <span class="nt">-Install</span> Atalasoft.dotImage.x64</code></pre></figure>
<p><img src="/images/2016/06/scriptcs-install-package.png" alt="scriptcs package installation" /></p>
<p>Once we did that, scriptcs created <em>scriptcs_packages.config</em> file which contains
the list of packages you use in your script. Conceptually, it is the same old NuGet
<em>packages.config</em> friend that you can distribute this file along with your script
to restore all the packages.</p>
<p>Next step is the script itself. I started with empty <em>splitTiff.csx</em> file with
the following code:</p>
<figure class="highlight"><pre><code class="language-csharp" data-lang="csharp"><span class="k">using</span> <span class="nn">Atalasoft.Imaging</span><span class="p">;</span>
<span class="k">using</span> <span class="nn">Atalasoft.Imaging.Codec.Tiff</span><span class="p">;</span>
<span class="c1">// Env class allow to get access to script arguments</span>
<span class="kt">var</span> <span class="n">fileNameToSplit</span> <span class="p">=</span> <span class="n">Env</span><span class="p">.</span><span class="n">ScriptArgs</span><span class="p">[</span><span class="m">0</span><span class="p">];</span>
<span class="kt">var</span> <span class="n">outputFolder</span> <span class="p">=</span> <span class="n">Env</span><span class="p">.</span><span class="n">ScriptArgs</span><span class="p">[</span><span class="m">1</span><span class="p">];</span>
<span class="k">using</span> <span class="p">(</span><span class="kt">var</span> <span class="n">file</span> <span class="p">=</span> <span class="n">File</span><span class="p">.</span><span class="nf">OpenRead</span><span class="p">(</span><span class="n">fileNameToSplit</span><span class="p">))</span>
<span class="p">{</span>
<span class="c1">// open TIFF file</span>
<span class="kt">var</span> <span class="n">multipageTiff</span> <span class="p">=</span> <span class="k">new</span> <span class="nf">TiffDocument</span><span class="p">(</span><span class="n">file</span><span class="p">);</span>
<span class="kt">var</span> <span class="n">pageCount</span> <span class="p">=</span> <span class="n">multipageTiff</span><span class="p">.</span><span class="n">Pages</span><span class="p">.</span><span class="n">Count</span><span class="p">;</span>
<span class="c1">// iterate over pages...</span>
<span class="k">for</span> <span class="p">(</span><span class="kt">var</span> <span class="n">i</span> <span class="p">=</span> <span class="m">0</span><span class="p">;</span> <span class="n">i</span> <span class="p"><</span> <span class="n">pageCount</span><span class="p">;</span> <span class="p">++</span><span class="n">i</span><span class="p">)</span>
<span class="p">{</span>
<span class="kt">var</span> <span class="n">tiff</span> <span class="p">=</span> <span class="k">new</span> <span class="nf">TiffDocument</span><span class="p">()</span>
<span class="p">{</span>
<span class="n">Pages</span> <span class="p">=</span> <span class="p">{</span> <span class="n">multipageTiff</span><span class="p">.</span><span class="n">Pages</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="p">}</span>
<span class="p">};</span>
<span class="kt">var</span> <span class="n">fileName</span> <span class="p">=</span> <span class="n">Path</span><span class="p">.</span><span class="nf">Combine</span><span class="p">(</span><span class="n">outputFolder</span><span class="p">,</span> <span class="kt">string</span><span class="p">.</span><span class="nf">Format</span><span class="p">(</span><span class="s">"{0}.tif"</span><span class="p">,</span> <span class="n">i</span><span class="p">));</span>
<span class="n">tiff</span><span class="p">.</span><span class="nf">Save</span><span class="p">(</span><span class="n">fileName</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">}</span></code></pre></figure>
<p>Simple, huh? The code is trivial, but there are several items to note:</p>
<ul>
<li>no <em>Program</em> class or <em>Main</em> method - you can write your code right away!</li>
<li>script arguments can be accessed using <em>Env.ScriptArgs</em> array</li>
</ul>
<p>To run the script from command line, you need to use the following command:</p>
<figure class="highlight"><pre><code class="language-shell" data-lang="shell">scriptcs splitTiff.csx <span class="nt">--</span> <file to split> <output folder></code></pre></figure>
<p>Here is an example run I did (with additional logging statements I omitted above):
<img src="/images/2016/06/scriptcs-execution.png" alt="scriptcs package installation" /></p>
<p>The only thing to note here is “–” sequence you need to use to differentiate
scriptcs arguments from arguments you want to pass into your script.</p>
<h2 id="conclusion">Conclusion</h2>
<p>Overall, I’m pretty happy with this solution. It is easy to use, fast and concise.
I use small disposable scripts to write sample programs, reproduce issues
and play with the code in general. It is great to finally have full featured REPL for
C# and be able to consume all the goodies that NuGet provides.</p>
<p>I encourage you to check it out and keep an eye on
<a href="https://github.com/Atalasoft/scriptcs-dotimage">scriptcs-dotimage</a> GitHub repo
where I’m going to keep sample scripts to demonstrate the possibilities of
scripting with DotImage. More importantly, we plan to work on
<a href="https://github.com/scriptcs/scriptcs/wiki/Script-Packs">Script Pack</a> for
DotImage to simplify scripting even more. Stay tuned, I’m planning to get back
to this topic pretty soon!</p>
Introducing Activation Wizard Extension2016-05-14T00:00:00+00:00http://atalasoft.github.io/2016/05/14/introducing-activation-wizard-extension<p>Hi, Dmitry is here.</p>
<p>You certainly heard the <a href="/2016/05/03/introducing-nuget/">latest news</a>
about <a href="https://www.nuget.org/profiles/Atalasoft">public NuGet packages</a> we have
just introduced for <a href="http://www.atalasoft.com/Products/DotImage">DotImage</a> product. <!--more-->
While it is pretty cool by itself and I encourage you to try and play with them
(or, wait a bit for a couple of small NuGet tutorials I have up my sleeve),
you may have a number of questions about new deployment scheme, and licensing is
probably the first one among them.</p>
<p>Historically, Activation Wizard utility was part of main DotImage installation package.
Once DotImage is installed on developer’s machine, there are a couple of options
related to activation of the product:</p>
<ul>
<li>If you have not yet purchased Atalasoft DotImage, 30-day evaluation license
can be requested from <a href="https://atalasoft.com">Atalasoft web site</a></li>
<li>If you have purchased Atalasoft DotImage or related toolkits, existing serial
number can be activated</li>
</ul>
<p>Now, when we have NuGet packages so close to your Visual Studio instance, it would
be a shame to ask you to download big standalone installer just to get the Activation Wizard
(you have all the assemblies you need from NuGet already, right?).</p>
<p>No need to worry though, it is much easier than you think! We realized pretty quickly
that we have to provide another way of toolkit activation to support lightweight and
dynamic NuGet infrastructure, so we created <a href="https://visualstudiogallery.msdn.microsoft.com/88ff07c9-fe68-48bd-bfdc-3fbc8a0ec1db">DotImage Activation Wizard Visual Studio extension</a>
, that you could install from <a href="https://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a>.</p>
<p>The extension supports Visual Studio 2010, 2012, 2013, and 2015 - virtually any
Visual Studio IDE you may have around you. <em>Extensions and Updates</em> Visual Studio dialog makes it even more convinient and quick:</p>
<p><img src="/images/2016/05/activation-wizard-installation.png" alt="Activation Wizard Installation" /></p>
<p>It is the same Activation Wizard app, but wrapped in Visual Studio extension.
You can access it right from Visual Studio, under <em>Tools</em> top level menu:</p>
<p><img src="/images/2016/05/activation-wizard-menu.png" alt="Activation Wizard Menu Item" /></p>
<p>It looks and feels like as its older brother and provides the same features. In fact
it is <strong>exactly</strong> the same code that is included into our standalone installer:</p>
<p><img src="/images/2016/05/activation-wizard.png" alt="Activation Wizard Menu" /></p>
<p>And, I hope, it fills the main gap in NuGet-enabled world of DotImage - you may easisly
download the product via NuGet, you can easily activate the license using Visual
Studio extension. But what if you need another artifacts that we bundled with
our standalone installer - what if you (forgive me - I know that <em>you</em>
presonally don’t need such things) need some documentation or API Reference docs?</p>
<p>We have an answer for that as well :) Please keep reading!</p>
<p>Happy Activating!</p>
Introducing NuGet Packages2016-05-03T00:00:00+00:00http://atalasoft.github.io/2016/05/03/introducing-nuget<p>Hi, Dmitry is here.</p>
<p>Yes, you read it right. <a href="https://www.nuget.org/profiles/Atalasoft">Atalasoft DotImage NuGet packages</a>
are officially online!</p>
<p>We worked pretty hard for about a year to deliver this update. It is the fist step <!--more-->
in our much bigger plan to refresh the product, make it more accessible to our
customers. And - most importantly for us, developers - make it easier to update
and “funner” to work with.</p>
<p><a href="https://www.atalasoft.com/Products/DotImage">DotImage</a> is a big product,
with a bunch of assemblies that provide <a href="http://www.atalasoft.com/Technical-Details/net-technical">different functionality</a>.
Not all our customers need <a href="http://www.atalasoft.com/Technical-Details/net-technical?s=35">Dicom decoder</a> or
<a href="http://www.atalasoft.com/Technical-Details/net-technical?s=12">Barcode Writer</a> module though.
It is natural to split the product into independent pieces that could be used only when required.
NuGet allows us to do just that - we split all our assemblies into a series of
NuGet packages that could be independently installed and, best of all,
all required dependencies will be installed as well. It is a big win - no need
to think whether you need to deploy particular assembly with your application or not -
just leave it to us - we carefully specified all inter-assembly dependencies in
NuGet package definitions.</p>
<p>You may be curious to see dependency graph of our packages… Well, it is pretty easy
to accomplish:</p>
<p><img src="/assets/nuget_dependencies.png" alt="NuGet Package Dependencies" /></p>
<p>With NuGet infrastructure in place, creation of new imaging project is a breeze.
All you need is to download the packages you want and drop some code into the pot!</p>
<p>We provide two flavors of each package - x86 and x64 (there are rare exceptions though -
<a href="https://www.nuget.org/packages/Atalasoft.dotImage.Isis.x86/">ISIS scanning package</a>
is x86 only, there is not x64 version). More than that, each package contains binaries
built for .NET Framework 2.0 and .NET Framework 4.0, which make it possible to target
virtually any .NET version you use in your project.</p>
<p>It all sounds complex, but in reality you rarely need to think about this - it is
enough to add to x86 / x64 package - NuGet and Visual Studio handle
.NET version automatically and add a reference to correct version of the assembly.</p>
<p>We will be posting a lot of content about NuGet usage, along with a number of tutorials
and best practices. This post is just an introduction to the new distribution channel
DotImage now supports.</p>
Introducing Dev Team2016-04-27T00:00:00+00:00http://atalasoft.github.io/2016/04/27/introducing-us<p>Hi, Dmitry is here.</p>
<p>I’m glad to be the first person to speak on behalf of Atalasoft Dev Team in this blog!</p>
<p>We are small, but live and curious team that works on <a href="https://www.atalasoft.com">Atalasoft</a>
products:</p>
<ul>
<li><a href="https://www.atalasoft.com/Products/DotImage">DotImage</a> - .NET imaging SDK</li>
<li><a href="https://www.atalasoft.com/Products/WingScan">WingScan</a> - Web scanning solution</li>
<li><a href="https://www.atalasoft.com/Products/MobileImage">MobileImage</a> - iOS and Android imaging SDKs</li>
</ul>
<!--more-->
<p>We love to create beautiful APIs and make difficult things easy and pleasant to use.
We want to share our experience and knowledge of the product with you to hear your
feedback. We plan to use GitHub as a stage for our samples, demo projects,
curious findings and crazy ideas.</p>
<p>We are highly distributed team as well - there are so many places on Earth
where you can find a fellow Atalasoft-er:</p>
<ul>
<li>Easthampton, MA, US</li>
<li>Irvine, CA, US</li>
<li>Saint Petersburg, Russia</li>
</ul>
<p>There are other places you can look at to gather additional information about
Atalasoft team:</p>
<ul>
<li><a href="https://www.atalasoft.com">Atalasoft official web site</a></li>
<li><a href="https://twitter.com/atalasoft">Atalasot Twitter account</a></li>
<li><a href="https://www.facebook.com/Atalasoft">Atalasoft on Facebook</a></li>
<li><a href="https://www.linkedin.com/company/atalasoft-a-kofax-company">Atalasoft on LinkedId</a></li>
</ul>
<p>Stay tuned - we will be back sooner than you think!</p>