|  |
-
Aspose.Words for .NET provides a comprehensive support for Microsoft Word lists. You can access a number of list properties, such as list levels, numbering format, and many others. Literally, you can access every list feature Microsoft Word's UI offers.
However, until recently, you could not get the exact value of list label for each list item (paragraph) in the document. That is, if a certain paragraph had a list label like 2.1.4., you could not access it via the Aspose.Words API. I am glad to announce this is possible now.
Aspose.Words for .NET 9.2 has introduced a new method named Document.UpdateListLabels(). This method recalculates list label values for each list item throughout the document. After you call it, you can access up-to-date list label values using the Paragraph.ListLabel.ListString and Paragraph.ListLabel.ListValue properties. The former one returns a text string that represents the appearance of the list value for the label, and the latter one returns a numeric value for this label:
Document doc = new Document("MyDoc.docx");
// Update list labels throughout the document. doc.UpdateListLabels();
Paragraph paragraph = (Paragraph)doc.GetChild(NodeType.Paragraph, 10, true);
// Gets a text like '2.1.4.'. string labelString = paragraph.ListLabel.LabelString; // Gets a numeric value like 4 (the actual number of the list item on the level). int labelValue = paragraph.ListLabel.LabelValue;
Note that UpdateListLabels() is sometimes implicitly called when updating document fields. This is required by some fields like TOC or REF that need list labels to be up-to-date.
By the way, the REF and INCLUDETEXT fields are now updated via Aspose.Words for .NET 9.2 API.
To download Aspose.Words for .NET 9.2, please visit http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/category1188.aspx.
|
-
As you probably know we provide all our technical support in the forums http://www.aspose.com/community/forums/aspose.words-product-family/75/showforum.aspx
But Aspose.Words has grown big and popular and our support department has grown too. It becomes more and more difficult to provide efficient support via the forums.
There are many issues with the support forums including:
- It is hard for the support personnel to divide work between themselves and track who is helping which customer.
- It is impossible for the customers to see at a glance which threads have been answered with a useful answer or closed/resolved etc.
- It is an overhead for us and source of errors to maintain links between the forums and our internal bug tracking system.
- Customers want, but cannot see any real progress on their issues. They have to keep asking "when my issue will be ready". Customers do not see the actual information that we have about the issues they reported.
We want to provide a better technical support and we have been looking at different options.
One option is to provide technical support via a specialized bug tracking system. This will leave the forums for general questions and discussions about using Aspose components.
The bug tracking system we are looking at using for technical support is the same software as we use for our internal bug tracking. In fact, to avoid duplication and issue linking overhead we are considering to provide technical support right in our real bug tracking system. But external users will only be able to see their own created issues of course.
We want to do a little pilot project trialing this new technical support method and looking for volunteers. The size and time for this pilot project will be small. We will only take about 10-20 willing customers who contact us first.
Do you want to participate?
In return, we promise to do our best and resolve the issues that you have reported as part of this pilot project by the end of the trial which will coincide with our next planned release date sometime in August 2010.
If you want to participate, please email to alexey dot noskov at aspose dot com.
|
-
If you upgrade to Aspose.Words for .NET 9.2 you will get:
Performance improvements to the rendering (conversion to PDF, XPS) and field update engines. We are now pleased with testing DOCX to PDF conversion of a document 526 pages long with lots of tables and a big Table Of Contents. Compare this with earlier versions where we did not expect "fast" conversion for documents bigger than 100-200 pages.
GDI+ is no longer used for font measurement during layout and rendering. This resolves some rare 64-bit server-side exceptions such as "cannot create a handle" etc. In one of the next versions you will be able to completely avoid relying on fonts installed on Windows. You will be able to specify folder(s) where Aspose.Words should look for TrueType font files when converting to PDF or XPS. This is also an important preparation step towards Aspose.Words for Java better conversion to PDF on other OSes such as Ubuntu.
More field types are supported by our world-famous field update engine. Our expert will write on this more in the next post.
Get list labels and numbers - This is a highly requested feature, finally available. You can now get the string that contains the list label for a paragraph that is a member of a bulleted or numbered list. Aspose.Words generates list labels in exactly the same way as Microsoft Word does it. Aspose.Words uses this list label generator internally when converting to PDF and other formats and now this is also available via the public API. More on this in a separate post.
Get information about a document without loading it - Previously, it was only possible to detect the document format without loading a document. Now we have extended the API so you can detect more document formats (also distinguish template formats from normal documents), detect encrypted and digitally signed documents too. It could be a good idea to detect a digitally signed document and maybe prompt the user before programmatically modifying such document, because the digital signature will be lost as you can understand.
Tons of other important fixes and improvements, for the full list see the download page http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry247974.aspx
But here is the catch: there are breaking changes in the public API. In brief, I can describe them as:
All events and delegates were removed. In fact, they were replaced with properties and interfaces. Instead of using the .NET events and delegates we are now using the more classical approach of callbacks. All the functionality is still there, you will only need to make simple changes to your code.
Document loading and saving methods were reworked. All Aspose components are now moving towards the Aspose Unified Framework which basically means more consistent and robust public APIs across all Aspose products. Aspose.Words is the first one to implement the new standard for loading and saving of documents.
More info about the breaking changes will be coming soon in the documentation, in this blog and there are already some tutorial videos in the Downloads section http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx
|
-
-
Everything is Split into .NET and Java
As you might know our Aspose.Words for .NET and Aspose.Words for Java are "twin brother" products. We code in Aspose.Words for .NET and then port that code almost line-by-line to Aspose.Words for Java. The result is the two APIs are virtually the same.
Because of this similarity of two products we had only one set of online documentation and it was called Aspose.Words for .NET and Java Documentation. But because the two products are not really equal, some features are not yet available in Aspose.Words for Java or they are unique to Java, the customers were confused when they had to figure out the differences themselves on every page they read.
There has been a big undertaking by all Aspose teams to remove this confusion by separating all information for Aspose products for the .NET and Java platforms. This all has been done quite some time ago actually, the only thing that was not split - the Aspose.Words Documentation.
Why it Took so Long for Aspose.Words Documentation to Split
Because Aspose.Words for .NET and Java are so similar we really wanted to keep single-sourcing the documentation. It is especially important because we are putting a lot of effort into making Aspose.Words for .NET and Java even more similar in the features they offer. So it would be a big waste to try and manually maintain two sets of very similar documentation.
I wrote earlier that we have developed our own process and tools for building product documentation. Essentially we keep documentation in Microsoft Word documents, then we use some tools to inject code examples into it, split into topics and convert to HTML for online viewing. We eat our own dog food and of course use Aspose.Words to perform these document processing tasks.
Now, the task to split documentation into .NET and Java version has been accomplished by adding one more step to the documentation build process and this step also uses Aspose.Words.
We accepted a technique to mark .NET or Java specific fragments of text and use Aspose.Words to delete the fragments that are not needed for the target platform.
Below is the screenshot of how the marked single source document looks like.

