Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Be careful with embedding images in RTF. I haven't seen this reviewer's Java code, nor have I looked at your extensions to RTF::Writer. I came across this problem at work recently, and I hacked up a way to convert image inclusions into embedded images. I started by reverse engineering how MSWord 2000 emits RTF w/images, and correlated that with the RTF spec. It worked fine enough with Word 2000, but I got some complaints with Word 2003 not displaying images properly. And RTF is so loathsome that fixing
    • Nevertheless, the passage in the RTF Pocket Guide about images did set off some sirens. It was a lot more handwavy than the rest of the book.

      Yup, because that was a case where I just couldn't do what I did in the rest of the book: find a simple answer for the problem. I actually started reverse-engineering how MSWord saves things and it was just getting crazily complex, and definitely outside what could be covered in a pocket guide. Thank God for the pngblib/jpegblib stuff, which I'm now also going to put into RTF::Writer!

      But yes, if there's one point I can make about RTF, it's that MSWord is no better, no saner, and no more authoritative with RTF than it is with HTML. That is, it's often finicky about what it'll accept, and it makes at best just a token effort to make its output source readable.