Sha256: 2dff51f4dcdc752ebd0f0cbde2f1fbb61d09fd5f5e3ab284abae574cd174fdfc

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

$LOAD_PATH.push "#{Dir.pwd}/lib"
require 'goldendocx'

docx = Goldendocx::Docx.new("#{Dir.pwd}/demo/templates/blankDocument.docx")

image = File.open("#{Dir.pwd}/demo/templates/bg.png")
docx.create_image(image, width: 720000, height: 720000)

filename = 'styledImageDocument.docx'
system "rm -f ~/Desktop/#{filename}" # -f so that we don't have an error if the file doesn't exist
docx.write_to File.expand_path("~/Desktop/#{filename}")
exec "open ~/Desktop/#{filename}"

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
goldendocx-0.3.0 demo/images/append_styled_image.rb
goldendocx-0.2.3 demo/images/append_styled_image.rb
goldendocx-0.2.2 demo/images/append_styled_image.rb