pdf2image 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abc4d2ac746b6d05d62bccfc778ba0bb75469e1e
4
- data.tar.gz: 615bbecf6c48bba6e4f460acc95769eb1ccb4d82
3
+ metadata.gz: 03b9ab538e5ed682a6526461e4d46a757e5485f4
4
+ data.tar.gz: 3e17c380fe33de11c0bbe538a132450c9ac6f5c5
5
5
  SHA512:
6
- metadata.gz: aa532757915c6066cd6675b426d3cba264ef652a189a83844854ea1ae434313cd375b473a29ffdb63b767f3d77ab97449317e3b0bdfb9de8bb09473e521aea8a
7
- data.tar.gz: 75d92d4b07065cb7bcad913bf22bfc2fa6fb15f9ecb2d3be6141a171396d05ed20cf59790ebe76b850f8704ff12709d7b5bea1456a4d7374c79422c6b3ab164d
6
+ metadata.gz: 05cf913649eee5e9f39ea816bbdfa56fe743c5bb558f3702d430c4574334d95bc4df620ec4a3e399cfceda47b16fc1b508f7aa65e64e587f0adb8de34ecc0e7b
7
+ data.tar.gz: 22390d2acbdbb67307a77f834b94bc26986eebaa4792bc76eaed93d2016aa94ef2a0a229630f7595421634054cd143393267639ce1b5ec8e1b5fd52e3e2b2b3b
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Pdf2image
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pdf2image`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Welcome to pdf2image gem.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ pdf2image accepts pdf file path as input string and it will convert pdf file into a jpeg image format.
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,7 +22,17 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ pdf2image gem usage is very simple. you just need to require it into your code using
26
+
27
+ require 'pdf2image'
28
+
29
+ ## Just to make sure pdf2image is loaded or not
30
+ $ Pdf2image.welcome
31
+ You are using Pdf2image Gem!!
32
+
33
+ ## to convert pdf file into image
34
+ $ Pdf2image.convert("sample pdf path")
35
+
26
36
 
27
37
  ## Development
28
38
 
@@ -1,8 +1,10 @@
1
1
  require "pdf2image/version"
2
2
  require 'rmagick'
3
3
 
4
+ # converts pdf to jpeg
4
5
  module Pdf2image
5
6
 
7
+
6
8
  def self.welcome
7
9
  puts "You are using Pdf2image Gem!!"
8
10
  end
@@ -11,16 +13,11 @@ module Pdf2image
11
13
  filepath = File.dirname(path)
12
14
  extn = File.extname path
13
15
  filename = File.basename path, extn
14
- puts "Name" + filename
15
16
 
16
17
  pdf = Magick::ImageList.new(path)
17
18
  if pdf.format == "PDF"
18
- puts pdf.format.inspect
19
- puts pdf.class.inspect
20
19
  pdf.write(filepath + "/" + filename + ".jpg")
21
- # elsif pdf.format == "JPEG"
22
- # puts "hello"
23
- # pdf.write(filename + ".pdf")
20
+ STDOUT.put "\033[107;31m Your file saved in #{filepath}\033[0m"
24
21
  else
25
22
  raise StandardError, "Please enter valid PDF file path!"
26
23
  end
@@ -1,3 +1,3 @@
1
1
  module Pdf2image
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Converts pdf to image}
13
13
  spec.description = %q{pdf2image accepts pdf file path as input and converts into a jpeg image}
14
- spec.homepage = ""
14
+ spec.homepage = "https://github.com/kishor557/pdf2image"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdf2image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Venkat
@@ -78,7 +78,7 @@ files:
78
78
  - lib/pdf2image.rb
79
79
  - lib/pdf2image/version.rb
80
80
  - pdf2image.gemspec
81
- homepage: ''
81
+ homepage: https://github.com/kishor557/pdf2image
82
82
  licenses:
83
83
  - MIT
84
84
  metadata: {}
@@ -103,4 +103,3 @@ signing_key:
103
103
  specification_version: 4
104
104
  summary: Converts pdf to image
105
105
  test_files: []
106
- has_rdoc: