We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Layout information suggestions

Hello,

Being able to know on what page a paragraph or a table row will be a very important feature to us and will enable to build documents according to their page layout. This may lead to paginating the document many times and may result in poor performances. This could happen for example when building a table that will span on different pages with page subtotals or totals.

That’s why I believe Aspose.Words’ pagination engine would be much more efficient if it were able to partially repaginate a document.

Let’s say for example that i insert a table row after another that is on page 9 of a document, paginate the document to know where the inserted row is, make a treatment according to its page number and so on. Since no change were made before page 9, the pagination engine wouldn’t have to repaginate the previous 8 pages.
Even more efficient would be if the pagination engine could stop the pagination at the position of a document element. For example, I may not need the document element pagination informations after an inserted row or paragraph.

Regarding the rendering of pages as images, I noticed that the drawings are not anti-aliased. Could it possible to have it done or even better, to have control on what is to be anti-aliased or not?

Regards.


Thanks for the suggestions.

Paragraph Position on a Page

We will certainly add some "basic" features such as detecting on what page and where each document element is located. Will try in the next few releases.

Partial Pagination

We will consider partial pagination in Aspose.Words, but I cannot yet make big promises. Aspose.Words was designed to process documents "in a straight line" on the server. E.g. it does not have concepts such as Selection, Cursor, Undo, change delta and so on. It is a benefit in some scenarios and a drawback in others.

Maybe, Aspose.Editor will be more suitable for your tasks. Aspose.Editor is a UI control, true, but it has a UI-less document object model that is much more similar to MS Word Automation than Aspose.Words'. Aspose.Editor has a document with Range, Selection and linear character positions throughout the document (unlike Aspose.Words tree).

Aspose.Words and Aspose.Editor have the same pagination engine (it was initially developed for Aspose.Editor), but Aspose.Editor is more sophisticated in that it can handle partial edits (small edits or big edits does not matter) and repaginate accordingly.

The only trouble is that Aspose.Editor is slightly lagging behind on supported document features. Aspose.Editor for example does not yet support images, lists, headers and footers. But the next Aspose.Editor version to be released in 3-4 month will have all that. So if you want to "fiddle" with positioning of document elements and enjoy partial repagination I would recommend you try Aspose.Editor then.

Antia-Aliasing etc

When you use SaveToImage then yes, there are no options to specify anti-aliasing etc. I think we can add that to the ImageOptions object. What others apart from anti-aliasing can you think of?

But when you use Document.RenderToSize or RenderToScale you provide a .NET Graphics object for rendering. That object can have any settings and Aspose.Words will honour them all. It could be anti-aliasing or transforms such as scaling or rotation.

So it is easy to workaround. Create a bitmap of desired size, create a .NET Graphics object on the bitmap, RenderToSize or RenderToScale and then save the bitmap to an image.

Actually, there is an example in the API to do just that:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.document.rendertoscale.html

Thank you for your answers.

Regarding the use of Aspose.Editor for its pagination engine, I fear this won’t be possible soon enough since we need support for fields besides all the others missing features. I will have a look at it though.

I’m really not asking for advanced partial pagination features. For example, being able to “stop” the pagination after a document element or to “resume” it after another element that was already paginated should be more than fine.

About your pdf, images and html export, an option I believe should be added is the ability to specify whether or not the text of the table of contents should be underlined and put in blue. This is not the case for example when exporting to pdf with MS Word.
Also , I don’t really see the point of having page numbers in the TOC when exporting a document to html since there is no page notion.

Also, I noticed you have a bug with your renderer with the web demo document “Mailing Labels”. When exported to images, parts of the text are slightly cut with a “zoom” (a picture size actually) from 75% to 200%, specially the letter “g” in “Argentina” and the first letters of the blocks.

Kind regards.