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

Free Support Forum - aspose.com

RichTextBoxField not formating the HTML

I am currently investigating some functionalities and i’m not getting the RichTextBoxField to work.


The Html text i am putting in RichTextValue is not getting formated.

This is my code and the pdf file i am using is attached:

var htmlText = 

Test content

  • One
  • Two
;
        <span style="color:#569cd6;">string</span> <span style="color:white;">pagePath</span> <span style="color:#b4b4b4;">=</span> <span style="color:#d69d85;">"Teste_2.pdf"</span>;</pre><pre style="font-family:Consolas;font-size:13;color:gainsboro;background:#1e1e1e;">            <span style="color:#569cd6;">var</span> <span style="color:white;">doc</span> <span style="color:#b4b4b4;">=</span> <span style="color:#569cd6;">new</span> <span style="color:#4ec9b0;">Document</span>(<span style="color:white;">pagePath</span>);
        <span style="color:#569cd6;">var</span> <span style="color:white;">richTBF</span> <span style="color:#b4b4b4;">=</span> <span style="color:white;">doc</span><span style="color:#b4b4b4;">.</span><span style="color:white;">Form</span>[<span style="color:#d69d85;">"Title_9fnF8b*1JO8NbqjZNj-YoA"</span>] <span style="color:#569cd6;">as</span> <span style="color:#4ec9b0;">RichTextBoxField</span>;

        <span style="color:#608b4e;">richTBF.RichTextValue = htmlText;</span>

        <span style="color:#569cd6;">string</span> <span style="color:white;">newdocName</span> <span style="color:#b4b4b4;">=</span> <span style="color:#d69d85;">"testPrinted.pdf"</span>;

        <span style="color:#569cd6;">using</span> (<span style="color:#569cd6;">var</span> <span style="color:white;">fileStream</span> <span style="color:#b4b4b4;">=</span> <span style="color:#4ec9b0;">File</span><span style="color:#b4b4b4;">.</span><span style="color:white;">Create</span>(<span style="color:white;">newdocName</span>))
        {
            <span style="color:#608b4e;">//pdf.Flatten();</span>
            <span style="color:white;">doc</span><span style="color:#b4b4b4;">.</span><span style="color:white;">Save</span>(<span style="color:white;">fileStream</span>);
        }</pre></div>

Hi Antonio,


Thanks for your inquiry. You can populate RichTextBoxField as following. But I am afraid we have noticed it is malfunctioning at the moment with list items. We have logged an investigation ticket PDFNEWNET-37413 in our issue tracking system to resolve the issue. We will notify you as soon as it is resolved.

var htmlText =

Test
content

  • One
  • Two

”;<o:p></o:p>

string pagePath = myDir + "Teste_2.pdf";

var doc = new Document(pagePath);

var richTBF = doc.Form["Title_9fnF8b*1JO8NbqjZNj-YoA"] as RichTextBoxField;

richTBF.RichTextValue = htmlText;

string newdocName = myDir + "test_richtextboxfield.pdf";

using (var fileStream = File.Create(newdocName))

{

//pdf.Flatten();

doc.Save(fileStream);

}


We are sorry for the inconvenience caused.

Best Regards,
Hello and thank you for your reply,

Do you have any prediction as to when it will be fixed?

Regards

Hi Antonio,


As we recently have been able to notice this issue, and until or
unless we have investigated and have figured out the actual reasons of this
problem, we might not be able to share any timelines by which this problem will
be resolved.<o:p></o:p>

However, as soon as we have made some significant progress towards the resolution of this issue, we would be more than happy to update you with the status of correction. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard.

Good day,


I’m just checking in to ask if you have any news about this issue.

Regards

Hi Antonio,


Thanks for your inquiry. I am afraid your issue is still not resolved. It is pending for investigation in the queue with other priority tasks. As soon as its investigation is completed then we will share our findings or ETA with you.<o:p></o:p>

We are sorry for the inconvenience caused.<o:p></o:p>

Best Regards,

Hi Antonio,


Thanks for your patience.

The development team has further investigated the issue reported earlier and as per our current estimates, we plan to get this problem resolved in next release of Aspose.Pdf for .NET 9.8.0, which will be published in first week of November-2014. Please be patient and wait for the resolution.