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

Free Support Forum - aspose.com

Custom pipes in Aspose.Words for .NET

Hello!


<span style=“color: rgb(36, 39, 41); font-family: Arial, “Helvetica Neue”, Helvetica, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);”>I’m using Aspose.Words for .NET and they have built-in pipes to process words, for example
<span style=“color: rgb(36, 39, 41); font-family: Arial, “Helvetica Neue”, Helvetica, sans-serif; font-size: 15px; background-color: rgb(255, 255, 255);”>
<pre class=“lang-cs prettyprint prettyprinted” style=“margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-size: 13px; width: auto; max-height: 600px; overflow: auto; font-family: Consolas, Menlo, Monaco, “Lucida Console”, “Liberation Mono”, “DejaVu Sans Mono”, “Bitstream Vera Sans Mono”, “Courier New”, monospace, sans-serif; background-color: rgb(239, 240, 241); color: rgb(57, 51, 24); word-wrap: normal;”><code style=“margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, “Lucida Console”, “Liberation Mono”, “DejaVu Sans Mono”, “Bitstream Vera Sans Mono”, “Courier New”, monospace, sans-serif; white-space: inherit;”>:upper - converts a string to upper case
:caps - capitalizes a first letter

I’m wondering is there a way when I can write my own pipes?

Hi,


Unfortunately, your question isn’t clear enough therefore we request you to please elaborate your inquiry by providing complete details of your usecase. Please also provide your sample input Word document and expected document here for our reference. We will investigate the structure of your expected document as to how you want your final output be generated like. You can create expected document using Microsoft Word. This will help us to understand your scenario, and we will be in a better position to address your concerns accordingly.

Best regards,

Hello Awais,


Let’s imagine that I have a documet (1.docx attached) that contains next text

<<Person.Name :myCustomFunction >>

I would like to create my function f.e. myCustomFunction that will process string field Person.Name as I define. We have built-in functions like :caps, :upper etc, but I’d like to create my own. My question - can I do this?

Hi,


Thanks for your inquiry. I think, you can meet this requirement by using Find and Replace functionality of Aspose.Words.
http://www.aspose.com/docs/display/wordsnet/Find+and+Replace

I am afraid, there are no documents attached in this thread. Please provide your sample input Word document and expected document here for our reference.

Best regards,