#!/usr/local/bin/ruby
#
#
# ./helloworld.rb

require "ClibPDF"

pdf = ClibPDF::PDF.open(0)
pdf.enableCompression(ClibPDF::YES)
pdf.init
pdf.pageInit(1, ClibPDF::PORTRAIT, ClibPDF::LETTER, ClibPDF::LETTER)

pdf.beginText(0)
pdf.setFont("Times-Italic", "WinAnsiEncoding", 48.0)
pdf.text(1.0, 8.0, 0.0, "Hello Euro \200")
pdf.endText

pdf.finalizeAll
#pdf.savePDFmemoryStreamToFile("helloeuro.pdf")
pdf.savePDFmemoryStreamToFile("helloworld.pdf")

#pdf.launchPreview
pdf.close()
