Html to RTF conversion
Asked Answered
E

4

5

What is the word(RTF/doc) equivalent of Html for the below tag.

<IMG SRC = "planet.jpg"  align="left" Width = "600">
Employ answered 26/10, 2011 at 1:8 Comment(2)
Are you wanting to leave it as a linked image or embed it in the .rtf?Vanlandingham
@Henry: What are you trying to determine that you can't get by creating an html file with your IMG tag, load it into Word and then save it as rtf?Significance
A
6

Are you really sure you want that answer ?

Well, as a start, the equivalent of :

<html><IMG SRC = "planet.jpg"  align="left" Width = "600"></html>

is...

{\rtf1\ansi\ansicpg1252\deff0\deflang1036\deflangfe1036\deftab708{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit 5.41.21.2510;}\viewkind4\uc1\pard\f0\fs24\par
\lang12\f1\fs22{\pict\wmetafile8\picw185\pich53\picwgoal8989\pichgoal2569 
0100090000036c02000000000c02000000000c02000026060f000e04574d464301000000000001
00ef460000000001000000ec03000000000000ec030000010000006c0000000000000000000000
06000000010000000000000000000000f60000004500000020454d4600000100ec0300000c0000
0001000000000000000000000000000000900600001a0400005102000072010000000000000000
0000000000001a0b0900f0a60500460000002c00000020000000454d462b014001001c00000010
0000000210c0db01000000600000006000000046000000fc010000f0010000454d462b22400400
0c000000000000001e4009000c00000000000000244001000c0000000000000030400200100000
00040000000000803f214007000c0000000000000008400005480100003c0100000210c0db0100
00000000000000000000000000000000000001000000ffd8ffe000104a46494600010100000100
010000ffdb00430001010101010101010101010101010101010101010101010101010101010101
010101010101010101010101010101010101010101010101010101010101010101ffdb00430101
010101010101010101010101010101010101010101010101010101010101010101010101010101
010101010101010101010101010101010101010101010101ffc000110800020007030122000211
01031101ffc400150001010000000000000000000000000000000affc400141001000000000000
00000000000000000000ffc4001501010100000000000000000000000000000406ffc400141101
00000000000000000000000000000000ffda000c03010002110311003f00b58013e43fffd90840
010824000000180000000210c0db01000000030000000000000000000000000000001b40000040
000000340000000100000002000000000000bf000000bf0000e0400000004003000000000000b3
000000b3ffffdf40000000b3000000b3ffffff3f2100000008000000620000000c000000010000
00150000000c00000004000000150000000c00000004000000510000008c000000000000000000
000006000000010000000000000000000000000000000000000007000000020000005000000034
0000008400000008000000000000002000cc000700000002000000280000000700000002000000
0100040000000000000000000000000000000000030000000000000000000000ffffff00e4ecec
0022222220222222204c0000006400000000000000000000000600000001000000000000000000
000007000000020000002900aa0000000000000000000000803f00000000000000000000803f00
00000000000000000000000000000000000000000000000000000000000000220000000c000000
ffffffff460000001c00000010000000454d462b024000000c000000000000000e000000140000
000000000010000000140000000400000003010800050000000b0200000000050000000c020200
0700030000001e00040000000701040004000000070104002b000000410b2000cc000200070000
000000020007000000000028000000070000000200000001000400000000000000000000000000
00000000030000000000000000000000ffffff00e4ecec0022222220222222200c000000400929
00aa000000000000000200070000000000040000002701ffff030000000000
}\lang1036\f0\fs24\par
\par
}
Akiko answered 10/11, 2011 at 19:24 Comment(0)
P
2

Here's a sample with a linked (not embedded) picture, named mypic.jpg and placed in c:\tmp. This sample works with MSWord. Does not work with Wordpad

{\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fnil\fcharset0 Calibri;}}\viewkind4\uc1\pard\sa200\sl276\slmult1\qr\lang16\f0\fs22 This test is right aligned:\par
{\field{\*\fldinst{INCLUDEPICTURE "c:\\\\tmp\\\\mypic.jpg" MERGEFORMAT \\d \\w200  \\pm1 \\px0 \\py0 \\pw0}}}\par
}
Phrixus answered 14/11, 2011 at 16:11 Comment(0)
M
0

I don't think the question makes sense, because word/rtf doesn't work the same way as html. For example, you assign a pixel width to your image, which is not possible and doesn't make any sense in word, as it is primarily aimed for paper/print and sets sizes in inches or centimeters.p

Mola answered 10/11, 2011 at 18:24 Comment(0)
G
0

If you're trying to embed a styled word document into a webpage, I'd recommend signing up for a Slideshare account, uploading your document there, and then customizing their embed code and pasting into your site.

Gammadion answered 10/11, 2011 at 18:32 Comment(1)
Better yet, convert it to a PDF file and just do it that way.Kellyekellyn

© 2022 - 2024 — McMap. All rights reserved.