Sha256: b9d0f55a86e5853b8e7de966e832b36e7a257d83dbfd529341879025393688fd

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'pdf/stamper/rjb'

describe PDF::Stamper do
  before(:each) do
    @pdf = PDF::Stamper.new(File.join(File.dirname(__FILE__), "test_template.pdf"))
    @pdf.text :text_field01, "test"
    @pdf.text :text_field02, "test2"
    @pdf.image :button_field01, File.join(File.dirname(__FILE__), "logo.gif")
  end

  it "should create PDF document" do
    @pdf.to_s.should_not be_nil
  end

  it "should save PDF document" do
    @pdf.save_as "test_output.pdf"
    File.exist?("test_output.pdf").should be_true
    File.delete("test_output.pdf") # Comment this out to view the output
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
millisami-pdf-stamper-0.1.0 spec/pdf_stamper_rjb_spec.rb
millisami-pdf-stamper-0.2.0 spec/pdf_stamper_rjb_spec.rb