All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

Please Log In to Continue

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