Sha256: af3cf8381862883140bf8d440683416ee09fea6452fddca3803f64a2593e52d6

Contents?: true

Size: 646 Bytes

Versions: 5

Compression:

Stored size: 646 Bytes

Contents

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

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

5 entries across 5 versions & 3 rubygems

Version Path
tv-pdf-stamper-0.3.9 spec/pdf_stamper_spec.rb
tv-pdf-stamper-0.3.8 spec/pdf_stamper_spec.rb
tv-pdf-stamper-0.3.7 spec/pdf_stamper_spec.rb
spatialnetworks-pdf-stamper-0.3.0 spec/pdf_stamper_spec.rb
pdf-stamper-0.3.0 spec/pdf_stamper_spec.rb