![]() |
Re: RTF to plain text (without formats)
Das habe ich probiert (mit true and false), aber das hat auch nichts gebracht.
|
Re: RTF to plain text (without formats)
Das habe ich mal schnell in leeres Projekt eingebaut:
Delphi-Quellcode:
Es funktioniert anstandslos. Ich habe das Gefühl, dass du entweder kein "richtiges" RTF hast, oder deine RichEd32.dll in deinem Windows macht da Mist. :?
function RTF2PlainText(s: String): string;
var RichEdit: TRichEdit; begin RichEdit := TRichEdit.CreateParented(HWND(-3)); try with RichEdit do begin SelectAll; SelText := s; Result := Text; end; finally RichEdit.Free; end; end; procedure TForm1.Button1Click(Sender: TObject); var rtf: string; begin rtf := '{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil Arial;}{\f1\fnil\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs18 Ein Testtext\par \f0\par }'; ShowMessage(RTF2PlainText(rtf)); end; |
Re: RTF to plain text (without formats)
|
Re: RTF to plain text (without formats)
Hallo,
irgendwo in den Tiefen meines ![]() Gruß xaromz |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz