Class: Pdfs2Pdf::Configuration
- Inherits:
-
Object
- Object
- Pdfs2Pdf::Configuration
- Defined in:
- lib/pdfs2pdf/configuration.rb
Instance Attribute Summary collapse
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#gs_binary ⇒ Object
Returns the value of attribute gs_binary.
-
#pdfmarks_meta ⇒ Object
Returns the value of attribute pdfmarks_meta.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/pdfs2pdf/configuration.rb', line 7 def initialize # see: http://wkhtmltopdf.org/usage/wkhtmltopdf.txt @default_options = { paper_size: "A4", # or 'Letter' margin_top: "0.75in", margin_right: "0.75in", margin_bottom: "0.75in", margin_left: "0.75in", encoding: "UTF-8" } # see: http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/pdf_creation_apis_and_specs/pdfmarkReference.pdf @pdfmarks_meta = <<-END.gsub(/^\s+\|/, "") |[ /Title (My Combined Pdf) | /Author (Burin Choomnuan) | /Keywords (fun, witty, interesting) | /DOCINFO pdfmark END @gs_binary = (defined?(Bundler::GemfileError) ? `bundle exec which gs` : `which gs`).chomp end |
Instance Attribute Details
#default_options ⇒ Object
Returns the value of attribute default_options.
3 4 5 |
# File 'lib/pdfs2pdf/configuration.rb', line 3 def @default_options end |
#gs_binary ⇒ Object
Returns the value of attribute gs_binary.
3 4 5 |
# File 'lib/pdfs2pdf/configuration.rb', line 3 def gs_binary @gs_binary end |
#pdfmarks_meta ⇒ Object
Returns the value of attribute pdfmarks_meta.
3 4 5 |
# File 'lib/pdfs2pdf/configuration.rb', line 3 def @pdfmarks_meta end |