Application differences between WPTools6 and TextDynamic

  • I'm trying to understand the detailed coding differences we'll need to implement if we convert our apps from delphi to C# and use TextDynamic instead of WPTools6.

    We do merging and printing, which means we have a large number of templates that we need to continue to work without modification after the conversion. The templates are not data-aware, the replacement variables are populated assigning a custom procedure to rtfTemplate.OnMailMergeGetText:

    rtfTemplate.OnMailMergeGetText := rtfTemplateMailMergeGetText;

    The merge uses TWPCustomRichText.MergeText(). You've said that TextDynamic works differently, but do you have any documentation on how we'll need to change the way we do things?

    • Offizieller Beitrag

    The documentation on TextDynamic is quite extensive:


    The equivalence of

    WPRichText1.Mergetext is TextDynamic.Memo.MergeText

    It will trigger the event OnFieldGetText which receives the object

    Contents As WPToolsInt.IWPFieldContents

    IWPFieldContents contains the property StringValue but also some helper methods like LoadImage and InputHyperlink.

    So mail merge will work very much alike with WPTools. https://www.wpcubed.com/manuals/.NET_w…t/mailmerge.htm

    Whts a lot fifferent is the paragraph handling. With TextDynamic you can access the current paragraph but you cannot simply create a loop with all paragraphs, a API feature which is exceptionally strong and useful with WPTools.

    But using the IWPParInterface you have access to the current paragraph so you can modify and read attributes. You can use cursor methods to move the current position. Alternatively you can also use the GetPtr, SetPtr method to set the paragraph the IWPParInterface is working with.

  • Looks good. Digging deeper, our OnMailMergeGetText uses RTTI to get values of published properties (and avoid having a giant case statement). I suspect the same thing can be done with reflection in C#. Do you have an example, or a hint on where to start? I didn't immediately find one in the textDynamic manual.

  • I'm trying to figure out pricing. To do the merging, it looks like I want the premium package. In addition to that, we need to support printing of individual items to pdf from our website. That is, the item is merged by the webserver, then saved to a pdf and presented to the user. One webserver only, and one or two urls. Is PDF Creation sufficient, or do I need wPDFControl4?

    • Offizieller Beitrag
    Zitat von Jeremy

    Looks good. Digging deeper, our OnMailMergeGetText uses RTTI to get values of published properties (and avoid having a giant case statement). I suspect the same thing can be done with reflection in C#. Do you have an example, or a hint on where to start? I didn't immediately find one in the textDynamic manual.


    No, I don't have an example for this C# specific matter. I guess there is one on stackoverflow.

    • Offizieller Beitrag
    Zitat von Jeremy

    I'm trying to figure out pricing. To do the merging, it looks like I want the premium package. In addition to that, we need to support printing of individual items to pdf from our website. That is, the item is merged by the webserver, then saved to a pdf and presented to the user. One webserver only, and one or two urls. Is PDF Creation sufficient, or do I need wPDFControl4?


    To work on a webserver you actually need RTF2PDF/TextDynamicServer V4 (new) with the optional Internet License. The basis component has the premium and PDF and also DOCX import/export included.

    TextDynamic will not make a webserver happy since it is a windowed control and requires a window handle to work. RTF2PDF/TextDynamicServer has basically the same programming interface as TextDynamic but does not display an editor of course. Only the IWPMemo is called IWPEditor with the "server" component and the namespace is wPDF instead of WPDynamic:

  • Now I'm confused about pdf products.

    1. We have some delphi windows apps that use wptools6 to merge and print letters. We'll convert Delphi to C#, and use textDynamic (premium).
    2. Currently, we wrap the windows Delphi code into an isapi dll. That uses the same merging code to produce a TWPCustomRichText document, which is processed by TWPPDFExport into a pdf file. In asp.net, I'm guessing it would be simpler to make a C# dll assembly instead of an isapi dll, right? And wouldn't PDF Creation, plus Server License be sufficient for this? Here's how we do it now.

    • Offizieller Beitrag
    Zitat

    And wouldn't PDF Creation, plus Server License be sufficient for this? Here's how we do it now.


    Yes, it would. But then you do not use TextDynamic at all - neither the editor nor the "Server". Of course it is possible (and quite easy to do) to load a DLL written in Delphi in C#.

    With TextDynamic you get a product which already has the interfaces implemented and there is a C# wrapper which calls it.

  • Zitat von wpsupport

    We're eliminating Delphi and converting the merge code to C#. Just to be clear, we have both windows apps and a website. Both use wptools for merging. The windows apps print to paper, and the website produces pdfs instead. It sounds like you're saying I don't need textDynamic to do this, which greatly puzzles me.

  • I'm still confused about products. The manual says that wRTF2PDF includes textDynamic functionality, and can be used in client applications as well as asp.net apps, and that's what I want. On the "Buy" page I selected wRTF2PDF, then noticed that there's also a server license option. The base product is called "server", so I don't get why I need to buy this option. And then when I do "Checkout", I'm offered discounts on several products, including textDynamic basis. Aren't all the basis functions included in wRTF2PDF? I can't buy anything until my questions are cleared up.

    • Offizieller Beitrag

    Hi,

    "The manual says that wRTF2PDF includes textDynamic functionality, and can be used in client applications as well as asp.net apps, and that's what I want."

    That's true, but for ASP the server license is required. It is basically the same product. Its similar to wPDF, there also the internet license is an option. Other companies charge per installation, IP, user etc - we charge for the license to use on an internet server and only once per version.

    wRTF2PDF includes the TextDynamic engine, but is not visual is the visual word processing control without PDF export, without the premium addon and without DocX support. TextDynamic would not work very good in a server environment.

    Here the wRTF2PDF product is running: http://178.77.68.45//

    There are two installations, 32bit and 64 bit. Both are controlled by ASP C# code.

    I am sorry about the confusion, but wRTF2PDF has been there before there was TextDynamic. At start it had only a simple DLL interface, now it has almost all the API TextDynamic has. This is why it is now called wRTF2PDF / TextDynamic Server. But the old API is still there.

  • Thanks for sticking with me through all this. Here's what I've come up with.


      * TextDynamic Basis
      * TD-Premium-Addon
      * TD-ServerLicense-Addon
      * wRTF2PDF 3 Standard
      * Addon: wPDF/-Control Internet License

    Have I made the right choices?