LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-03-2009, 01:41 AM   #1
lsbora
LQ Newbie
 
Registered: Nov 2009
Posts: 1

Rep: Reputation: 0
How Can I JPEG Into RTF and Have It Look The Same as The Original?


How Can I JPEG Into RTF and Have It Look The Same as The Original?
 
Old 11-03-2009, 02:13 AM   #2
sadiqdm
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: openSUSE, Ubuntu
Posts: 357

Rep: Reputation: 35
If you mean: "How can I embed a JPEG image in an RTF file?", then the answer is you can't. RTF means Rich Text Format, and was intended to allow interchange of text files between different word processors, and keep some of the layout formatting, such as indents, and bold/italic. It does not support graphics. If you want to embed graphics, then you need a word processor that has a full document format, like OpenOffice, KOffice, AbiWord, or MS Word.
 
Old 11-21-2009, 03:29 AM   #3
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,363
Blog Entries: 52

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
You can use the /jpegblip command to embed a jpeg image in an RTF document (the data is encoded as a hex dump). Viewing of embedded formats like this will depend on the application, but jpeg images will be okay (eg in Abiword, WordPad, Microsoft Word etc). You will find a description in the RTF standard.

For example, the following RTF file contains a jpeg image of a neon signal lamp that is identical to the original image.

Code:
{\rtf1{\pict\jpegblip
FFD8FFE000104A46494600010101004800480000FFDB004300191113161310191614161C1B191E253E29252222254C373A2D3E5A505F5E595057566470907A64
6A886C56577DAA7E889499A1A2A16178B0BDAF9CBB909EA19AFFDB0043011B1C1C252125492929499A6757679A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A
9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9AFFC0001108004D006403011100021101031101FFC400190000020301000000000000
000000000000010200030405FFC4002E100002010203060601050100000000000001020003111221310413415152912261627181A132234243C1D1E1FFC40018
01010101010100000000000000000000000001020304FFC4002511010100020202030000070000000000000001021103211231415171041322324261D1FFDA00
0C03010002110311003F007C0BD23B4E8D0E05E91DA412C9D23B428597A07685D54183A476841C2BD23B42A605E91DA0428BD23B4214A2F48ED014AAF48ED2A0
155E91DA002ABC8768145655C5A0D394237C2949BC8BA1442EE141009E2663933F0C6E5A6F19B5AA4A1349C5984CE39CCE794769D7447B13E35F91373FD3396B
E61701D50DFCB8CBB62E1F401F8112B037BC0060298429940308A2B7E43DA11B8E92351152E2F26DD3C562D30C0F2109F88D4CD501598EF13F16E63919E5CB1B
C596F1F55DF1CA59D96E540DE0057830D3FE4EB8F24CBF56C029C54CE9B73B8FD21B1C9C7CC7E25D5F6464619A9B8976CDC3E898F9CAC0DE0298429845158F88
7B40DCDA42883600904807300DAE263396CB31F6ED8D93DAE0DB3B3D92A321E96245E793CB9F1EB2EDD27E19EE84781B2D2EF94D4B739AF26A485BD32AD53030
2D93A83600CE731CE65E16FAF54EFD11569630AA2AA13A78C58CE995E5C26ED9AFC37BEC30A1254AD4C40E777B4D4BC966E5859019513334EA8F3DE4BAE4FB86
A42D5A48956D76B150733720CD71679653759CFC6CED8F6AAC367650016BEA4709D76E171ED13684A9C73E52CBB66CB0F79514562310F684746D710A08D66CF3
1C4495B941D72B300441DC0467A7953720749CC4E79716397B8E9392FCF6BA9D65B115295AE332998ED3CF9F1673BC6EDD265E5EA81A2C56F4996A21E5FE4D63
FC44F59CD3371EFE8BBC23C3555881A752FF00B2F87F971D6B7AF6BE9AE3CB1074199B6BF22633E5B26ACD55B74CF54A956AACD9EB6FEA77C278C92267239C7F
326A1272CEDA09BDCDF6F3D975B667C02A1C02E38CAE76D45DA2A02421CBCE368956B96605945EDAF38DABB62694196F98D614A1AD91EC645946C0E86C79185E
AA7894F10617B87425C6EC1B31CD0F9F29E6E5C7C2F9FC7CBB619EFD8AD5A9FC803A8EA1FDC5E1C6CDE1746F57562C0D4B740A3EE9EAD88C47503CE79F7979FF
0054F291AB2ED936B77A7501AF4FC00101D742C74BF30277C2E37FB2A5F4CB4D9372EAC7F50F3E53B6BB72B6698F6820B5C5BDE571AA16A14BF9F38D22EC4A40
26C2F1A5D5AED89D01810807585294B7E26410315C8C69A99582703712A79C9675A6B1B37B58D48ED02E1954E8E2FF00627926578B78DEFEBFE3B7D33ED15519
99FF008D4587B09DB8B1F1C7BF6C677BD3254DBAA50744501D0E669B66233E397BF54FE6DDB1D427166709D6DC26E7A71CBBA537FDCBF2B2EE33655245DAC339
596B6A192D9869DA65DEE36751D713A390C037854810D8EB2042838650A4653E7F12592B78F2658FA67DAEA108A29D2B906E40E4234972DB0229AB5D98E5737B
7299612A8235B91E70955A54606DCE34B2ADA7858E3B69136D492F65A8016B9835B76C4E8C0C030242A4012006148CA0E708C9B56CED52CC96B8F8264B12ED81
83AB61A80AF999349B406CEA105C716B6A64D2AD202F846435875935D2B739C8B5D7DF7A7EE75711DF7A7EE04DF7A7EE04DF7A7EE04DF7A7EE00DF7A7EE400D6
F4FDC281ADE9FB8086AFA7EE023D456521D030E46118F1056200384682F335AC6765C77CCF192B78DF923367A48B6BFFD9
}}

Last edited by neonsignal; 11-21-2009 at 03:32 AM.
 
  


Reply

Tags
conversion, document


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert RTF to PDF hypernetics Linux - Software 6 04-04-2014 04:46 AM
a .doc , .rtf converter debdas Programming 15 01-27-2011 12:09 AM
C++ RTF to TXT converter Guitarist88 Programming 5 09-25-2007 11:52 AM
OpenOffice and rtf zmsc1 Linux - Desktop 4 06-15-2007 02:54 AM
Open Office 2.0--no RTF? coolingtower Linux - Software 3 01-13-2006 07:44 AM


All times are GMT -5. The time now is 11:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration