R
Ray(:bies, :mundo)
Folks/Admin, apologies for this cross post. I posted to the wrong group
previously.
Hi, I am trying to get pdf-writer to load up Postscript Type 1 fonts
but am encountering a problem. Using the gettysburg.rb example as a
base for my tests I have implented the following code changes:
PDF::Writer::FONT_PATH.unshift(File.expand_path("Fonts"))
p PDF::Writer::FONT_PATH
PDF::Writer::FontMetrics::METRICS_PATH.unshift(File.expand_path("Fonts"))
p PDF::Writer::FontMetrics::METRICS_PATH
pdf.select_font("GillSan", :encoding => nil)
pdf.text "The Gettysburg Address\n\n",
:font_size => 12,
:justification => :center
When I run the program, my ruby session sends back the following error
message:
/opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:1102:in `font_height':
undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:2436:in
`text'
from gettysburg.rb:58
Line 58 is "pdf.text "The Gettysburg Address\n\n","... Any idea what's
going on?
I am runnng the following:
Mac: OSX 10.4.7
Ruby: 1.8.4
pdf-writer: 1.1.3
color-tools: 1.3.0
transaction-simple: 1.3.0
Thanks, Ray
previously.
Hi, I am trying to get pdf-writer to load up Postscript Type 1 fonts
but am encountering a problem. Using the gettysburg.rb example as a
base for my tests I have implented the following code changes:
PDF::Writer::FONT_PATH.unshift(File.expand_path("Fonts"))
p PDF::Writer::FONT_PATH
PDF::Writer::FontMetrics::METRICS_PATH.unshift(File.expand_path("Fonts"))
p PDF::Writer::FontMetrics::METRICS_PATH
pdf.select_font("GillSan", :encoding => nil)
pdf.text "The Gettysburg Address\n\n",
:font_size => 12,
:justification => :center
When I run the program, my ruby session sends back the following error
message:
/opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:1102:in `font_height':
undefined method `[]' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/site_ruby/1.8/pdf/writer.rb:2436:in
`text'
from gettysburg.rb:58
Line 58 is "pdf.text "The Gettysburg Address\n\n","... Any idea what's
going on?
I am runnng the following:
Mac: OSX 10.4.7
Ruby: 1.8.4
pdf-writer: 1.1.3
color-tools: 1.3.0
transaction-simple: 1.3.0
Thanks, Ray