Optionally I tried PNG, but this resulted in a nil.unpack error (‘The
error occured while evaluating nil.unpack’)
I’ve now run out of file types. harumph!
Secondary question, how do I reference a relative path to the file
(/images and …/images/file don’t work) ? Or perhaps a way to find the
server root path from the os?
I’m having problems getting Pdf::Writer image insertion.
pdf.image “/path/to/images/logo.jpg”
is firing “JPEG marker not found!”
You’re using the natively built Ruby for OS X. It is known to be
broken. Install one from darwinports, fink, or build your own.
Secondary question, how do I reference a relative path to the file
(/images and …/images/file don’t work) ? Or perhaps a way to find the
server root path from the os?
That will be something that the Rails people will have to deal with.
PDF::Writer will work from the current working directory, and that may
not be what you think it is in the file you’re dealing with.
There are some JPEG variations such as JPEG2000 and progressive JPEG
that are not quite universally supported. Check to make sure your
JPEG isn’t progressive. This is general advice, because I don’t know
PDF::Writer. Your problem may very well be something else.
For relative paths, I use File.join RAILS_ROOT, “path”, “to”, “file”
–
Kyle M.
Chief Technologist
E Factor Media // FN Interactive [email protected]
1-866-263-3261