Is there a way in PHP to access compressed RTF and ouput RTF code to the browser?
I have a text column in SQL and I would like to extract the RTF from it – I have managed to output the data as 0x1F8B
I believe this data is compressed RTF – http://www.freeutils.net/source/jtnef/rtfcompressed.jsp
Using [MS-OXRTFCP]: Rich Text Format (RTF) Compression Algorithm http://msdn.microsoft.com/en-us/library/cc463890%28v=exchg.80%29
Sample data :
0x1F8B0800000000000000654E316EC3300CEC5CA07FE0D6AD909D1628E0A1C8D01F74E422CB94CD46A11C4A6E5018F97B6967EC72381EC9BB5B516B6CD04BE11DC23C36ED5B8B03C5E8364C5EC6C61D0E2BC62CB5F6C988C358AE5C0AC6592F2DC630792D541D1C957DEA6E76D260144EFF57B7A7C715434E59CD0A3A541A1C8E4A240EFBB490EBEC027F98AE2796E11597D0E0EC75C013D1BC8360F1EF0EC316B115695BF89A08CE390B70816ABC571EA74AA542EEBF295460D975642B069F5EEBF45C6CB27707E5F4FBB14558EC1D83D9EEEC28D9BE142E8B59719697BB6C051FFE00D09796A337010000
And this looks like what I want but its in VB http://www.vbforums.com/attachment.php?attachmentid=87371&d=1326754610
Your data sample is gzipped data, use
gzdecodeto decode it. You’ll need to pass a binary string not the hex string supplied(usehex2binorpackto convert)Here is the raw data.
And this is the rendered text.
I’m not sure if you only want the raw rtf or rendered, take a look at Free (preferably) PHP RTF to HTML converter? if you want the rtf in html.