Meksilon
March 2nd, 2004, 09:16
I'm thinking about using RTF for printer-friendly pages:
<link rel=alternate media=print href="printversion.rtf">
Writing the files in notepad using this as a reference:
http://www.biblioscape.com/rtf15_spec.htm
I know that only IE will actually print them like that automatically, but my question is this: is RTF a good idea? Or should I, perhaps, use HTML like everyone else? Writing RTF is a little more difficult, but it's by no means a huge task. I noticed one problem is that WordPad (and even ElitePad) don't want to display my embedded pictures.
WinWord has no issues - but for mozilla users without WinWord what programs out there will support RTF files with embedded images and headers/footers? ElitePad doesn't want to work either. And it's not because of the way I'm embedding them either... They only seem to like the metafiles WinWord embeds, changing my filesize from a sexy 21kb to a fat 411kb!
Someone help me! Here's my code (with all text removed):
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0 Tahoma;}{\f1 Verdana;}}
\f1\cf1\fs44\b\qc{\pict\jpegblip\picw500\pich364\bin21418 [binary data for JPEG file]
}
}In case you're wondering I split the file in two and use the copy command such: copy /b toppart.txt + image.jpg + bottompart.txt rtffile.rtf, the rtf file is never edited once it contains the binary data. There IS a line break before the first closing backet } at the end of the binary data (I believe it's required).
<link rel=alternate media=print href="printversion.rtf">
Writing the files in notepad using this as a reference:
http://www.biblioscape.com/rtf15_spec.htm
I know that only IE will actually print them like that automatically, but my question is this: is RTF a good idea? Or should I, perhaps, use HTML like everyone else? Writing RTF is a little more difficult, but it's by no means a huge task. I noticed one problem is that WordPad (and even ElitePad) don't want to display my embedded pictures.
WinWord has no issues - but for mozilla users without WinWord what programs out there will support RTF files with embedded images and headers/footers? ElitePad doesn't want to work either. And it's not because of the way I'm embedding them either... They only seem to like the metafiles WinWord embeds, changing my filesize from a sexy 21kb to a fat 411kb!
Someone help me! Here's my code (with all text removed):
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0 Tahoma;}{\f1 Verdana;}}
\f1\cf1\fs44\b\qc{\pict\jpegblip\picw500\pich364\bin21418 [binary data for JPEG file]
}
}In case you're wondering I split the file in two and use the copy command such: copy /b toppart.txt + image.jpg + bottompart.txt rtffile.rtf, the rtf file is never edited once it contains the binary data. There IS a line break before the first closing backet } at the end of the binary data (I believe it's required).