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.
  • by ziggy (25) on 2003.09.21 12:10 (#24382) Journal
    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 this bug is pretty low priority, especially since I don't have a copy of Word 2003 handy... I'll be the first to admit my hack is broken in some way, and I haven't delved deeply into the problem. And I'll also chime in that the portion of the RTF spec that deals with images is a good example of Microsoft tech writing that is as clear as the deepest, darkest mud you could ever hope to find at the bottom of a coal mine. 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. Using external images simply is not sufficient in many cases. My coping behavior has been to generate an RTF file (using openjade) and re-saving it as a Word doc. With that out of the way, the pocket guide was one of the most refreshing tech books I've read in a long time. The undercurrent of "RTF is really more painful than it needs to be" was a breath of fresh air. It's so much better than the official apologist party line: "Here is how you should structure word processing documents, because that's how Word does it."
    • 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 p