And here are the links to the resulting .NET and Java versions of the page:
There is more work underway for us. We are now working on another tool to add to our documentation build process that will allow to make sure the topic pages have correct names and hyperlinks to the public API members both in .NET and Java pages.
|
-
In mid-April, four of us from the Aspose.Words team have attended the ODF Interoperability workshop that was held in the beautiful city of Granada in the province of Andalusia. The main themes of the trip were learning more about Open Document initiatives in Europe, meeting people, talking about nuances of ODT and testing how well Aspose.Words supports it. Besides, we had a chance to make a presentation about Aspose.Words to the ODF Plugfest community.

Due to our poor Spanish, we did not attend Spanish-spoken sessions (there were some). Instead we’ve had a plenty of time to discuss issues with ODF people and participate in the testing sessions. Remarkably not only ODF but also OOXML was discussed a little, since both represent industry mainstream.
We’ve went through testing scenarios from all previous workshops as well as from the current one and found around two dozen issues. More than half of those have already been fixed in the current release of Aspose.Words, and there are more fixes soon to come. You can download the latest release and see the descriptions of fixed issues here.
Those that made it so far through this post may wonder what is jerez and tapas? The answer is simple: in Spanish they are sherry and snacks which were very delicious in Granada in the evehings and nicely complemented the daily working sessions. So without doubts, Spanish flavors including fiery Flamenco have contributed quite a bit to the quality of ODT support by Aspose.Words.

