Embedded Images in HTML (cid), Not saved to file

  • Hi Everyone,

    I am evaluating TextDynamic .NET ("TDN") for use in my commercial application. One of the features that excited me was the ability to save an HTML file with embedded (cid) images. I created a simple application, inserted formatted text and an image, saved it in HTML format. A file was created, but when I opened it in Internet Explorer, only the formatted text was there. I looked at the HTML, and there are no <img> tags… I changed the file format to “html-alwaysembed”, and the output file still did not have any images. The textual output is perfect, including active links. I’ve tried saving to an .rtf file, and only the text was saved… I have tried copying text and images from a webpage and pasting them into the control. The text is perfect, but no images in the .html file. I have tried typing text, inserting an image using your dialog box. The text is perfect, but no images in the .html file. I must be missing something in my code… I have a simple form with one WPDynamic.WPPDLLInt RichTextBox on it (Actually using the version for VS 2005, .NET2).

    I am impressed with the features of this component and believe that it could save me a lot of time in my application as well as provide great functionality for my customers. It will be localized into English, French, German, Italian, Japanese, Russian and Spanish.

    ===============================================

    • Offizieller Beitrag

    Hi,

    "-alwaysembed" does not work for HTML - it only makes a difference for RTF and the native WPT format which supports binary data embedding.

    Currently it is so that only linked images can be exported to HTML - the links will be then used in the href parameter.

    The event OnBeforeSaveImage
    https://www.wpcubed.com/manuals/tdref/…reSaveImage.htm

    could be used to create the image file "on the fly", for example use
    if(TextObject.Contents_Filename=="")
    {
    TextObject.Contents_SaveToFile(@"image.jpg")
    TextObject.Contents_Filename = "image.jpg";
    }

    If have seen references to images as CID in e-mails and in fact an exporter to EML format would be good. (I put that on the list)
    I am also open for any suggestions here.

    Julian