Sign In  Sign Up Live-Chat
Spacer

Aspose.Editor for .NET

  • Aspose.Editor for .NET Hotfix 3.0.3 Released!

    This is a minor release which includes some bug fixes and few improvements.

     

    The ability to change the standard commands properties such as Text, Description and the Shortcut is introduced. Here's a sample code which changes the proprties for standard "Open" command:


    // Get the reference to "Open" command
    Command cmd = docEditor.Commands["Open"];

    // Set new values
    cmd.Text = "New Text";
    cmd.Description = "New Description";

    // Bind new shortcut key (CTRL + G)
    cmd.Shortcut = new Shortcut(Keys.Control | Keys.G);

     

    // Rebuild all the standard controls to reflect changes
    docEditor.Bars.Rebuild();

     

    See more details on download page: http://www.aspose.com/community/files/53/visual-components/aspose.editor/default.aspx

  • Aspose.Editor for .NET Hotfix 3.0.2 Released!

    This is a minor release which includes some bug fixes and few improvements.

     

    See more details on download page: http://www.aspose.com/community/files/53/visual-components/aspose.editor/default.aspx

  • What is "Lossless Editing" in Aspose.Editor?

    Information Loss in Word Processors

    OOXML, DOC and RTF are very complex document formats. Fields, drawing objects, annotations, revisions, styles, lists, smart tags and so on. We estimate the Microsoft Word document specification includes over 2000 individual feature-points that describe things that you could encounter in documents.

    The complexity of the format is the reason for the current situation in the field of word processors and word processing controls for Microsoft Word documents. The situation is that there are clearly two classes of word processors:

    1. Full. Only Microsoft Word supports all features of Microsoft Word documents.

    2. All Others. This includes applications OpenOffice Writer, GoogleDocs, AbiWord, Buzzword as well as all word processing and rich editor controls that you could possibly find. All of these editors support only a subset of features that occur in Microsoft Word documents.

    The problem is that editing a Microsoft Word document that contains some advanced elements or formatting in any of these word processors "filters down" (often severely) the document by stripping all document elements that are not supported by that particular word processor.

    For example, if you open a Microsoft Word document containing mail merge fields in any of these word processors and then save it, all of you mail merge fields will be lost. In this article, I will use mail merge fields as an example, but the discussion perfectly applies to all other document features.

    Lossless Editing in Aspose.Editor

    Aspose.Editor is different from other word processors in a unique way. Aspose.Editor claims to support lossless editing of Microsoft Word documents.

    While developing Aspose.Editor we realized we could not possibly develop an editor control in a reasonable timeframe that support all those thousands of Microsoft Word document features. But we felt that filtering down documents like others do is wrong. So we came up with an idea of lossless editing:

    If Aspose.Editor does not support a particular document feature (e.g. cannot yet display ,edit or print), it still should not lose it from the document.

    In other words, Aspose.Editor fully rountrips documents behind the scenes while only a subset of document elements might be visible and available to the user for editing in the window.

    Walkthrough Example

    1. Find a document that contains some data or formatting that is NOT supported by Aspose.Editor. For example, a document with mail merge fields. Here is how it looks in Microsoft Word.


     

    2. Start the Aspose.Editor Live Demo. Use File / Open / Upload to upload the document and then open it in Aspose.Editor. Here is how it looks.

    Note that unsupported document elements are displayed as red "?" marks.

     

    3. Although I agree the question marks look "ugly", don't worry about them and edit the document. Add or delete something, for example, add text like shown below.

     

    4. Now save the document using File / Save and then download it from the Aspose webserver back to your computer using File / Open / Download in Aspose.Editor.

     

    5. Now open the downloaded document in Microsoft Word again and viola! All the original mail merge fields and images are still there!

    You have successfully completed a session of lossless editing of a Microsoft Word document in an editor other than Microsoft Word. Aspose.Editor has successfully roundtripped the document for you.

    N.B. The lossless editing feature of Aspose.Editor did not come to us for "free". It is a complex feature by itself and is itself under continious refinement. We preserve almost all Microsoft Word document featurs and aim to preserve them all. If you see something is getting lost you are welcome to report in our support forums.

     

    6. But what happens if you do the same in other word processors? Well, you can try it yourself. But here are snapshots of some outputs. GoogleDocs, OpenOffice Writer, Buzzword that we tried all have stripped mail merge fields from your document causing you information loss.

     

    Summary

    In this article we've shown how Aspose.Editor supports lossless editing of Microsoft Word documents. This is a unique feature that solves the problem of information loss when editing Microsoft Word documents in many other word processors.

    Here is lossless editing also described in the Aspose.Editor Features http://www.aspose.com/documentation/visual-components/aspose.editor-for-.net/lossless-editing.html

     

  • A solution to "The server committed a protocol violation. Section=ResponseStatusLine" exception

    I came across this problem when testing the latest Aspose.Editor for .NET live demo.

    Aspose.Editor is our .NET word processor control. The live demo is an ASP.NET application. The client part is a .NET control that is hosted in an HTML page. It is downloaded and executes in Internet Explorer. The server part is another .NET assembly that runs in an ASP.NET application.

    When testing various use cases in the demo on different Windows versions, different Internet Explorer versions and different .NET Framework versions I came across a message box with the following error message:

    System.Net.WebException: The server committed a protocol violation. Section=ResponseStatusLine

    Looking on the internet it appeared to be quite widespread and a heavily debated topic. We tried several solutions suggested by others including modifying configuration files and so on but it did not help.

    The problem only appeared in one configuration and I guessed that the WebResponse classes in the .NET Framework installed on the client machine are responsible for the exception. It looked like a "slightly incorrect" or "non-standard" HTTP response from the server caused problems when it was being parsed by .NET on the client machine.

    I've checked we run .NET Framework 2.0 without Service Packs on that machine.

    Installing .NET Framework 2.0 Service Pack 1 on the client machine solved the "The server committed a protocol violation." instantly.

    Finally, don't forget to check out our Aspose.Editor demo http://www.aspose.com/demos/aspose.editor/default.aspx!

     

  • Aspose.Editor for .NET 3.0.1 Released!

     

    This release includes a few useful features and bug fixes aimed to improve editing capabilities of Aspose.Editor control family.

     

    Improvements:

    -          New ASP.NET demo was implemented for the editor. Demo uses new plugin architecture, no jscript and additional controls are required on the page. Editor is fully customizable from the C# code. Demo can open documents on the server, save documents to the server, upload documents from the local machine to the server and download document from the server to the local machine. Also there is a dialog where documents on the server can be browsed;

    -          Plugin API exposed in the public interface. Loading scheme was significantly improved and made flexible. Application can specify plugins in the configuration file, or load them dynamically. Plugins themselves now have new level of interoperability with the host application;

    -          Improved printing of documents with custom page settings. Now when document is printed page settings are properly handled for both print preview and printer in both desktop and ASP.NET applications;

    -          Editor now features dynamic context menu. Standard context menu is implemented and can be replaced with custom menu or populated with additional menu items (see how spell checker does this);

    -          New editor option IsKeepPageInsideWindow controls scrolling behavior. By default this option is enabled which limits scrolling to keep page always visible and prevent infinite scrolling;

    -          When selecting fragments with many elements (e.g. cells) editing performance may degrade. This is because of the slow painting of GDI+ when complex clipping area is used. Now there is new editor option IsTransparentSelection which switches selection rendering method to transparent selection instead of clipped selection. By default this options is disabled and editor uses clipping. To improve performance this option can be enabled programmatically;

    -          Now control can save documents in MHTML web archive format.

     

    Bug fixes:

    -          When fragment with unknown element which contains style reference is copied control throws. Now style reference is removed from the unknown elements in the copied fragment.

    -          Document object if opened in the editor is not released until editor object goes out of scope. In desktop applications the issue may lead to a memory leak and continuously growing memory usage. This issue is fixed.

    -          New Aspose.Words integrated. This resolves "Arithmetic overflow" and "Invalid surrogate pair" errors when opening certain documents with invalid content.

    -          Column dialog may incorrectly calculate widths of the columns if page usable width is less than 107 pts.

     

     

    Link to download: http://www.aspose.com/community/files/53/visual-components/aspose.editor/default.aspx

     

  • Aspose.Editor 3.0.0 Released!

    This is a major release which includes several new features.

    A detailed description is here: http://www.aspose.com/documentation/visual-components/aspose.editor-for-.net/whats-new-in-version-3-0.html

     

    New Features:

    -     Tables. Many features are supported, including automatic width calculation and nested tables. There is new table properties dialog. User can insert new table, change its structure and properties.

    -     Shading and borders. Now shading and borders are rendered. There is a new dialog for changing shading and borders.

    -     Paragraph rules, e.g. Widow/Orphan control. Paragraph format dialog was updated.

    -     All section break types, e.g. Even Page, and Column Balancing.

    -     Plug-in modules. Now client editor control can be customized by loading plug-in modules, there is no need to create additional control on the page for this purpose.

    -     Recovery. If control throws application may attempt to recover the document.

    -     Full support for DOCX/DOCM. Documents can now be opened and saved.

    -     New public methods which use base64 client document stream encoding. This feature simplifies implementing custom send/receive channels in java script on a web page. This is useful if session cookies cannot be passed to the editor in conjunction with forms authentication.

    -     Server control now supports embedding custom control tag on a page. This feature enables wrapping client control with custom user control which simplifies development when editor needs to provide public COM interfaces.

    -     New Zoom dialog. Also appearance of the UI was improved. Menus now display shortcuts. Style dialog will show tool tips. All fields which are used to enter width or height values will provide units of measure hint, e.g. "pt".

     

    Fixed since 2.3.0:

    -     252 - Exception if document contains zero height font formatting;

    -     247 - Drag & drop of hyperlink throws exception;

    -     All issues on version 2.3.0 reported by customers through support forum;

     

     Here is the screenshot of Windows Forms demo application:

     

    Link to download: http://www.aspose.com/community/files/53/visual-components/aspose.editor/default.aspx

  • Aspose.Editor 2.3.0 Released!

     

    This release includes a few useful features and bug fixes aimed to improve editing capabilities of Aspose.Editor control family.

     

    New Features:

    -          Spell Checking Support via Third-Party Components;

    -          Read-Only (Viewer) mode;

    -          Save Documents in Microsoft Office Open XML (DOCX) Format;

    -          Optimized range manipulating procedures for higher performance.

     

    Fixed since 2.2.1:

    -          241 - When selected region of text is clicked (not dragged) selection shall collapse;

    -          239 - Improve compatibility detection in the web demo (Win2000 problem);

    -          243 - Command "Clear" works incorrectly (clearing only the first paragraph);

    -          245 - Access to the Aspose.Pdf format is blocked;

     

     

    Spell Checking Support via Third-Party Components

    In this release we introduce the ability to integrate a third-party spell checking component with Aspose.Editor control into your application.

    New version provides demo project which implements adapter class for Keyoti RapidSpell Desktop for .NET control (version 3.7.0). If you have this product installed on your system you can enable spell checking by adding single line of code to your project.

    Other spell checker controls could be integrated with Aspose.Editor by implementing corresponding wrappers if supported by spell checker component.

     

    Here is the screenshot of demo application using the Keyoti RapidSpell component:

     

    Read-Only (Viewer) mode

    Another feature to satisfy specific needs of word processing applications is the Read-Only mode. Setting the EditorControl.Options.IsReadOnly property to true switches the editor into viewer, just like Adobe Acrobat Reader and other applications of that kind. While in Read-Only mode user is still able to select text and copy it to the clipboard if needed.

     

    The demo project implements new custom command and menu item to show this feature:

     

    Save Documents in Microsoft Office Open XML (DOCX) Format

    Office Open XML is the new XML-based format introduced in Microsoft Office 2007 applications. Office Open XML is a container format for several specialized XML-based markup languages. WordprocessingML is the markup language used by Microsoft Office Word 2007 to store its documents.

    Current version of Aspose.Editor allows you only to save documents in DOCX format; later versions may provide the full cycle functionality on this format.


    Link to download: http://www.aspose.com/Community/Files/53/aspose.editor/entry106216.aspx

     

  • Aspose.Editor 2.2.1 Hot Fix Released!

    This is a quick-support release, here is what's been done:

     

    New Features:

    -          Plain text files loading support (see Document.Encoding property in Aspose.Editor.Desktop);

     

    Fixed since 2.2.0:

    -          231 - Corrupting pageSetup.TextColumns properties during open-save-open cycle on RTF files;

    -          232 - PreloadStream doesn't convert document stream before sending to client.

    Link to download: http://www.aspose.com/Community/Files/53/aspose.editor/entry101756.aspx

  • Aspose.Editor 2.2.0 Released!

     

    I’m very glad to announce that Aspose.Editor now works on Microsoft Windows Vista 32bit!

    Since control was tested only on 32bit Vista editions we cannot guarantee it working on 64bit editions, however it should work.

    It’s a minor release built mostly to support our customers and includes implementation of features recently requested, bug fixes and optimizations.

     

    New Features:

    -          Windows Vista support (32bit officially);

    -          Text drag-and-drop inside document implemented (limited support outside of control);

    -          Visual Studio 2005 separate demo projects;

    -          .NET 2.0 binaries included;

     

    Fixed since 2.1.0:

    -          Control freezes on cut-and-paste of last paragraph break of the document;

    -          Client environment support check is missing;

    -          Incorrect range attributes calculation;

    -          Incorrect locale recognition on document read/write operation;

    -          Internal controls (status bar, menu bar etc.) are installed in VS toolbox.

     

    It is recommended to turn off the UAC in Windows Vista while using Aspose.Editor control in this OS.

     

    Link to download: http://www.aspose.com/Community/Files/53/aspose.editor/entry99303.aspx

     

  • Aspose.Editor 2.1.0 Released!

    This is a next release incorporating many enhancements and bug fixes for both desktop and client Aspose.Editor controls.

    The main goal of this release was to improve user interface and provide standard controls expected from an editor application. Editor now features embedded ruler, main menu bar, tool bar and more. Developer can use provided standard controls, customize them or replace with third-party controls. This simplifies creating user-friendly editor applications and reduces development effort.

    As always documentation and both web and desktop demo applications were updated to include these new features.

     

    New Features:

    -          Standard controls:

    o       Horizontal ruler,

    o       Status bar,

    o       Main menu bar,

    o       Tool bars,

    o       and customizable scrollbars.

    -          Extensible collection of editor commands, e.g. new document, format font, insert page break. A command provides single interface to the properties of the editor function, like Enabled and Name. Developer can use commands to easily build custom menus and toolbars.

    -          Text rendering hint provides fine control over the anti-aliasing used for rendering and helps reduce blur.

    -          Normal view simulates continuous text flow layout. This view is convenient when editing large text portion.

     

    Fixed since 2.0.2:

    -          Bold and Italic formatting sometimes cannot be assigned to the empty selection;

    -          Document is not properly zoomed when page setup is changed;

    -          Inserting page or column break into the document may reset paragraph formatting;

    -          Some attributes of lists are not round tripped properly;

    -          Editor may not paste column breaks;

    -          Default values of the page formatting cannot be set through the page setup dialog;

    -          For some page setup settings column dialog opens with incorrect values;

     

    To download http://www.aspose.com/Downloads/Aspose.Editor/2.1.0.0/Default.aspx

     

  • Aspose.Editor 2.0.2 Released!

    Just another hotfix release supporting our customers. 

     

    Fixed since 2.0.1:

    -  Incorrect parsing of some cultures (Spain, Amharic, etc.) on document loading;

    -  Zero-length ranges does not have access to the paragraph and section properties of the range;

    -  Server control fails to convert channel stream into any format except WordML;

    -  Images stored in the header/footer of the document are not roundtripped;

    -  OLE objects are lost while reading some documents;

    -  Documents with zero-length comments cannot be loaded;

    -  Control writes zero-length comments incorrectly;

    -  Zero-length bookmarks and comments at paragraph break positions are lost.

     

    To download http://www.aspose.com/Downloads/Aspose.Editor/2.0.2.0/Default.aspx

     

     

  • Aspose.Editor 2.0.1 Released!

     

    This is a minor release which includes only few bugfixes and web demo update but no new functionality of Aspose.Editor control itself.

     

    The web demo project was updated to show more of Aspose.Editor features such as thumbnails generation, document printing and print preview just like the Windows Forms demo. The new demo also shows how to use custom user .NET control for rich client UI and logic being implemented completely in C#.

     

    Features of Web Demo:

    - Custom user control with web application logic and toolbar;

    - Dynamic security configuration script;

     

    Fixed since 2.0.0:

    -  Selected layout of view is not saved into document;

    -  Cookie handling in client control doesn't conform to rfc 2965;

    -  Typos in security configuration script;

     

    Live Demo was also updated to reflect the product changes.

     

    To download http://www.aspose.com/Downloads/Aspose.Editor/2.0.1.0/Default.aspx

     

  • Aspose.Editor live demo is now available!

    I'm glad to announce that Aspose.Editor live demo is now available!

     

    Please follow this link and try it:

    http://www.aspose.com/Products/Aspose.Editor/Demos

     

    Michael

  • Dynamically Generated Security Script

     

    Security in .NET framework is rather complex subject and developers often have to resort to various tricks configuring security settings for browser-hosted controls. Web demo project of Aspose.Editor 2.0.0 uses static script file stored server side. Configuration script has an URL of application as the main argument, so each installation of such web application requires script file modification by hand.  Such approach is sometimes inconvenient, especially when an application URL is not known in advance. 

    To solve this problem we suggest generating proper configuration script on server dynamically. 

    Let’s fix the web demo project (in Aspose.Editor 2.0.0): 

    1. Open the Aspose.Editor.Demo.Web project;
    2. Create  new empty text file in the root folder of the project and name it security_script.aspx (Click right mouse button on the project, select Add – Add New Item, in dialog select Text File and enter it’s new name security_script.aspx);
    3. Open just created file, switch to HTML mode (Design mode is on by default) and copy the following code to the file: 

    <%@ Page language="c#" %>

    <%

           Response.Clear();

           Response.ContentType = "application/js";

           Response.AddHeader("Content-Type", "application/js");

           Response.AddHeader("Content-Disposition", "inline;filename=SecurityConfig.js");

    %>

    // adjustable settings

    var Name = "Aspose.Editor.Client";

    var Url = "<%=Request.Url.GetLeftPart(UriPartial.Authority)%>/*";

    var Publisher = "Aspose Pty Ltd."

    var Description = "Security settings for Aspose.Editor.Client";

    var Permission = "FullTrust";

     

     

    // update security

    update(Name, Url, Permission, Publisher, Description);

     

    function update(name, url, permission, publisher, description)

    {

        try

        {

        // define .NET framework directories location

        var WSHShell = WScript.CreateObject("WScript.Shell");

        var path = WSHShell.RegRead("HKLM\\SOFTWARE\\Microsoft\\.NETFramework\\InstallRoot");

       

        // get the directory of the latest available .NET framework runtime

        var fso = WScript.CreateObject("Scripting.FileSystemObject");

        f = fso.GetFolder(path);

        fc = new Enumerator(f.SubFolders);

        for (; !fc.atEnd(); fc.moveNext())

        {

            s = fc.item();

            switch(s.Name.substring(0, 5))

            {

                case "v2.0.":

                case "v1.1.":

                case "v1.0.":

                    f = s;

                    break;

            }

        }

       

        // execute security policy configuration tool

        args = "-m -q -pp off -ag 1. -url " + url + " " +

               permission + " -n \"" + name + "\" -d \"" + description + "\"";

     

        WSHShell.Run(f.Path + "\\caspol " + args, 0);

        WSHShell.Popup("Security settings for " + Name + " successfully applied." +

        "\nInternet browser should be restarted.", 0, "Congratulations!");

        }

        catch(e)

        {

            WSHShell.Popup(e.message, 0, "Error occured");

        }

    }

    <%

        Response.End();

    %>

     

    1. Open security_config.aspx in HTML mode and change "Scripts/SecurityConfig.js" with  “security_script.aspx” in  <a href="Scripts/SecurityConfig.js">Download Configuration Script</a> string.
    2. Save and close all modified files of the project. 

    In order to test the script delete the security entry for your application if one exists using the caspol utility: 

    1. Go to the appropriate folder which contains the .NET Framework used by Internet Explorer. Internet Explorer uses latest installed .NET Runtime version by default, however this can be overridden in iexplore.exe.config file. Common location of .NET framework folders is "C:\WINDOWS\Microsoft.NET\Framework\<Framework version>\".
    2. Execute the following command “caspol -lg”. If you’ll see something like “1.7. Url - http://localhost/*: FullTrust” in the list (1.7 – is not fixed position so it may vary) where "http://localhost" is your application URL then execute command “caspol –rg 1.7” to delete this entry.
    3. Repeat step 2 until no entries for your application remain in the list.
    4. Restart browser and go to the application URL. If everything is correct, security configuration page will be displayed.
    5. Run new dynamically generated script from security page.
    6. Restart browser and check the application works. 

    Next version of Aspose.Editor will use this approach in web demo project.

     

  • Aspose.Editor 2.0.0 Released!

    Here comes the third long-awaited release of Aspose.Editor. Now it is not a single control but three controls specially crafted to satisfy different developer needs:

    • Aspose.Editor.Desktop - a control for desktop application development.
    • Aspose.Editor.Client / Aspose.Editor.Server - a couple of controls working in pair for ASP.NET application development.

    Using new controls you can incorporate Aspose.Editor into a web form in an ASP.NET application. This allows creating intranet or enterprise web-based applications with true WYSIWIG word processing capabilities, significantly bringing down deployment and licensing costs. 


    Live demo of ASP.NET control will follow soon. 

     

    New Features 

    • ASP.NET support (new ASP.NET control Aspose.Editor.Server) and Internet Explorer hosting (Aspose.Editor.Client control)
    • Support for reading / writing RTF file format.
    • Support for reading / writing DOC file format.
    • Support for reading / writing HTML file format.
    • Support for writing Aspose.PDF XML file format.
    • Support for rich cut/copy/paste via HTML format (Aspose.Editor.Desktop only).
    • Find / Replace dialog.
    • Range.Find() and Range.Replace() methods.
    • Allows hiding scroll-bars via EditorControl.IsScrollbarsVisible property.
    • New demo for ASP.NET control.
    • Dialogs were optimized and now support WinXP styling.
    • Improved roundtripping (lossless editing) of fields, form fields, bookmarks and revisions.

     Fixes Since 1.1 

    • Loosing original style ID while reading WordprocessingML files.
    • Problems while saving the document with changed color attribute.
    • Loosing Line breaks while pasting HTML text.
    • Loosing paragraph style after Undo.

    To download http://www.aspose.com/Downloads/Aspose.Editor/2.0.0.0/Default.aspx

     

    A web application built with Aspose.Editor allows true word processing in Internet Explorer.


     

    Example of a Windows Forms .NET application created with Aspose.Editor.

More Posts Next page »