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

require "ClibPDF"

pdf = ClibPDF::PDF.open(0)
pdf.enableCompression(ClibPDF::YES)
pdf.init

pdf.pageInit(1, ClibPDF::LANDSCAPE, ClibPDF::LETTER, ClibPDF::LETTER)
pdf.translate(0.0, 11.0)
pdf.rotate(-90.0)

pdf.rect(1.0, 1.5, 5.0, 2.5)
pdf.stroke()

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

pdf.finalizeAll
pdf.savePDFmemoryStreamToFile("landscape.pdf")

#pdf.launchPreview
pdf.close()
