title: Richtextbox to iTextSharp
body: <p><strong>Context</strong></p>
  
  <p>What we need is to capture some user input (formatted text) from a WPF application and output a PDF with some stored images AND the user input on the last page.</p>
  
  <p><strong>What we've tried</strong></p>
  
  <p>We create the WPF app, add the iTextSharp library, recover the images from the DB and add it to the PDF. That's working. Now, for the user input we added a <a href="http://wpftoolkit.codeplex.com/wikipage?title=RichTextBox&amp;referringTitle=Home" rel="nofollow">RichTextBox</a> control from the Extended WPF Toolkit. We added this control mainly because of its binding properties and <a href="http://wpftoolkit.codeplex.com/wikipage?title=RichTextBox&amp;referringTitle=Home#formatters" rel="nofollow">formatters</a>. Basically we can bind the rich content of the control to a property. That binding is working. We already have the RTF format, as (in example):</p>
  
  <pre><code>"{\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Segoe UI;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs18\f2\cf0 \cf0\ql{\f2 {\ltrch This is the }{\b\ltrch RichTextBox}\li0\ri0\sa0\sb0\fi0\ql\par}}}"
  </code></pre>
  
  <p><strong>Problem</strong></p>
  
  <p>The thing is, the actual output of the PDF is precisely that previously shown RTF, but the expected output (for the example) must be:</p>
  
  <pre><code>"This is the **RichTextBox**\r\n"
  </code></pre>
  
  <p>This is happening obviously because we are inserting the binded RTF from the control as it comes to the PDF, the thing is: <strong>How can we add that content and specify its RTF?</strong></p>
  
  <p>PS. If you have other working idea or solution (without using a richtextbox, or something like that) it's welcome. Thanks in advance.</p>