Pb with picture and html

  • Hi,

    I have WPTOOLS 5 ( i do the upgrate of the WPTOOLS 4 ).

    In wptools 4 i insert graph text in a document RTF. I transform the document in HTML file and i mail with a smtp server. In wptools 4 when the composant save, i have the line :
    <IMG SRC='C:\temp\pic.bmp'...>

    I transfer the picture pic.bmp in my server and the line was transform for the link http :
    <IMG SRC='http://i-tecks.com......>

    And finally i mail the html file with my smtp server.

    BUT I HAVE A VERY BIG PROBLEM

    When i update the wptools 4 in wptools 5, the document save do not write the line <IMG SRC......> in my html file.

    I don't know how i do ? Please help me !!! I have updated but my program do not work and my boss is green ( he buy the update but the program don't work).

    Please Julian Help me.

    Thanks a lot....

    • Offizieller Beitrag

    Hi,

    WPTools 5 does not save the images yet when it creates the HTML file.

    It writes the URL if it knows it:

    saee this code in unit WPIOHTML:

    Code
    if txtobj.ObjType = wpobjImage then
      begin
         // Before WRITE HTML Images
        if txtobj.Source <> '' then
        begin
          WriteString('<img src="');
          WriteString(txtobj.Source);


    For a quick fix you can insert some code to save the image to a temporary file in the case Source = '' (which is usually the case for pictures loaded from RTF)

    I have not yet included any 'CreateHTMLImages' code since in V4 the concept was not what many expected.

    So I am open for suggestions here.

    The easist would be an event which is triggered before the image is saved.

    Julian

  • I also need to be able to create email-messages with embedded graphics. Currently i use a very basic editor and a HTMLView component with a modified GetGraphics function that looks for 'CID:Globe.bmp' inside the tag. I need this to possibly load graphics from the resource of the program.

    <a href="mailto:newsletter@equal-financial.com">
    <img src="cid:EFAdresse" height="83" width="283" border="0" />
    </a>

    (I'm using this in combination with an Extended Mapi library to be able to connect to MSExchange directly. :lol: )


    Can we view a WP5Tools document in HTML-code modus and in preview mode?