Text changes when saved with ScaleRichView.
Posted: Wed Sep 02, 2015 11:59 am
Hello,
i have a probelm with the ScaleRichView. We have a big document software which has documents saved as RTF in a database.
The documents contain invisible field definitions for names, street, postal codes and such to be replaced on runtime.
The ScaleRichView ignores these and replaces them with text which renders the whole dms useless.
Example RTF in Database:
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl
{\f0\fswiss\fcharset0\fprq2 Arial;}
{\f1\froman\fcharset0\fprq2 Times New Roman;}
{\f2\froman\fcharset2\fprq2 Symbol;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;\red192\green192\blue192;}
{\stylesheet{\s0\itap0\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}
{\*\generator TX_RTF32 11.0.401.504;}
\deftab1134\paperw12240\paperh15840\margl1531\margt2665\margr1531\margb1701\pgbrdrhead\pgbrdrfoot\sectd\headery567\footery567
{\header\pard\itap0\plain\f0\fs24\par}
{\footer\pard\itap0\plain\f0\fs24\par}\pard\itap0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f0\fs16\cf3\par\plain\f0\fs16\ul\cf3 ---\plain\f1\fs24\par\plain\f0\fs24\cf3\par\plain\f0\fs24\cf3\cb4\chshdng0\chcfpat0\chcbpat4 {\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b004e0041004d00450031007d000000}{\*\txfieldtext Testname}{\field\fldlock{\*\fldinst { MERGEFIELD \{NAME1\}}}{\fldrslt{Testname}}}} \plain\f1\fs24\par\plain\f0\fs24\cf3\cb4\chshdng0\chcfpat0\chcbpat4 {\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b004e0041004d00450032007d000000}{\*\txfieldtext testname2}{\field\fldlock{\*\fldinst { MERGEFIELD \{NAME2\}}}{\fldrslt{testname2}}}}
Example RTF saved with ScaleRichView:
{\rtf1\fbidis\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0\paperw11906\paperh16838\margl1800\margr1800\margt1440\margb1440\headery720\footery720\viewzk2
{\fonttbl{\f0\fnil Arial;}{\f1\fnil\fcharset0 Arial;}{\f2\fnil\fcharset0 Times New Roman;}}{\colortbl;\red0\green0\blue0;\red192\green192\blue192;\red0\green0\blue255;}{\stylesheet{\s0\fi0\li0\ql\ri0\sb0\sa0 \f0\fs20 Normal;}{\*\cs1 \additive \ssemihidden \sunhideused Default Paragraph Font;}{\s2\keepn\fi0\li0\ql\ri0\outlinelevel0\sb240\sa60 \sbasedon0\snext0\slink3\b\fs32 heading 1;}{\*\cs3 \additive\slink2\sbasedon1\b\fs32 heading 1 Text;}{\s4\keepn\fi0\li0\ql\ri0\outlinelevel1\sb240\sa60 \sbasedon0\snext0\slink5\b\i\fs28 heading 2;}{\*\cs5 \additive\slink4\sbasedon1\b\i\fs28 heading 2 Text;}{\s6\keepn\fi0\li0\ql\ri0\outlinelevel2\sb240\sa60 \sbasedon0\snext0\slink7\b\fs26 heading 3;}{\*\cs7 \additive\slink6\sbasedon1\b\fs26 heading 3 Text;}{\*\cs8 \additive\ul\cf3 Hyperlink;}{\s9\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink10 header;}{\*\cs10 \additive\slink9\sbasedon1 header Text;}{\s11\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink12 footer;}{\*\cs12 \additive\slink11\sbasedon1 footer Text;}{\*\cs13 \additive\super footnote reference;}{\*\cs14 \additive\super endnote reference;}{\s15\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink16 footnote text;}{\*\cs16 \additive\slink15\sbasedon1 footnote text Text;}{\s17\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink18 endnote text;}{\*\cs18 \additive\slink17\sbasedon1 endnote text Text;}{\s19\fi0\li0\ql\ri0\sb0\sa0 \f1\fs24 [Normal];}}
{\header \par}{\footer \par}{\headerf \par}{\footerf \par}{\headerl \par}{\footerl \par}
\pard\s0\fi0\li0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\ql\ri0\sb0\sa0\itap0 \plain \f1\fs16\cf1
\par \plain \f1\ul\fs16\cf1 ---
\par \plain \f1\fs24\cf1
\par \plain \f1\fs24\chcbpat2\cf1 Testname
\par testname2
Thats a real problem for me, as we need to do it this way.
Greetings, Spo
i have a probelm with the ScaleRichView. We have a big document software which has documents saved as RTF in a database.
The documents contain invisible field definitions for names, street, postal codes and such to be replaced on runtime.
The ScaleRichView ignores these and replaces them with text which renders the whole dms useless.
Example RTF in Database:
{\rtf1\ansi\ansicpg1252\uc1\deff0{\fonttbl
{\f0\fswiss\fcharset0\fprq2 Arial;}
{\f1\froman\fcharset0\fprq2 Times New Roman;}
{\f2\froman\fcharset2\fprq2 Symbol;}}
{\colortbl;\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue0;\red192\green192\blue192;}
{\stylesheet{\s0\itap0\f0\fs24 [Normal];}{\*\cs10\additive Default Paragraph Font;}}
{\*\generator TX_RTF32 11.0.401.504;}
\deftab1134\paperw12240\paperh15840\margl1531\margt2665\margr1531\margb1701\pgbrdrhead\pgbrdrfoot\sectd\headery567\footery567
{\header\pard\itap0\plain\f0\fs24\par}
{\footer\pard\itap0\plain\f0\fs24\par}\pard\itap0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f0\fs16\cf3\par\plain\f0\fs16\ul\cf3 ---\plain\f1\fs24\par\plain\f0\fs24\cf3\par\plain\f0\fs24\cf3\cb4\chshdng0\chcfpat0\chcbpat4 {\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b004e0041004d00450031007d000000}{\*\txfieldtext Testname}{\field\fldlock{\*\fldinst { MERGEFIELD \{NAME1\}}}{\fldrslt{Testname}}}} \plain\f1\fs24\par\plain\f0\fs24\cf3\cb4\chshdng0\chcfpat0\chcbpat4 {\txfielddef{\*\txfieldstart\txfieldtype0\txfieldflags128\txfielddata 7b004e0041004d00450032007d000000}{\*\txfieldtext testname2}{\field\fldlock{\*\fldinst { MERGEFIELD \{NAME2\}}}{\fldrslt{testname2}}}}
Example RTF saved with ScaleRichView:
{\rtf1\fbidis\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0\paperw11906\paperh16838\margl1800\margr1800\margt1440\margb1440\headery720\footery720\viewzk2
{\fonttbl{\f0\fnil Arial;}{\f1\fnil\fcharset0 Arial;}{\f2\fnil\fcharset0 Times New Roman;}}{\colortbl;\red0\green0\blue0;\red192\green192\blue192;\red0\green0\blue255;}{\stylesheet{\s0\fi0\li0\ql\ri0\sb0\sa0 \f0\fs20 Normal;}{\*\cs1 \additive \ssemihidden \sunhideused Default Paragraph Font;}{\s2\keepn\fi0\li0\ql\ri0\outlinelevel0\sb240\sa60 \sbasedon0\snext0\slink3\b\fs32 heading 1;}{\*\cs3 \additive\slink2\sbasedon1\b\fs32 heading 1 Text;}{\s4\keepn\fi0\li0\ql\ri0\outlinelevel1\sb240\sa60 \sbasedon0\snext0\slink5\b\i\fs28 heading 2;}{\*\cs5 \additive\slink4\sbasedon1\b\i\fs28 heading 2 Text;}{\s6\keepn\fi0\li0\ql\ri0\outlinelevel2\sb240\sa60 \sbasedon0\snext0\slink7\b\fs26 heading 3;}{\*\cs7 \additive\slink6\sbasedon1\b\fs26 heading 3 Text;}{\*\cs8 \additive\ul\cf3 Hyperlink;}{\s9\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink10 header;}{\*\cs10 \additive\slink9\sbasedon1 header Text;}{\s11\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink12 footer;}{\*\cs12 \additive\slink11\sbasedon1 footer Text;}{\*\cs13 \additive\super footnote reference;}{\*\cs14 \additive\super endnote reference;}{\s15\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink16 footnote text;}{\*\cs16 \additive\slink15\sbasedon1 footnote text Text;}{\s17\fi0\li0\ql\ri0\sb0\sa0 \sbasedon0\slink18 endnote text;}{\*\cs18 \additive\slink17\sbasedon1 endnote text Text;}{\s19\fi0\li0\ql\ri0\sb0\sa0 \f1\fs24 [Normal];}}
{\header \par}{\footer \par}{\headerf \par}{\footerf \par}{\headerl \par}{\footerl \par}
\pard\s0\fi0\li0\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\ql\ri0\sb0\sa0\itap0 \plain \f1\fs16\cf1
\par \plain \f1\ul\fs16\cf1 ---
\par \plain \f1\fs24\cf1
\par \plain \f1\fs24\chcbpat2\cf1 Testname
\par testname2
Thats a real problem for me, as we need to do it this way.
Greetings, Spo