|
-
Change 1: Manual Registration Now
Aspose.Words.dll is a .NET class library, but you can use it via .NET COM Interop from many other languages such as ASP, Delphi, JScript, Perl, PHP, Python, C++ etc. In order to use Aspose.Words.dll from a COM client you need to have it registered for COM Interop.
The change is that Aspose.Words for .NET 9.1 does not register Aspose.Words.dll for COM Interop automatically during install. In earlier versions Aspose.Words.dll was registered automatically.
While we are still considering pros and cons and deciding whether to return the automatic registration or not, you can easily register Aspose.Words.dll for COM Interop manually, please see http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/use-aspose-words-for-net-via-com-interop.html
Change 2: No IDL Anymore
We used to supply Aspose.Words.TLB and Aspose.Words.IDL together with Aspose.Words.DLL in versions earlier than 9.1. Now we decided to try and not supply the .IDL file anymore. Please let us know if you need and cannot generate yourself. If there is a lot of feedback, we might have to put it back in.
The reasons I discussed here http://stackoverflow.com/questions/2825734/how-to-get-idl-from-a-net-assembly-or-how-to-to-convert-tlb-to-idl-in-a-comman
|
-
.NET Framework Client Profile is a subset of the .NET Framework optimized for client applications. Basically, it excludes some of the assemblies, for example System.Web is excluded.
The Client Profile is available for .NET Framework 3.5 and 4.0. You can compile your project for the Client Profile in Visual Studio 2008 SP1 or Visual Studio 2010. You need to select to target the client profile in the project settings in Visual Studio.
One of the Aspose.Words' Document.Save overloads allows to save to a System.Web.HttpResponse object. This useful method sends a document to the client browser. But System.Web is not available in the .NET Framework Client Profile so it was not possible to use Aspose.Words to target the Client Profile before today's Aspose.Words for .NET 9.1 release.
Both the MSI and ZIP downloads now provide additional Aspose.Words assemblies that allow to target the .NET Client Profile. In these new assemblies the Document.Save method with the HttpResponse parameter is not available.
Here is the contents of the readme.txt file that we now include in the download. This file describes what folder contains the assemblies you need to use with a particular version of the .NET Framework.
Folder - Description
net1.1 - Contains assemblies to use with .NET Framework 1.0 and 1.1
net1.1_AuthenticodeSigned - Same as above, but the assemblies are digitally signed with Authenticode. Signed assemblies may load slower than without Authenticode.
net2.0 - Contains assemblies to use with .NET Framework 2.0, 3.0, 3.5, 4.0 and Mono. This is the assemblies that you should normally use.
net2.0_AuthenticodeSigned - Same as above, but the assemblies are digitally signed with Authenticode. Signed assemblies may load slower than without Authenticode.
net3.5_ClientProfile - Contains assemblies to use with .NET Framework 3.5 or 4.0 Client Profile.
net3.5_ClientProfile_AuthenticodeSigned - Same as above, but the assemblies are digitally signed with Authenticode. Signed assemblies may load slower than without Authenticode.
|
-
Four of us from the Aspose.Words team attended the ODF Plugfest in Granada, Spain. Although it ended 17th April I got back home just now thanks to the volcano. Had to go back via Rome instead of London.
Anyway, I think we did well both for Aspose.Words support of ODT as well as for the OpenDocument ecosystem in general:
- We run all previous ODF Plugfest test scenarios via Aspose.Words, logged issues where needed and started working on them already.
- Made Aspose.Words available on Officeshots and run it on many test documents. At the moment this is off, but we will soon make Aspose.Words available on Officeshots permanently.
- Met with interesting people, all OpenDocument experts.
- Had a bit of our own teambuilding including the Arabic Baths. Granada is a great place to visit.
I have also uploaded the presentation about Aspose.Words and OpenDocument I've given at the event http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry234315.aspx
Expect to see more improvements for ODT in Aspose.Words in the near future.
|
-
Not
so long ago International Organization for Standardization has accepted newer
OOXML standard ISO/IEC 29500:2008 (supported by MS Word 2010) that became an
extension of the older ECMA-376:2006 standard (supported by MS Word 2007). Now we're happy to confirm that Aspose.Words for .NET 9.0 supports ISO/IEC 29500:2008 Transitional. The implementation contains some limitations which should not affect your document workflow but if you think they do please let us know. Read on for more details.
Strict vs. Transitional
The
main question is how the older OOXML spec differs from the new one. The answer
lies in two spec subsets: Transitional and Strict. In Transitional subset the
new features are added only (except a few minor removals) and all the older
stuff is valid too. The Strict subset not only adds features but also removes
older features from OOXML. For example all VML schemas are removed. So we can
regard the Strict as Transitional minus some ECMA-376:2006 features.
The new stuff
A
quick look over new features of ISO/IEC 29500:2008 can yield us several areas
in which new stuff can be categorized. These
areas should be regarded as coarse view but not a formal and strict description
of all the changes (which are defined in the spec as annexes anyway).
·
New data schemas for
older elements. This category includes more
flexible or more intuitive ways to write data. Per new spec data involving
twips (twentieth of a point) or half points now can be specified using
cm/mm/inch/pica/point units. Some values stored as bit flags within integer can
now be written as true/false values. Percentage values can be written with %
sign. Some data types include new enum values.
·
Additional information
provided for existing elements. Tables now can contain
description and caption and also header elements/information linking cells to
their headers. Additional info is provided for linked and embedded objects
through new elements objectEmbed and objectLink.
·
Elaborated support for
RTL/LTR languages. A number of additions improve
Right-To-Left (RTL) and Left-To-Right (LTR) languages area. New elements such
as dir, bdo are added. Elements start and end now carry semantics of older left
and right.
·
New document settings. Some new elements added to
document settings and web settings including custom compatibility settings.
What’s implemented
Aspose.Words
9.0 supports reading and writing ISO/IEC 29500:2008 Transitional conformant
documents, including the majority of almost 80 additions or enhancements
introduced. Our approach to implementing features was to look how MS Word 2010
Beta supported these. If feature was quite complex and MS Word didn’t provide functionality
to use it, we put it on the “to be supported later” list. The list of “to be
supported later” features includes:
·
RTL/LTR
elements bdo and dir;
·
Table
header/headers elements;
·
Custom
pictures for page borders;
·
Custom
number format for list numbering levels;
·
Additional
properties for linked/embedded objects.
As usual
we’re open to your questions/comments and feature requests, so please let us
know what you think.
|
-
Some customers have reported they cannot build an application with Aspose.Words in Microsoft Visual Studio 2010 RC.
We confirm you cannot build a project if you select one of the following Target framework settings in the Project Properties:
- .NET Framework 3.5 Client Profile
- .NET Framework 4.0 Client Profile
The error message is "... it has a dependency on Sysem.Web ... which is not in the currently targeted framework".
Yes, Aspose.Words has a dependency on System.Web to provide a Document.Save method that allows to save a document directly into an HttpResponse object.
We currently release two Aspose.Words.dll assemblies. One is targeting .NET 1.1 and the other is targeting .NET 2.0. So far it has been no problem. Aspose.Words does not use or rely on any of the .NET 3.0, 3.5 or 4.0 features and we did not need to build Aspose.Words.dll targeting any of these frameworks because Aspose.Words.dll that targets .NET 2.0 loaded and run successfully on all these versions. A few months ago we even tested Aspose.Words with Microsoft Visual Studio 2010 Beta and there was no problem.
We are going to resolve this immediately and release a hotfix within a week or so. Most likely we will be providing separate Aspose.Words.dlls that target every .NET framework version in our downloads.
|
-
This article is a call for your feedback. In the August 2009 we had to drop Aspose.Editor but left are functional pieces which can be reused in Aspose.Words, well, if you need them…
In past times developers relied on Word Object Model and VBA for their automation needs. Today Microsoft recommends VSTO and OOXML but still out there could be useful applications written in VBA, or you might be interested to port those to .NET, or you'd like to leverage on your existing skills. Whatever your reasons to be interested in Word Object Model are you might get this API in Aspose.Words, and soon.
The API of Aspose.Words is well-thought and represents document as a data tree, where nodes are Sections, Paragraphs and Runs and they have “parent-child” relationship. It is straightforward, fast and convenient for many tasks however there are some exceptions which are hard to implement on the tree. For example, consider task of replacing content of a bookmark, or finding text using regular expressions, or joining paragraphs. These are much simpler to implement on flat document model and live collections of objects, like those in the Word Object Model.
Now I want to ask you one question: we have partial implementation of this API on the branch, do you want it integrated into the product?
You’d be able to work with it like this:
document.GetRange().Text = "Sample first paragraph\r\nAnd next paragraph";
document.Bookmarks["MyBookmark"].GetRange().Text = "New Text Of Bookmark";
document.Shapes.AddImage(range.Paragraphs[2].GetRange(), imageStream);
document.GetRange(7, 15).Delete();
range.Find.Execute("[0-9]*");
range.Fields.Add(range, FieldType.FieldPage);
Also you'd be able to almost automatically port VBA scripts to C# and get huge performance increase.
Interested? Leave your comment.
- Michael
|
-
This article is a technical blurb mostly about why it is taking so long for us to support footnotes and endnotes in Aspose.Words when rendering documents to PDF, XPS or printing. This post looks at how Microsoft Word handles some tricky layouts and even reveals some obscure flaws. It might be interesting to Aspose.Words customers who are waiting for footnotes to be supported or to any other developer whomever pondered about document layout.
As you might know one of the goals of the Aspose.Words layout engine is to produce result as close to Microsoft Word as possible. Being in charge of this piece of Aspose.Words I personally spend a lot of time figuring out how Microsoft Word formats a document into pages. Footnotes are hot for us because many customers are waiting for this feature, so I’ve decided to share some thoughts in this post. Hopefully if there are curious readers out there I’ll post regularly.
What We’ve Done so Far
Aspose.Words for .NET 9.0 supports rendering of footnotes to some extent. Some simple documents might render acceptable. We decided it is better to release now because some footnotes is better than no footnotes at all.
Some of the limitations are:
· Only footnotes are rendered. Endnotes are not rendered.
· Footnotes are rendered immediately below text (not at the bottom of the page)
· Wrapping of long footnotes to next page is not supported. The text of the footnote could be truncated.
· Occassionally the text of the footnote will not appear.
More complete support is coming in the next version, estimated May 2010.
Magic footnotes
I believe everybody knows what footnotes and endnotes are in Microsoft Word documents so I’ll not disscuss it here, however there are a few things I need to mention:
· Footnote or endnote consists of two parts. One part is a reference mark in the main text story of the document. The other part is the content of the footnote or endnote which is typically rendered at the bottom of the page or at the end of the document.
· References are continuously numbered, but can use custom marks or skip numbers.
· There are also three types of delimeters used to separate main text from the footnote/endnote text. They are separator, continuation separator and continuation notice.
· Footnote/endnote text can wrap from one column to another and can occupy one or more pages at the end of a section.
· There are two types of locations for footnote text and two types for endnote text.
· Footnote/endnote numbering and location can be specified per section in a document.
When I was starting to analyze this feature I knew that implementation challenge wouldn’t be technical but rather logical. The layout model of the document (it was adapted from Aspose.Editor before it was discontinued) already provides more functionality than required by Aspose.Words rendering. It already keeps track of all stories in the document but until recently footnotes story was ignored.
With this kind of attitude I was hoping to prototype Aspose.Words code in a few hours. I started to create small, but tricky test documents in Microsoft Word and tried to push its layout engine into a corner and that’s where the “magic” begun.
Magic 1: Non-trivial ordering of footnotes

