File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,19 @@ pdf[0].save('/path/to/image.png', {
86
86
})
87
87
```
88
88
89
+ Grim has limited logging abilities. The default logger is ` Grim::NullLogger ` but you can also set your own logger.
90
+
91
+ ``` ruby
92
+ require " logger"
93
+ Grim .logger = Logger .new ($stdout ).tap { |logger | logger.progname = ' Grim' }
94
+ Grim .processor = Grim ::ImageMagickProcessor .new ({:ghostscript_path => " /path/to/bin/gs" })
95
+ pdf = Grim .reap(" /path/to/pdf" )
96
+ pdf[3 ].save(' /path/to/image.png' )
97
+ # D, [2016-06-09T22:43:07.046532 #69344] DEBUG -- grim: Running imagemagick command
98
+ # D, [2016-06-09T22:43:07.046626 #69344] DEBUG -- grim: PATH=/path/to/bin:/usr/local/bin:/usr/bin
99
+ # D, [2016-06-09T22:43:07.046787 #69344] DEBUG -- grim: convert -resize 1024 -antialias -render -quality 90 -colorspace RGB -interlace none -density 300 /path/to/pdf /path/to/image.png
100
+ ```
101
+
89
102
## Reference
90
103
91
104
* [ jonmagic.com: Grim] ( http://jonmagic.com/blog/archives/2011/09/06/grim/ )
You can’t perform that action at this time.
0 commit comments