c# - .Net RTF Writer: How can I add pre-formatted RTF text? -
i using rtf writer library generate rtf document. allows me add images, tables , text meet majority of requirements.
however, want add text in rtf format. test needs added while keeping formatting, means not want convert plain text first before adding it.
currently, formatted rtf includes document information, can remove part using richtextbox ensure relevant part of document kept. part want add generated document.
here example of pre-formatted rtf text:
{\rtf1\ansi\ansicpg1252\deff0\deflang2057{\fonttbl{\f0\fnil\fcharset0 microsoft sans serif;}} \uc1\pard\f0\fs17 here rtf}
normally, when add text using .net rtf writer can following:
var par = doc.addparagraph(); par.settext("here text");
is there can change allow adding pre-formatted rtf text?
side note: if not possible, open suggestions alternate libraries (free commercial use) allow me need. suggestion these better suited comment rather answer.
it appears not possible using rtf writer library. seems have no support loading, parsing or merging other rtf data.
for it's worth, requirements have changed no longer need this. however, on verge of making own rtf parser , merging tool. merging rtf not simple copy/paste due way rtf format handles styles. styles such fonts , colours defined in header tables makes merging more complicated.
anyone wanting try may find useful information: here, here , here.
Comments
Post a Comment