Hi,
I am using this code, but I am not able to add the image in pdf using
pdf writer.
Is there any wrong with code?
def pdf1
_pdf = PDF::Writer.new
_pdf.select_font “Times-Roman”
_pdf.text “Hello, Ruby.”, :font_size => 72, :justification =>
:center
_pdf.image “http://localhost:3001/images/rails.png”
send_data _pdf.render, :filename => “hello.pdf”,
:type => “application/pdf”
end
I am getting this error:-
“PNG alpha channel transparency is not supported; only palette
transparency is supported.”
Please help me to solve this problem.
Thanks,
Tushar