As you can see on the first screenshot, while table fits into one page footnotes flow according to the logical order of the references in the main text story, from 1 to 9. The second screenshot has same numbers for references but content is now ordered differently. There is no error and “yes” there are two “5” footnotes. This is how Word 2007 renders this case (I’m not surprised though). Let’s ignore the bug for now but focus on the ordering issue.
Technically, a footnote story can be represented as a linked list of runs, that is “1 One¶2 Two¶…9 Nine¶”. In Microsoft Word you can move caret from one footnote to another and using VBA you can query current position in the story which returns increasing integer. Word’s layout engine uses this order to pick a next portion of content to be flowed into a geometrical container. However, as we’ve seen this no longer works for footnotes since “seven” is rendered after “nine”.
Magic 2: Column Balancing with Footnotes
The second thing is balancing of text columns. If a section ends with a “section break continuous” break and it has two or more columns then the content will be balanced between last group of columns of this section to minimize height of this group. Microsoft Word will include the height of the footnotes/endnotes into the column and balancing shall account for it.
Right, a bug again. Endnote “C” is overlapped by content of a second section on the page. Ignore the bug for now, but still the issue is that the column was designed to aggregate main text story content, however, as we’ve seen content of footnote/endnote stories is also flowed into it and balancing must handle this properly.
Magic 3: Wrapping to Next Page
Third and last for this post is picking the right positions to wrap footnote and main text content. My initial thoughts were that Microsoft Word flows main text story content and footnotes in parallel. I thought that it attempts to flow footnote content as soon as a reference is flowed into the column. However the next example made me anxious.
If my idea was correct, then Microsoft Word would flow both 1st and 2nd footnotes right after first two lines of the main text story are flowed into the column, which means that 2nd footnote would fit on the first page completely and last two lines of the paragraph would be wrapped to the next column. However this doesn’t happen. Do you know why? Now I do.
You need to take paragraph rules into account. They are working in both main text and footnote text. There are also rules which try to keep the reference and content on the same page, rules about sharing of page by footnotes and endnotes, separator overflows, and hopefully you’ll get an idea of why it takes so long to implement layout of footnotes/endnotes the way Microsoft Word does it.
If you have something to say I’d be more than glad to hear it.
- Michael
|
-
We are happy to announce that a top priority feature (40+ requests logged in our defect database) is now implemented in the recently released Aspose.Words for .NET 9.0. TOC fields are now updated along with others!
TOC stands for Table of Contents and is represented by the TOC field in a Microsoft Word document. TOC entries may be built from:
- Paragraphs having the HeadingN style where N is the level of the heading
- Paragraphs having special styles specified in the TOC field code
- Paragraphs having outline level other than body text
- TC (TOC entry) fields
Earlier you had to update TOC manually by pressing F9 in Microsoft Word, but now Aspose.Words takes care of that. Of course, Aspose.Words does not use Microsoft Word Automation and implements the complete field update itself. Just two simple lines of code do the magic:
Document doc = new Document("mydoc.docx"); doc.UpdateFields(); doc.UpdatePageLayout();
Why two stage update? Document.UpdateFields() rebuilds and updates field structure while Document.UpdatePageLayout() recalculates and inserts actual page numbers. Voila:
Most of field switches are supported, paragraph numbering is preserved, and in whole the TOC field looks exactly as it was updated by Microsoft Word.
Another great feature added in Aspose.Words for .NET 9.0 is the support for the MERGEFORMAT field format option. MERGEFORMAT is widely used in Microsoft Word documents. It instructs the field retain the formatting and structure of its value when the field is being updated. Imagine an IF field whose TrueText and FalseText look as tricky as in the screenshot:
And the current value looks like the following:
Now after you update the fields in the document by calling
doc.UpdateFields();
the value gets updated, but its formatting and structure remains the same:
To download Aspose.Words for .NET 9.0 that introduces these and many other great features, please visit http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx
|
-
|