Ignoring / Escaping HTML tags within FormattedTextArea

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for COM/ActiveX (v3)  /  Ignoring / Escaping HTML tags within FormattedTextArea

DynamicPDF Generator for COM/ActiveX (v3) Forum

Hi,

I have a wee question related to HTML tags within FormattedTextArea.

I have a sample text as follows:
"HTML <p> Tag:
A paragraph is marked up as follows:
   <p>This is some text in a paragraph.</p>

<b>Definition and Usage</b>

The <p> tag defines a paragraph.

The p element automatically creates some space before and after itself. The space is automatically applied by the browser, or you can specify it in a style sheet."

Now my requirement is to display all <p> and </p> tags (and only p elements, not b elements) to be displayed as <p> and </p> respectively. Since I'm using FormattedTextArea all HTML tags are removed from the final output.

Is there as way to escape some HTML tags and not others?

Thanks in advance
Shishir
Posted by a ceTe Software moderator
Hello Shishir,

You can use the TextArea page element to display the <p> tags where needed. So you will have to switch bteween TextArea and FormattedTextArea page element.

Also you can try using the unicode values for the opening and closing bracket within the FormattedTextArea page element and that may work for you.

Thanks,
ceTe Software Support Team
Hi,

Could you give me an example which uses unicode?

I can not use TextArea as I want <b>Text</b> to display text in bold, but <p>...</p> to display as <p>...</p>.

Thanks for a quick reply.

Shishir
Posted by a ceTe Software moderator
Hello Shishir,

You can try using the unicode values as following:

003C        # LESS-THAN SIGN
003E        # GREATER-THAN SIGN

You can add unicode values as following:

MyStrText = "\u003C LESS-THAN SIGN"
16 MyPage.AddFormattedTextArea MyStrText, 0, 0, 504, 100, DPDF_Align_Center, DPDF_Font_Helvetica, 18

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 2:11 PM.