Sha256: e14f4a1bca79c2a268ed63405927ede0f5a202501b62e7f466be521919f3aefa

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

module Asposepdfjava
  module InsertEmptyPage
    def initialize()
    	# The path to the documents directory.
        data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/'
                
        # Open the target document
        pdf = Rjb::import('com.aspose.pdf.Document').new(data_dir + 'input1.pdf')

        # insert a empty page in a PDF
        pdf.getPages().insert(1)

        # Save the concatenated output file (the target document)
        pdf.save(data_dir+ "output.pdf")

        puts "Empty page added successfully!"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
asposepdfjava-0.0.2 lib/asposepdfjava/Pages/insertemptypage.rb
asposepdfjava-0.0.1 lib/asposepdfjava/Pages/insertemptypage.rb