RTF or WPT format

  • Hi,

    I can see the advantage of RTF for compatability but internally in a program e.g. saving text to and loading text from a database is there an advantage in using WPT file format.

    Regards,

    Geoff

    • Offizieller Beitrag

    Hi,

    in general I would recommend the RTF format, it preserves most attributes, is not bloated and a standard.

    WPT format has a large advantage when dealing with styles. The style format in RTF is not consistent since RTF always tries to stay backwards compatible. The numbering in RTF is also cumbersome and causes trouble. WPT also has a tables support comparable to HTML which is a cleaner and easier than RTF.

    But for general use, RTF.

    If you have a problem however saving as WPT will show whyt styles and attributes are defined - thats nice for debugging.

    Regards,
    Julian

  • Slightly strange advice since I understood that WPTools converted to WPT from RTF to work with the document and back again if saved in RTF format.

    So doesn't it make more sense if the document is ONLY going to be processed by WPTools to use WPT and only convert when it gets set free in the big outside world?

    • Offizieller Beitrag

    Hi,

    Zitat

    So doesn't it make more sense if the document is ONLY going to be processed by WPTools to use WPT and only convert when it gets set free in the big outside world?

    WPTools/TextDynamic internally works with a paragraph tree which is directly mirrored in the WPT format - thats right. When loading RTF that is translated into those data structures. When loading HTML also a translation takes place while here the document is simplified (any paragraph nesting is removed) to make export in RTF format possible. So, currently, there are usually no cases where a document cannot be facefully reproduced in RTF format - this may change in future with a different (optional!) formatting mode, but currently it is that way. That formatting mode is planned for "web site" layout.

    But, as I said, the RTF format has weaknesses when dealing with styles - if those are important, the WPT format has the big advantage of support for undefined attributes. With WPTools there comed the "global style" demo, that uses the WPT format.

    When asked, I usually take into consideration what I also know from the asker/the project - in this case it is about an application for doctors and so I expect a rather conservative text input. So my suggestion according to RTF. For a project which generates a manual from several text blocks I would recommend WPT since here the application of a global style sheet makes a lot of sense.

    In any case - when using LoadFromStream(... "AUTO") the engine will detect the input format so it will work with either setting.

    Regards,

    Julian Ziersch