PDF support more stable now

* Lays out cards with possiblity of margin, gap, and trim
* Some new directory and file validation
* Added a logger
This commit is contained in:
Andy Meneely
2014-07-19 01:44:21 -04:00
parent 1ebb148e94
commit 11d2730b44
6 changed files with 72 additions and 15 deletions
View File
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
require 'squib'
Squib::Deck.new(width: 825, height: 1125, cards: 16) do
background color: :gray
rect x: 38, y: 38, width: 750, height: 1050, x_radius: 38, y_radius: 38
text str: (1..16).to_a, x: 220, y: 78, font: 'Arial 54'
save_pdf file: "sample-save-pdf.pdf", margin: 75, gap: 5, trim: 37
#Note that our PNGs still are not trimmed even though the pdf ones are
save_png range: 1, prefix: "save_pdf_"
end
puts "Done!"