Sha256: b9cd14bebb4e059218e0ce41ccc9e1d119eb3cfa0e816adc559108fc981e365c

Contents?: true

Size: 656 Bytes

Versions: 27

Compression:

Stored size: 656 Bytes

Contents

# # Images
#
# This example shows how to embed images into a PDF document, directly on a
# page's canvas and through the high-level [HexaPDF::Composer].
#
# Usage:
# : `ruby digital-signatures.rb`
#

require 'hexapdf'
require HexaPDF.data_dir + '/cert/demo_cert.rb'

doc = if ARGV[0]
        HexaPDF::Document.open(ARGV[0])
      else
        HexaPDF::Document.new.pages.add.document
      end
doc.sign("digital-signatures.pdf",
         reason: 'Some reason',
         certificate: HexaPDF.demo_cert.cert,
         key: HexaPDF.demo_cert.key,
         certificate_chain: [HexaPDF.demo_cert.sub_ca,
                             HexaPDF.demo_cert.root_ca])

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
hexapdf-1.0.2 examples/024-digital-signatures.rb
hexapdf-1.0.1 examples/024-digital-signatures.rb
hexapdf-1.0.0 examples/024-digital-signatures.rb
hexapdf-0.47.0 examples/024-digital-signatures.rb
hexapdf-0.46.0 examples/024-digital-signatures.rb
hexapdf-0.45.0 examples/024-digital-signatures.rb
hexapdf-0.44.0 examples/024-digital-signatures.rb
hexapdf-0.41.0 examples/024-digital-signatures.rb
hexapdf-0.40.0 examples/024-digital-signatures.rb
hexapdf-0.39.1 examples/024-digital-signatures.rb
hexapdf-0.39.0 examples/024-digital-signatures.rb
hexapdf-0.38.0 examples/024-digital-signatures.rb
hexapdf-0.37.2 examples/024-digital-signatures.rb
hexapdf-0.37.1 examples/024-digital-signatures.rb
hexapdf-0.37.0 examples/024-digital-signatures.rb
hexapdf-0.36.0 examples/024-digital-signatures.rb
hexapdf-0.35.1 examples/024-digital-signatures.rb
hexapdf-0.35.0 examples/024-digital-signatures.rb
hexapdf-0.34.1 examples/024-digital-signatures.rb
hexapdf-0.34.0 examples/024-digital-signatures.rb