Fredrik Jagenheim
2/8/2005 8:00:00 AM
On Tue, 8 Feb 2005 15:00:08 +0900, arthur.olano@gmail.com
<arthur.olano@gmail.com> wrote:
>
> How did you do it? if you wont mind telling me what method you're
> using? Do you have a sample of any code you have used?
To quote an actual piece of the code:
cv.add_jpeg_from_file(textDB['Picture']['name'], 40, cur_y - 210, 155, 201)
(cv is the PDF object)
> Looking back on
> the tutorial provided of the package of pdf-write, I saw
> addJpegFromFile() and addImage() and their synxtax, but they were no
> where to be found. my program just returns a "NoMethodError"
I don't think I ever used addImage. As for addJpegFromFile, try not to
use the CamelCase. Sometimes it's not aliased.
> There's only one module available on the cvs and i did check-out and
> tried it, but all were the same :( Hmmm.....what to do....?
Try underscore_notation instead of CamelCase. If that doesn't work,
well, we will have to take a look at it again. ;)
If you want to use CamelCase, you could always open up the pdf object
and make a few :alias on your own, though.
Btw, the name 'cv' comes from that after my company switched names for
the third (4th?) time and I was ordered to update my profile with a
new word-template; I decided to create a template in Ruby instead with
YAML as input.
Whenever I needed to update my profile; I'd edit the YAML file and
generate a new PDF profile. Whenever the company changed template, I'd
create a new template in Ruby and run the generator again.
Perhaps not time efficient with one person; but if 10-20 persons never
had to sit through a Word session just to update their profile
again...
//F