1. Artikel
  2. Forum
    1. Unerledigte Themen
  3. Privacy Statement
  4. Contact
  • Anmelden oder registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Forum
  • Seiten
  • Erweiterte Suche
  1. WPCubed Support Forum
  2. Forum
  3. VCL Tools Support
  4. WPTools 6

HTML Image tags

  • RoyLambert
  • 3. Januar 2009 um 14:45
1. offizieller Beitrag
  • RoyLambert
    Beiträge
    294
    • 3. Januar 2009 um 14:45
    • #1

    Julian

    Is there a way to get WPTools 6 to save html image tags as <img src="cid:.... rather than as just <img src="

    • Zitieren
  • support
    Reaktionen
    3
    Beiträge
    7.388
    • 10. Januar 2009 um 07:17
    • Offizieller Beitrag
    • #2

    Hi,

    WPTools 6 incluides the MIME encoder which uses Synapse. Please check it out. It maybe already does what You need.

    The unit WPIOHTML.PAS uses the $define ADDIMG_CID.

    If this is defined it adds "cid:' to the file name.

    Please take a look to this unit - it should be very clear what it does.

    Julian

    • Nächster offizieller Beitrag
    • Zitieren
  • RoyLambert
    Beiträge
    294
    • 10. Januar 2009 um 09:55
    • #3

    Thanks - that's what was needed

    • Zitieren
  • RoyLambert
    Beiträge
    294
    • 12. Januar 2009 um 06:51
    • #4

    Julian

    Just thinking about this. I'll be using WPTools to originate emails, and to write letters. For emails I want to embed the images so src=cid is what I want. Letters on the other hand just need to access the disk. What I'm building up to is a property might be better than a define.

    • Zitieren
  • RoyLambert
    Beiträge
    294
    • 27. Januar 2009 um 14:29
    • #5

    Any thoughts on this??

    • Zitieren
  • support
    Reaktionen
    3
    Beiträge
    7.388
    • 29. Januar 2009 um 09:50
    • Offizieller Beitrag
    • #6

    Hi,

    well , it is not really necessary.

    From the code you can clearly see the flow the program takes:

    First - here is you chance to update the name:

    Code
    if txtobj.ObjType = wpobjImage then  begin    DontSave := FALSE;    fnam := '';    PrepareImageforSaving(txtobj, DontSave, fnam); // execute event

    Later it is written:

    Code
    if fnam <> '' then
            begin
              {$IFDEF ADDIMG_CID}
              if Copy(fnam ,1,4) <> 'cid:' then
              fnam := 'cid:' + fnam;
              {$ENDIF}
              WriteString('<img src="');
              WriteString(fnam);
              WriteString('"');
    
    
              ImageAlign;
    Alles anzeigen

    So, using OnPrepareImageforSaving You have the complete power :)

    • Vorheriger offizieller Beitrag
    • Zitieren
  • RoyLambert
    Beiträge
    294
    • 30. Januar 2009 um 09:22
    • #7

    The OnPrepareImageForSaving event has a different parameter list

    (RTFData: TWPRTFDataCollection; Writer: TWPCustomTextWriter; TextObject: TWPTextObj; var DontSave: Boolean);

    so I presume you're suggesting setting TextObject.ObjRef.FileName

    • Zitieren

Ähnliche Themen

  • PNG Scrolls

    • andi
    • 24. August 2017 um 14:25
    • WPTools 7
  • WPTools 8 is available now

    • support
    • 10. Juli 2017 um 10:50
    • Announcements
  • WPTOOLS Changelog

    • mgirardo
    • 3. Mai 2017 um 16:56
    • WPTools 7
  1. Impressum
Community-Software: WoltLab Suite™