Free Support Forum - aspose.com

Feature Request: Please expose the rendering API

Although I posted this same comment on a blog entry that discussed your lack of public API for rendering, I read somewhere on the site that I should post my comment in the forums so that it could get tagged as a feature request. So, here it is again for that purpose.

Thank you in advance for considering implementing this functionality. It may be a show stopper for us if we are not able to find a work around to this limitation.

----------------------------------

We are wanting to use Aspose to create final documents on the fly from an RTF template. One of the issues that we have is that the final document cannot contain the electronic signature block orphaned on the last page by itself. We have tried using the widow/orphan and keep w/next settings in Word, but this does not always render the document in an acceptable format as it can possibly pull a large paragraph from the previous page to the last page and thus create too much white space on the second to the last page.

The only acceptable format is to evaluate whether or not the signature block is orphaned on the last page and if it is to put a section break two lines from the bottom of the last paragraph on the previous page, thus forcing the last two lines of the previous page to flow to the last page with the signature block.

Not having the ability to determine which page a given paragraph is on prohibits us from being able to do this in Aspose. Please consider exposing your rendering API publicly as soon as possible as the lack of this functionaly may prevent us from utilize Aspose as our document rendering solution.

Thank you!

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please attach your template, output and expected output documents? I will check the issue and provide you more information. Maybe there is an easier way to achieve what you need.

Best regards.

Hi. Thank you for your quick response.

Attached you will find two files. The first (Aspose_Orphaned_SigBlock_example.rtf) is an example of the problem I am trying to solve. You will see that the signature block is on the last page all by itself. However, if the last two paragraphs of the previous page are set to "Keep with next" then too much content is pulled from the first page which results in too much whitespace.

The second document shows what I would like to do programmatically. That is, I would like to, inspect the document and find out if there is any text on the page prior to the signature block. If there is not, I would like to move up to lines into the previous paragraph and insert a page break, which will force two lines to move to the last page just before the signature block.

- Drew

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. In the expected document, you just insert page break. Maybe, you can just make your paragraphs smaller. For example, you can insert the last sentence of the paragraph before the signature line as a separate paragraph. In this case, you can set “keep with next” option.

Do you generate this document programmatically?

Best regards.

Yes. These documents are programmatically generated. They are also generated dynamically from dictated texted. Therefore we do not have any human control over the final paragraph content/length. This is why we need to be able to do the aforementioned calcualtions based on final document pagination.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I already created a feature request. But I cannot promise you that this feature will be added anytime soon. So we should try to find a workaround.

Maybe you can parse your test using regular expression before inserting it into the document. Split text into separate sentences. Then include the last sentence as a separate paragraph as I mentioned in my previous answer.

Best regards.

The problem with your proposed solution is that in the case where there is only three sentences in a paragraph and the signature block is not orphaned on the last page this will create a document that looks odd because we have not created two small paragraphs where only one is needed; which is not acceptable. The only way to know whether or not the page break should be included that I have come up with is to examine the document pagination of the final RTF.

We've tried this from every angle imaginable. It is a project that has been in the works for almost 3 years. The reason we are looking at Aspose is because the current solution is implemented using XSLT and we just cannot get the level of document control that we need using that technology even with very fine grained insertion of "widow and orphan" and "keep with next." We have tried calculating the number of characters in the last paragraph to see if it is what we would consider a "large" paragraph, along with other formulas, but nothing is dependable enough to produce a document that does not need some sort of post-processing of the paginated RTF.

At this time we are post-processing with a 3rd party component from Sub-Systems called TERN (http://www.subsystems.com/) to examine/modify the final RTF document in the manner mentioned in my first post. My hope was that we would be able to use Aspose to both dynamically create the RTF and examine document pagination and eliminate the need to for document post-processing.

I hope that helps give you the level of information you need. Thank you again for both your quick response and your desire to fill our need. I realize you're doing the best you can and I appreciate it. I'll look forward to hearing back from you if/when Aspose has more control over document pagination.

- Drew

Hi <?xml:namespace prefix = st1 ns = "urn:schemas:contacts" />Drew,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I will let you know once pagination information of nodes is exposed.

Best regards.

How does Feb 2010 sound?

The issues you have found earlier (filed as WORDSNET-2978) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(20)