Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining text from two RICH text textboxes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00389346
Message ID:
00415292
Vues:
22
>In concatenating 2 rtf text files I found that the junction contained the termination of the first, plus CRLF + the start of the second. I just invoked the following to surgically remove it:
>
>*- We've concatenated separate rtf strings.
>*- Need to remove middle brackets to define the
>*- entire document text as a single rtf string.
>lcReplaceString = "}"+chr(13)+chr(10)+"{\rtf1"
>lcDocumentString = StrTran( lcDocumentString, lcReplaceString, "" )
>
>This leaves just the starting marker at the head of the entire string and the ending marker at the end. Works like a charm.
>
>Now, can you return the favor? How do I print rich text to the printer in VFP? I'm trying to use the rtf.SelPrint method, but I can't get it to work.

Jeff,

to be honest I started with MS-Word and it 'worked' with normal ascii. The problems I had with MS-Word was that it was too slow and too unreliable and that it would not accept RTF.
In a quest to solve this problem I came across an ad in the FoxAdvisor for a print engine called: Virtual Print Engine created by Idealsoftware (www.idealsoftware.com). The great thing about this package is that it accepts 'streaming' RTF. This means I can send it RTF+RTF+RTF without any conversions and the engine will deal with it. This tool really saved my applications and I am now using it as a reporting tool for all of my apps.
It took a while to create a decent wrapper-class to write to the engine but at this point I have given up on the VFP report engine and MS-Word and I'm using it for all my apps.

I could send you some examples of what I do but I think it is best that you take a closer look into VPE.

Regards,

Ron Brahma
unreliable.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform