Developers Manual and API Reference © 2006-2014 by WPCubed GmbH, Munich, Germany I TextDynamic - .NET and ActiveX document creation Table of Contents Part I Welcome to RTF2PDF / TextDynamic Server 1 Part II Getting started with Rtf2Pdf / TextDynamic Server 3 1 Overvie..w.. ............................................................................................................................... 4 2 QuickS.t.a..r.t. ............................................................................................................................. 5 3 Trouble..s.h..o..o..t.i.n..g.. ...N..E..T.. ............................................................................................................ 9 4 Load T..e..m...p..l.a..t.e..,. .U..p..d..a..t.e.. .a..n..d.. .S...a..v.e.. ....................................................................................... 10 5 ASP.N.E..T.. .E..x..a..m...p..l.e.. ............................................................................................................... 11 6 ASP.N.E..T.. .L..i.v..e.. .D..e..m...o..s.. .......................................................................................................... 15 7 Prope.r.t.i.e..s. ............................................................................................................................ 16 Report .......................................................................................................................................................... 16 Memo .......................................................................................................................................................... 16 Memo2 .......................................................................................................................................................... 17 PDFCreator .......................................................................................................................................................... 17 ResultBuffer .......................................................................................................................................................... 17 AttrHelper .......................................................................................................................................................... 18 8 Metho.d..s. ............................................................................................................................... 18 BeginDoc .......................................................................................................................................................... 18 EndDoc .......................................................................................................................................................... 19 Print .......................................................................................................................................................... 19 PrintSecond .......................................................................................................................................................... 19 StartEngine / S..e...t.L..i.c..e...n..s..e... ..................................................................................................................................... 20 StopEngine .......................................................................................................................................................... 21 ReleaseInt .......................................................................................................................................................... 21 9 RTF2P.D...F.. .A..c..t.i.v.e..X... ................................................................................................................ 21 10 wPDFC...o..n..t.r.o..l. .D..o..c..u..m...e..n..t.a..t.i.o..n.. .............................................................................................. 23 wPDFControl/.R..T..F..t..o..P..D...F.. .D..e..m....o.. ............................................................................................................................. 23 Quick Start - w...R..T..F..2..P...D..F.. ./. .T..e...x..t.D..y..n...a..m...i.c.. .S...e..r..v..e..r.. ................................................................................................ 27 Quick Start - G..e..n...e..r..i.c.. .P..D..F.. .C...r..e..a..t.i.o...n.. .................................................................................................................... 29 Tip: Use SaveD...C.. ./. .R...e..s..t..o..r..e..D..C... .............................................................................................................................. 31 wPDFControl ...N..E..T.. .................................................................................................................................................. 32 PDFControl......................................................................................................................................................... 32 PDFPropDlg......................................................................................................................................................... 33 Properties......................................................................................................................................................... 35 RTF to PDF......................................................................................................................................................... 39 Methods ......................................................................................................................................................... 45 Events ......................................................................................................................................................... 51 wPDFControl .D..L..L... ./. .A..c..t..i.v..e..X.. .................................................................................................................................. 52 wPDFControl .M...e..t..h..o..d...s.. .a..n..d... .P..r..o..p..e...r.t..i.e..s.. ............................................................................................................. 53 Properties......................................................................................................................................................... 53 Methods ......................................................................................................................................................... 55 License .......................................................................................................................................................... 57 Part III Document and text property API reference 58 1 Page S...i.z.e.. ............................................................................................................................ 58 General .......................................................................................................................................................... 58 Different in on..e.. .d...o..c..u..m....e..n...t. .................................................................................................................................. 58 Sections .......................................................................................................................................................... 58 © 2006-2014 by WPCubed GmbH, Munich, Germany Contents II Labels .......................................................................................................................................................... 59 2 Conten..t.s.. .............................................................................................................................. 59 Text .......................................................................................................................................................... 61 Tables .......................................................................................................................................................... 61 Fields .......................................................................................................................................................... 62 Images .......................................................................................................................................................... 63 Header & Foot..e..r.. .................................................................................................................................................... 63 Textboxes .......................................................................................................................................................... 64 Footnotes .......................................................................................................................................................... 64 3 Font A.t.t.r..i.b..u..t.e..s. ..................................................................................................................... 65 4 Parag.r.a..p..h.. .A..t.t.r.i.b..u..t.e..s.. ........................................................................................................... 67 5 Parag.r.a..p..h.. .S..t.y..l.e..s. ................................................................................................................. 68 Part IV Interfaces (Technical API Reference) 69 1 Gener.a..l.:. .W...P..D...l.l.I.n..t. .+.. .I.W...P..M...e..m...o../.I.W...P..E..d..i.t.o..r.. .......................................................................... 70 Events .......................................................................................................................................................... 74 RTF2PDF / .T..e..x..t.D..y..n..a..m...i.c..................................................................................................................................... 74 Exclusive t.o.. .T..e..x..t.D..y..n..a..m...ic................................................................................................................................... 87 Categories .......................................................................................................................................................... 102 Character. .A...t.t.r.i.b..u..t.e..s.. .C..a..t.e..g..o..r..y......................................................................................................................... 103 Character. .S...t.y..le..s.. .C...a..t.e..g..o..r.y............................................................................................................................... 103 Document. .P..r..o..p..e..r.t.i.e..s.. .C..a..t.e..g..o..r.y......................................................................................................................... 103 Callback F..u..n..c..t.io..n..s.. .C...a..t.e..g..o..r.y............................................................................................................................ 104 Header an..d.. .F..o..o..t.e..r. .S...u..p..p..o..r.t. .C..a..t.e..g..o..r..y.............................................................................................................. 104 Sections ......................................................................................................................................................... 105 Hyperlinks.. .a..n..d.. .B..o..o..k..m...a..r.k..s.. .C..a..t.e..g..o..r.y................................................................................................................ 105 Image Sup..p..o..r.t. .C...a..t.e..g..o..r.y................................................................................................................................... 106 Load and .S...a..v..e.. .C..a..t.e..g..o..r.y.. .-.. . .F..o..r.m...a..t.s..t.r.i.n..g..s....................................................................................................... 106 Mailmerge. .C...a..t.e..g..o..r.y.......................................................................................................................................... 110 Position M.a..r..k.e..r..s.. .C..a..t.e..g..o..r.y................................................................................................................................ 111 Lowlevel .P..a..r.a..g..r..a..p..h.. .ID...s.. .C..a..t.e..g..o..r.y.................................................................................................................... 112 Printing Ca..t.e..g..o..r..y.............................................................................................................................................. 112 Standard .E..d..i.t.in..g.. .C...o..m..m...a..n..d..s.. .C..a..t.e..g..o..r..y............................................................................................................. 113 Paragraph..s..t.y..l.e.. .S..u..p..p..o..r.t. .C...a..t.e..g..o..r.y.................................................................................................................... 113 Table Sup.p..o..r..t. .C..a..t.e..g..o..r.y.................................................................................................................................... 115 TextDyna.m..i.c.. .C..S...S.. .s..t.r.i.n..g..s.. .C..a..t.e..g..o..r..y................................................................................................................. 117 Tabstop C..a..t.e..g..o..r.y............................................................................................................................................. 118 IWPMemo / IW....P..E..d..i.t..o..r.. ......................................................................................................................................... 118 Properties......................................................................................................................................................... 120 Methods ......................................................................................................................................................... 129 2 IWPT.e..x..t.C...u..r.s.o..r.. .(.T..e..x..t. .c.r..e..a..t.i.o..n.. .a..n..d.. .c.u..r..s.o..r. .p..o..s..i.t.i.o..n..i.n..g..). ...................................................... 193 Properties .......................................................................................................................................................... 194 CPCellPtr......................................................................................................................................................... 194 CPLineNr......................................................................................................................................................... 194 CPObjPtr ......................................................................................................................................................... 195 CPPageLin..e..N...r.................................................................................................................................................. 195 CPPageNr......................................................................................................................................................... 195 CPParNr ......................................................................................................................................................... 195 CPParPtr ......................................................................................................................................................... 196 CPPosInLi.n..e...................................................................................................................................................... 196 CPPosInPa..r....................................................................................................................................................... 196 CPPosition......................................................................................................................................................... 196 CPRowPtr......................................................................................................................................................... 197 CPStylePt.r........................................................................................................................................................ 197 CPTableC.o..lN...r................................................................................................................................................... 197 CPTablePt.r........................................................................................................................................................ 197 II © 2006-2014 by WPCubed GmbH, Munich, Germany III TextDynamic - .NET and ActiveX document creation CPTableR.o..w...N..r................................................................................................................................................. 197 IsSelected......................................................................................................................................................... 198 PageCoun..t....................................................................................................................................................... 198 SelStart ......................................................................................................................................................... 198 SelLength......................................................................................................................................................... 198 Methods .......................................................................................................................................................... 198 IWPTextC.u..r.s..o..r...A...d..d..T..a..b..l.e................................................................................................................................. 198 IWPTextC.u..r.s..o..r...A...p..p..e..n..d..R..o..w.............................................................................................................................. 199 IWPTextC.u..r.s..o..r...C...h..e..c..k.S...t.a..t.e.............................................................................................................................. 200 IWPTextC.u..r.s..o..r...C...le..a..r........................................................................................................................................ 201 IWPTextC.u..r.s..o..r...C...o..m..b..i.n..e..C..e..l.l.H..o..r.z...................................................................................................................... 201 IWPTextC.u..r.s..o..r...C...o..m..b..i.n..e..C..e..l.l.V..e..r..t..................................................................................................................... 201 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..A...f.t.e..r..T..a..b..le................................................................................................................... 202 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..B...a..c..k........................................................................................................................... 202 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..B...e..f.o..r.e..T..a..b..l.e................................................................................................................ 202 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t........................................................................................................................... 202 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.B..a..n..d.................................................................................................................... 202 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.C..e..l.l..................................................................................................................... 203 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.G..r..o..u..p.................................................................................................................. 203 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.O..b..j.e..c..t................................................................................................................. 203 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.P..a..r...................................................................................................................... 203 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.R..o..w...................................................................................................................... 204 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..N...e..x..t.T..a..b..le.................................................................................................................... 205 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..a..r..e..n..t.T..a..b..le................................................................................................................. 205 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..r..e..v..C..e..l.l..................................................................................................................... 205 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..r..e..v..O..b..j.e..c..t................................................................................................................. 205 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..r..e..v..P..a..r...................................................................................................................... 205 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..r..e..v..R..o..w...................................................................................................................... 206 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..P..r..e..v..T..a..b..le.................................................................................................................... 206 IWPTextC.u..r.s..o..r...C...P..M..o..v..e..T..o..G...r.o..u..p...................................................................................................................... 206 IWPTextC.u..r.s..o..r...C...P..O..p..e..n..O...b..j............................................................................................................................. 206 IWPTextC.u..r.s..o..r...D...e..le..t.e....................................................................................................................................... 207 IWPTextC.u..r.s..o..r...D...is..a..b..l.e..P..r.o..t.e..c..t.i.o..n..................................................................................................................... 207 IWPTextC.u..r.s..o..r...D...is..a..b..l.e..U..n..d..o............................................................................................................................. 207 IWPTextC.u..r.s..o..r...E..n..a..b..l.e..d..P..r.o..t.e..c..t.i.o..n.................................................................................................................... 207 IWPTextC.u..r.s..o..r...E..n..a..b..l.e..U..n..d..o.............................................................................................................................. 207 IWPTextC.u..r.s..o..r...F..i.e..l.d..s..F..r.o..m...T..o..k.e..n..s.................................................................................................................... 208 IWPTextC.u..r.s..o..r...F..i.n..d..T..e..x..t.................................................................................................................................. 208 IWPTextC.u..r.s..o..r...G...e..t.P..a..r.N...a..m..e............................................................................................................................. 210 IWPTextC.u..r.s..o..r...G...o..t.o..B..o..d..y................................................................................................................................. 211 IWPTextC.u..r.s..o..r...G...o..t.o..E..n..d................................................................................................................................... 211 IWPTextC.u..r.s..o..r...G...o..t.o..S..t.a..r..t................................................................................................................................ 211 IWPTextC.u..r.s..o..r...H...id..e..S...e..le..c..t.i.o..n........................................................................................................................... 211 IWPTextC.u..r.s..o..r...I.n..p..u..t.B..o..o..k..m...a..r.k......................................................................................................................... 212 IWPTextC.u..r.s..o..r...I.n..p..u..t.C..a..l.c..u..l.a..t.e..d..F..ie..l.d................................................................................................................. 212 IWPTextC.u..r.s..o..r...I.n..p..u..t.C..e..l.l.................................................................................................................................. 212 IWPTextC.u..r.s..o..r...I.n..p..u..t.C..u..s..t.o..m...H..T..M...L.................................................................................................................... 213 IWPTextC.u..r.s..o..r...I.n..p..u..t.E..m...b..e..d..d..e..d..D..a..t.a................................................................................................................. 214 IWPTextC.u..r.s..o..r...I.n..p..u..t.F..i.e..ld.................................................................................................................................. 215 IWPTextC.u..r.s..o..r...I.n..p..u..t.F..i.e..ld..O...b..j.e..c..t...................................................................................................................... 215 IWPTextC.u..r.s..o..r...I.n..p..u..t.F..o..o..t.e..r.............................................................................................................................. 216 IWPTextC.u..r.s..o..r...I.n..p..u..t.F..o..o..t.n..o..t.e........................................................................................................................... 217 IWPTextC.u..r.s..o..r...I.n..p..u..t.H..e..a..d..e..r............................................................................................................................. 218 IWPTextC.u..r.s..o..r...I.n..p..u..t.H..T..M...L................................................................................................................................ 218 IWPTextC.u..r.s..o..r...I.n..p..u..t.H..y..p..e..r..li.n..k.......................................................................................................................... 218 IWPTextC.u..r.s..o..r...I.n..p..u..t.I.m..a..g..e................................................................................................................................ 219 IWPTextC.u..r.s..o..r...I.n..p..u..t.P..i.c..t.u..r.e.............................................................................................................................. 219 IWPTextC.u..r.s..o..r...I.n..p..u..t.P..i.c..t.u..r.e..S..t.r..e..a..m................................................................................................................... 220 © 2006-2014 by WPCubed GmbH, Munich, Germany Contents IV IWPTextC.u..r.s..o..r...I.n..p..u..t.O...b..je..c..t.............................................................................................................................. 221 IWPTextC.u..r.s..o..r...I.n..p..u..t.C..o..d..e................................................................................................................................. 223 IWPTextC.u..r.s..o..r...I.n..p..u..t.P..a..g..e..b..r.e..a..k........................................................................................................................ 223 IWPTextC.u..r.s..o..r...I.n..p..u..t.P..a..r.a..g..r..a..p..h........................................................................................................................ 224 IWPTextC.u..r.s..o..r...I.n..p..u..t.R..o..w....E..n..d........................................................................................................................... 224 IWPTextC.u..r.s..o..r...I.n..p..u..t.R..o..w....S..t.a..r.t......................................................................................................................... 225 IWPTextC.u..r.s..o..r...I.n..p..u..t.S..e..c..t.i.o..n............................................................................................................................. 226 IWPTextC.u..r.s..o..r...I.n..p..u..t.S..t.r..in..g................................................................................................................................ 227 IWPTextC.u..r.s..o..r...I.n..p..u..t.T..a..b..l.e................................................................................................................................ 228 IWPTextC.u..r.s..o..r...I.n..p..u..t.T..a..b..s..t.o..p............................................................................................................................ 229 IWPTextC.u..r.s..o..r...I.n..p..u..t.T..e..x..t.b..o..x............................................................................................................................ 230 IWPTextC.u..r.s..o..r...I.n..p..u..t.T..e..x..t................................................................................................................................. 232 IWPTextC.u..r.s..o..r...I.n..s..e..r.t.R...o..w................................................................................................................................. 232 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.C...o..ll.e..c..t.......................................................................................................................... 233 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.C...o..ll.e..c..t.A...ll...................................................................................................................... 233 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.C...P..P..o..s..it.i.o..n..................................................................................................................... 233 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.D...r.o..p.............................................................................................................................. 234 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.G...o..t.o.............................................................................................................................. 234 IWPTextC.u..r.s..o..r...M...a..r.k..e..r.S...e..le..c..t........................................................................................................................... 234 IWPTextC.u..r.s..o..r...M...o..v..e..P..o..s..i.t.io..n............................................................................................................................ 234 IWPTextC.u..r.s..o..r...M...o..v..e..T..o..B..o..o..k..m...a..r.k.................................................................................................................... 235 IWPTextC.u..r.s..o..r...M...o..v..e..T..o..F..i.e..ld............................................................................................................................. 235 IWPTextC.u..r.s..o..r...M...o..v..e..T..o..O...b..je..c..t......................................................................................................................... 236 IWPTextC.u..r.s..o..r...M...o..v..e..T..o..T..a..b..l.e........................................................................................................................... 236 IWPTextC.u..r.s..o..r...R...e..d..o........................................................................................................................................ 237 IWPTextC.u..r.s..o..r...R...e..p..la..c..e..T..e..x..t............................................................................................................................ 237 IWPTextC.u..r.s..o..r...R...e..p..o..r.t.C..o..n..v..e..r..t.T..a..b..le................................................................................................................. 238 IWPTextC.u..r.s..o..r...R...e..p..o..r.t.C..o..n..v..e..r..t.T..e..x..t................................................................................................................. 238 IWPTextC.u..r.s..o..r...R...e..p..o..r.t.I.n..p..u..t.B..a..n..d...................................................................................................................... 238 IWPTextC.u..r.s..o..r...R...e..p..o..r.t.I.n..p..u..t.G..r..o..u..p.................................................................................................................... 239 IWPTextC.u..r.s..o..r...S...c..r.o..l.lT..o..C...P............................................................................................................................... 239 IWPTextC.u..r.s..o..r...S...e..le..c..t.A...l.l................................................................................................................................. 239 IWPTextC.u..r.s..o..r...S...e..le..c..t.L..i.n..e................................................................................................................................ 239 IWPTextC.u..r.s..o..r...S...e..le..c..t.P..a..r..a..g..r.a..p..h...................................................................................................................... 240 IWPTextC.u..r.s..o..r...S...e..le..c..t.T..a..b..l.e.............................................................................................................................. 240 IWPTextC.u..r.s..o..r...S...e..le..c..t.T..a..b..l.e..C..o..l.u..m...n.................................................................................................................. 240 IWPTextC.u..r.s..o..r...S...e..le..c..t.T..a..b..l.e..R..o..w........................................................................................................................ 240 IWPTextC.u..r.s..o..r...S...e..le..c..t.T..e..x..t............................................................................................................................... 241 IWPTextC.u..r.s..o..r...S...e..t.C..o..l.W...i.d..t.h............................................................................................................................. 241 IWPTextC.u..r.s..o..r...S...e..t.P..a..r.N..a..m...e............................................................................................................................. 241 IWPTextC.u..r.s..o..r...S...e..t.R..o..w...H...e..ig..h..t......................................................................................................................... 242 IWPTextC.u..r.s..o..r...S...e..t.T..a..b..le..L..e..f..t.R..i.g..h..t................................................................................................................... 242 IWPTextC.u..r.s..o..r...T..a..b..l.e..C..l.e..a..r............................................................................................................................... 243 IWPTextC.u..r.s..o..r...T..a..b..l.e..D..e..l.e..t.e.............................................................................................................................. 243 IWPTextC.u..r.s..o..r...U...n..d..o........................................................................................................................................ 243 IWPTextC.u..r.s..o..r...U...n..d..o..C..l.e..a..r............................................................................................................................... 244 IWPTextC.u..r.s..o..r...W....o..r.d..C..h..a..r..A..t.t.r.......................................................................................................................... 244 IWPTextC.u..r.s..o..r...W....o..r.d..E..n..u..m................................................................................................................................ 244 IWPTextC.u..r.s..o..r...W....o..r.d..H..i.g..h..l.ig..h..t.......................................................................................................................... 245 IWPTextC.u..r.s..o..r...S...e..t.C..o..l.u..m..n..s.............................................................................................................................. 246 IWPTextC.u..r.s..o..r...S...e..le..c..t.C...e..ll................................................................................................................................ 246 IWPTextC.u..r.s..o..r...E..n..u..m...O...p..e..n..O..b..j......................................................................................................................... 247 IWPTextC.u..r.s..o..r...E..x..i.t.T..a..b..l.e.................................................................................................................................. 247 IWPTextC.u..r.s..o..r...T..a..b..l.e..S..p..l.i.t................................................................................................................................ 248 IWPTextC.u..r.s..o..r...T..a..b..l.e..S..o..r..t................................................................................................................................ 248 IWPTextC.u..r.s..o..r...A...S..e..t.C...e..ll.P..r.o..p............................................................................................................................ 249 IWPTextC.u..r.s..o..r...A...S..e..t.C...e..ll.S..t.y..l.e........................................................................................................................... 250 IWPTextC.u..r.s..o..r...M...e..r.g..e..C...e..ll.H..o..r..z......................................................................................................................... 251 IV © 2006-2014 by WPCubed GmbH, Munich, Germany V TextDynamic - .NET and ActiveX document creation IWPTextC.u..r.s..o..r...M...e..r.g..e..C...e..ll.V...e..r.t......................................................................................................................... 251 IWPTextC.u..r.s..o..r...C...le..a..r..A..l.l.H..e..a..d..e..r.s....................................................................................................................... 251 IWPTextC.u..r.s..o..r...C...le..a..r..A..l.l.F..o..o..t.e..r.s........................................................................................................................ 252 Example: Con...v..e..r..t. .t.o... .H..T..M....L.. ................................................................................................................................ 252 3 TextD..y..n..a..m...i.c.. .a..s. ."..P..o..p..u..p..". .o..r.. .e..m...b..e..d..d..e..d.. .e..d..i.t.o..r. .(.m...e..t.h..o..d.. .w...p..t.e..x..t.C..r.e..a..t.e..D..i.a..l.o..g..). ................... 253 Initialization .o..f. .t..h..e.. .e...d..i.t.o...r. .i.n... .C..+..+.. ....................................................................................................................... 253 Use WPA Act.i.o...n..s.. .w....i.t.h.. .E..d...i.t.o..r.. ............................................................................................................................ 255 Use Comman...d..s.. ................................................................................................................................................... 256 Use the COM.. .I.n..t.e...r.f..a..c..e..s.. ..................................................................................................................................... 257 Examples .......................................................................................................................................................... 257 Pascal Defini.t.i.o...n.. .................................................................................................................................................. 259 C / C++ Heade...r.f..i.l.e.. ................................................................................................................................................ 265 4 Text .A..t.t.r.i.b..u..t.e..s.. .(.a..c..c.e..s..s. .a..n..d.. .m...o..d..i.f.y..). ................................................................................... 271 IWPAttrInterf..a..c..e.. .................................................................................................................................................. 271 Properties......................................................................................................................................................... 274 Methods ......................................................................................................................................................... 275 IWPCharacte.r..A..t..t.r.. ................................................................................................................................................ 288 Properties......................................................................................................................................................... 289 Methods ......................................................................................................................................................... 292 5 Text .E..l.e..m...e..n..t.s. .(.p..a..r..a..g..r.a..p..h..s.,. .o..b..j.e..c..t.s..,. .s.t.y..l.e..s.). ....................................................................... 292 IWPParInterf.a..c..e.. ................................................................................................................................................... 293 Properties......................................................................................................................................................... 295 Methods t.o.. .m...a..n..a..g..e.. .a..t.t.r.i.b..u..t.e..s.......................................................................................................................... 305 Methods t.o.. .m...a..n..a..g..e.. .t.a..b.. .s..t.o..p..s.......................................................................................................................... 311 Methods t.o.. .m...a..n..a..g..e.. .t.e..x..t. .a..n..d.. .im...a..g..e..s................................................................................................................ 314 Methods t.o.. .m...a..n..a..g..e.. .t.h..e.. .p..a..r.a..g..r.a..p..h.. .L..i.s..t........................................................................................................... 320 Other met.h..o..d..s.................................................................................................................................................. 327 IWPDataBlock.. ........................................................................................................................................................ 334 Properties......................................................................................................................................................... 335 Methods ......................................................................................................................................................... 339 IWPTextObj .......................................................................................................................................................... 341 Properties......................................................................................................................................................... 341 Methods ......................................................................................................................................................... 346 IWPNumberS..t.y..l.e.. .................................................................................................................................................. 354 Properties......................................................................................................................................................... 355 Methods ......................................................................................................................................................... 358 6 Docu.m...e..n..t. .P..r.o..p..e..r..t.i.e..s. .(.p..a..g..e.. .s..i.z.e..,. .l.a..b..e..l.s..). ........................................................................... 359 IWPPageSize. ......................................................................................................................................................... 359 Properties......................................................................................................................................................... 360 Methods ......................................................................................................................................................... 362 IWPPageSize.L...i.s..t. .................................................................................................................................................. 363 Properties......................................................................................................................................................... 364 Methods ......................................................................................................................................................... 365 IWPPrintPara.m....e..t..e..r.. ............................................................................................................................................. 366 Properties......................................................................................................................................................... 366 Methods ......................................................................................................................................................... 368 IWPMeasure.P..a..g...e..P..a..r..a..m.... .................................................................................................................................... 369 Properties......................................................................................................................................................... 369 7 GUI Pro..p..e..r.t.i.e..s. ....................................................................................................................... 0 8 Mailm...e..r.g..e.. ......................................................................................................................... 371 Create Merg.e.. .F..i.e...l.d..s.. ........................................................................................................................................... 372 Insert Data .......................................................................................................................................................... 373 Use even.t. .M..S... .A..c..c..e..s..s...................................................................................................................................... 374 If Interfac.e.. .c..a..n..n..o..t. .b..e.. .u..s..e..d.............................................................................................................................. 374 Highlight/Hid.e..F..i.e..l.d...s.. ............................................................................................................................................ 374 Append to Ed..i.t..o..r.. .#..2.. ............................................................................................................................................ 375 © 2006-2014 by WPCubed GmbH, Munich, Germany Contents VI Create Mailin..g.. .L...a..b..e..l.s... ........................................................................................................................................ 375 C# Code ......................................................................................................................................................... 377 VB Code......................................................................................................................................................... 378 Resulting .L..a..b..e..l. .S..h..e..e..t...................................................................................................................................... 379 interface IWP..F..i.e..l.d...C..o...n..t.e...n..t.s... .............................................................................................................................. 379 Properties......................................................................................................................................................... 380 Methods ......................................................................................................................................................... 382 9 Repo.r.t.i.n..g.. ........................................................................................................................... 387 Introduction .......................................................................................................................................................... 388 Compariso..n.. .t.o.. ."..u..s..u..a..l".. .r.e..p..o..r.t.i.n..g....................................................................................................................... 389 Example ......................................................................................................................................................... 390 Token to Tem....p..l.a..t.e... .C..o...n..v..e..r..s..i.o...n.. ....................................................................................................................... 390 General S.y..n..t.a..x.. .-.. .F..ie..l.d..s.................................................................................................................................... 391 Bands ......................................................................................................................................................... 392 Groups ......................................................................................................................................................... 392 Parameter..s.. .f.o..r. .F..i.e..l.d..s....................................................................................................................................... 393 Parameter..s.. .f.o..r. .B...a..n..d..s.. .a..n..d.. .G..r..o..u..p..s.................................................................................................................. 393 Example T..e..m..p..l.a..t.e............................................................................................................................................. 394 Event driven. .r.e...p..o..r..t.i.n...g.. ....................................................................................................................................... 396 VS2008 Repo.r..t.i.n...g.. .D..e...m...o... .................................................................................................................................... 397 Basis ......................................................................................................................................................... 397 File Menu......................................................................................................................................................... 402 Use cond.it.i.o..n..s.. .f.o..r.. .b..a..n..d..s................................................................................................................................. 403 View Men..u.. .-. .(.H...id..e../.S...h..o..w...T..e..m...p..la..t.e..)................................................................................................................. 403 RTF2PDF - Re.p...o..r..t.i.n..g... . .C..#.. .S...a..m...p...l.e.. ...................................................................................................................... 404 DB-Descriptio...n.. .a..n..d... .T..e..m....p..l.a..t..e.. .a..r..c..h..i.t.e...c..t.u..r..e.. .................................................................................................... 405 MS Access E.x..a..m....p..l.e... ........................................................................................................................................... 406 MS Acces..s.. .c..o..d..e.............................................................................................................................................. 406 DAO Exam...p..le.. .t.o.. .c..r..e..a..t.e.. .D..B..-..D..e..s..c..r.i.p..t.i.o..n........................................................................................................... 408 API .......................................................................................................................................................... 411 IWPRepor.t........................................................................................................................................................ 411 IWPRepor.t.B..a..n..d................................................................................................................................................. 427 IWPRepor.t.V...a..r.................................................................................................................................................. 436 10 Spellch.e..c..k.. ............................................................................................................................ 0 11 PDF C...r.e..a..t.i.o..n..,. .E..m...a..i.l. .......................................................................................................... 440 IWPPdfCreat.o..r.. ..................................................................................................................................................... 440 Properties......................................................................................................................................................... 440 Methods ......................................................................................................................................................... 444 12 Helpe..r.s.. .............................................................................................................................. 447 IWPTextWrite..r.. ...................................................................................................................................................... 447 Properties......................................................................................................................................................... 447 Methods ......................................................................................................................................................... 447 IWPPicture .......................................................................................................................................................... 448 IWPStream - .S...t.r..e..a..m....2..W...P..S...t.r..e..a..m.... ...................................................................................................................... 448 13 WPA.T.._.c..o..d..e..s.. ..................................................................................................................... 449 Character At.t.r..i.b..u...t.e..s... .......................................................................................................................................... 450 Predefined C..o..l.o...r. .I.n...d..e..x.. .V...a..l.u..e...s.. ........................................................................................................................ 451 Paragraph At..t.r..i.b..u..t..e..s.. .......................................................................................................................................... 451 Numbering A..t.t..r.i.b...u..t.e...s.. ........................................................................................................................................ 452 Border Attrib..u..t..e..s.. ................................................................................................................................................ 454 Table Size an..d.. .P...o..s..i.t..i.o..n.. ...................................................................................................................................... 455 Part V Tasks (Problems and their Solution) 456 1 RTF2.P..D..F.. .i.n.. .A...S..P....N..E..T.. ......................................................................................................... 456 2 ASP ...N..E..T.. .T..r.o..u..b..l.e..s..h..o..o..t.i.n..g.. ................................................................................................ 457 VI © 2006-2014 by WPCubed GmbH, Munich, Germany VII TextDynamic - .NET and ActiveX document creation 3 ASP .T..r.a..n..s.f.e..r..H..e..l.p..e..r. .(.R..T..F..2..P..D...F..). ......................................................................................... 458 4 Load. .&.. .S..a..v..e.. ...................................................................................................................... 462 5 Creat.e.. .T..e..x..t. .u..s..i.n..g.. .c..o..d..e.. ..................................................................................................... 463 6 Creat.e.. .a.. .p..a..g..e.. .h..e..a..d..e..r.. .w..i.t.h.. .p..a..g..e.. .n..u..m...b..e..r..s. ........................................................................ 465 7 Exam..p..l.e..:. .F..o..r.m...a..t. .C..#.. .C..o..d..e.. ................................................................................................. 465 8 HTML../.E..-.M...A..I.L.. .l.o..a..d..i.n..g.. .a..n..d.. .s.a..v..i.n..g.. ...................................................................................... 466 Technical Inf.o..r..m....a..t.i.o..n... ........................................................................................................................................ 466 Create HTML.. ........................................................................................................................................................ 467 Format Optio..n..s.. .................................................................................................................................................... 467 Create and s.e...n..d.. .E..m....a..i.l.s.. ..................................................................................................................................... 469 Create MIME. .e..n...c..o..d..e...d.. .e..-..m...a..i.l. .d...a..t.a.. ................................................................................................................... 470 9 Use T..e..x..t.D..y..n..a..m...i.c. .i.n.. .C...+..+.. .(.V..S..2..0..0.8..). ..................................................................................... 472 10 The b..o..r.d..e..r. .d..i.a..l.o..g.. .............................................................................................................. 472 11 Mailm...e..r.g..e.. .(.d..o..c..u..m...e..n..t. .v.a..r..i.a..b..l.e..s.). ....................................................................................... 473 Part VI TextDynamic Release Notes 473 Part VII RTF2PDF Release Notes 487 Part VIII Info: WPViewPDF - View, merge and split PDF files 492 Index 0 © 2006-2014 by WPCubed GmbH, Munich, Germany Welcome to RTF2PDF / TextDynamic Server 1 1 Welcome to RTF2PDF / TextDynamic Server Welcome to wRTF2PDF. This is not just a tool to convert RTF to PDF or HTML to PDF, it also includes a full featured, completely self contained word processing engine to create formatted text in code. RTF2PDF V4 is available now. It is based on the word processing engine WPTools 7 and the PDF creation tool wPDF 4. You can use this component to create documents and invoices on a web server and save the result as RTF, HTML or PDF file. Since it offers a very similar programming API as the word processing control TextDynamic it is also known as "TextDynamic Server". The integrated word processing engine supports: Supports multiple character attributes (fonts, font sizes, colors, styles and colors) Paragraph attributes (indents, spacing, alignment, justified text) Tabstops (left, right, decimal, centered and fill signs) Paragraph styles with CSS support Tables, nested tables, row merge, column merge Footnotes Textboxes Columns Headers and Footers Images (BMP, JPEG, EMF, PNG), linked and embedded, also with wrap text on both sides! Hyperlinks and nestable bookmarks powerful mail merge The integrated PDF engine supports Compression Encryption create PDF/A compliant files (I automatically adds meta tags to distinguish informative text from layout elements) embed fonts + subset fonts convert embedded EMF to PDF vectors With the "server" license You can export pages from multiple documents into one multipage TIFF file. In case your development system does not support COM, You can use the rich text to PDF conversion also using some simple to use methods exported by the DLL. Product Page Product Page API Reference Support forum RTF2PDF PDFControl Technical Note: The component wRTF2PDF is based on our word processing component TextDynamic plus the PDF engine wPDFControl. It does everything what wPDFControl and much of what TextDynamic does. It has been optimized to work on a server, or webserver. It does not print but it can produce PDF and other file formats fast and effectively. It can also export documents page by page as metafile. Please see our demo ASP web server http://178.77.68.45/. We recommend to program with RTF2PDF similar to TextDynamic - but as an invisible, server control. Using the interface IWPEditor you have access to powerful and effective means to create text or tables in code. © 2006-2014 by WPCubed GmbH, Munich, Germany 2 TextDynamic - .NET and ActiveX document creation While TextDynamic is a visual tool, RTF2PDF has been optimized to work in the background. It can be easily used with ASP or ASP.NET to create HTML or PDF response output. Since the API is so similar to the API of TextDynamic you can use almost the same code in your ASP page as you used for your desktop application. Due to its nature it does not offer any GUI elements and does not implement the wpa actions used by TextDynamic. Instead of the interface IWPMemo which is implemented by TextDynamic; RTF2PDF implements the interface IWPEditor. It contains a subset of the IWPMemo methods and properties. The RTF2PDF ActiveX interface can be used very similar to the .NET Interface. We included some simple VB / VBS examples here... Example to create the text "Hello World" in ASP.NET (language C#): RTF2PDF pdf = New RTF2PDF(); // The main editor interface: load & save WPDynamic.IWPEditor Memo = pdf.Memo; // Modify the current writing attribute WPDynamic.IWPAttrInterface CurrAttr = Memo.CurrAttr; // TextCusror contains methods to insert paragraphs, tables, text, images, fields, header and footer etc. WPDynamic.IWPTextCursor TextCursor = Memo.TextCursor; // Clear the text Memo.Clear(); // Set the current font CurrAttr.SetFontface("Verdana"); CurrAttr.SetFontSize(10); // Create some text TextCursor.InputString("Hello World\r ",0); Only the first two lines would be different when using TextDynamic. There you probably use a control dropped on the form (the default name is wpdllint1) and the interface name IWPMemo instead of IWPEditor! The export to PDF as ASP Result can be done like this. No temporary file will be written! (Requires "Internet Server" License) IWPPDFCreator PdfCreator = pdf.PdfCreator; // reformat the text when we have completely created it Memo.ReformatAll(false,false); // Set PDF properties. Note that the interface IWPPDFCreator is being used PdfCreator.PDFFile = "memory"; // We want to use "ResultBuffer" PdfCreator.FontMode = 0; // i.e. embed all fonts pdf.Print(); // remove any output Response.Clear(); // Add new header Response.ContentType = "application/pdf"; Response.AddHeader("Content-Type", "application/pdf"); // Set a file name which is displayed when download starts Response.AddHeader("Content-Disposition","inline;filename=PortableDocument.pdf"); // Write the PDF data Response.Clear(); Response.BinaryWrite(pdf.ResultBuffer); © 2006-2014 by WPCubed GmbH, Munich, Germany
Description: