Show Merged document on website

  • I have a fairly mature wptools 4 merge application, with a large number of templates and data records. The objective is to use the existing D7 code to display formatted output on a website. I want a single code base.

    At this point, I have wrapped my D7 merge application in an ISAPI DLL which returns a merged rtf string. I can call this from a browser and get back text. My problem is that some of the formatting is being lost. I seem to recall that wp4 uses some non-standard rtf, so maybe that is the issue. The templates use tables pretty heavily.

    I notice there is a printToCanvas method that produces a bitmap. Maybe that could be an answer -- assuming I can make the ISAPI return a bmp.

    Any suggestions?

  • As we used to say when I worked on a land survey crew for the government ... "We may be slow, but we're sure not very accurate". But I think I'm finally beginning to see how to get merged rtf into a form that a website can display. After the merge, it would appear that I want to save the document with textSaveFormat of HTML to a stream, then read it into another doc, and then finally I can use the text property.

    Or am I still out in the ether somewhere??

    Jeremy

    • Offizieller Beitrag

    Hi,

    If you want to display the text on a web site you need HTML.

    WPTools 4 can create HTML in 2 different ways, with and without style sheets.

    Which is better really depends on the website itself.

    USe the propertyes TextSaveFormat to select the writer class. You can look up what the writer does in unit WPWriteHT.PAS.

    I assume you need to add some mods to make the code match the existing website code - for example add style references.

    Julian