{"action":"created","issue":{"url":"https://api.github.com/repos/andymeneely/squib/issues/93","labels_url":"https://api.github.com/repos/andymeneely/squib/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/andymeneely/squib/issues/93/comments","events_url":"https://api.github.com/repos/andymeneely/squib/issues/93/events","html_url":"https://github.com/andymeneely/squib/issues/93","id":93233643,"number":93,"title":"Card backsides","user":{"login":"gampleman","id":69144,"avatar_url":"https://avatars.githubusercontent.com/u/69144?v=3","gravatar_id":"","url":"https://api.github.com/users/gampleman","html_url":"https://github.com/gampleman","followers_url":"https://api.github.com/users/gampleman/followers","following_url":"https://api.github.com/users/gampleman/following{/other_user}","gists_url":"https://api.github.com/users/gampleman/gists{/gist_id}","starred_url":"https://api.github.com/users/gampleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gampleman/subscriptions","organizations_url":"https://api.github.com/users/gampleman/orgs","repos_url":"https://api.github.com/users/gampleman/repos","events_url":"https://api.github.com/users/gampleman/events{/privacy}","received_events_url":"https://api.github.com/users/gampleman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andymeneely/squib/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-06T09:36:01Z","updated_at":"2015-07-06T14:50:48Z","closed_at":null,"body":"Is there a way to specify what to draw on the other surface of a physical card? This would make sense mostly for getting a correct layout in the PDF for two sided printing (though there are quite a few games that rely on using both sides of a card)."},"comment":{"url":"https://api.github.com/repos/andymeneely/squib/issues/comments/118878668","html_url":"https://github.com/andymeneely/squib/issues/93#issuecomment-118878668","issue_url":"https://api.github.com/repos/andymeneely/squib/issues/93","id":118878668,"user":{"login":"andymeneely","id":341847,"avatar_url":"https://avatars.githubusercontent.com/u/341847?v=3","gravatar_id":"","url":"https://api.github.com/users/andymeneely","html_url":"https://github.com/andymeneely","followers_url":"https://api.github.com/users/andymeneely/followers","following_url":"https://api.github.com/users/andymeneely/following{/other_user}","gists_url":"https://api.github.com/users/andymeneely/gists{/gist_id}","starred_url":"https://api.github.com/users/andymeneely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andymeneely/subscriptions","organizations_url":"https://api.github.com/users/andymeneely/orgs","repos_url":"https://api.github.com/users/andymeneely/repos","events_url":"https://api.github.com/users/andymeneely/events{/privacy}","received_events_url":"https://api.github.com/users/andymeneely/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T14:50:48Z","updated_at":"2015-07-06T14:50:48Z","body":"Ok, here's what you can do now, although I've been thinking about ways to make `save_pdf` support this better. \r\n\r\nWhat I currently do for my games is:\r\n  * For prototyping I print to regular paper on separate sheets. Put in sleeves that also have a piece of cardstock in them to give the cards. That means you make two separate `Squib::Deck` calls, but still from the same Excel sheet. \r\n  * For nicer prototypes I use TheGameCrafter, which means I just make my backs separately (e.g. in Gimp) and upload them without using Squib. But I also don't usually have tons of different backs in my games yet, so this approach may get tedious. \r\n\r\nIf you want to print to paper double-sided, `save_pdf` does give you control over `margin` and `gap`, so you can print two separate pdfs. Just run the paper through the printer again, making sure you get the right margins and orientation. I have not done this, but it's technically feasible. \r\n\r\nBut, I don't have anything that would work, say, for duplex printing where we interleave the pages and let the printer reverse it. \r\n\r\nOr there's another situation whee you have cards line up along their bottoms (i.e. top row of cards are fronts, bottom row of cards are upside down backs) so you can fold them in the middle. You *could* create a *third* `Squib::Deck` that takes the output of a prior `Squib::Deck`s and arranges them yourself on a \"card\" that's 8.5x11, rotating along the bottom. Technically feasible, but kinda yucky.\r\n\r\nEventually I'd like to make `save_pdf` handle multiple `Squib::Deck` classes, and then arrange them in a variety of ways to support these other workflows. The code for `save_pdf` now certainly can be generalized. Something like this is what I envision:\r\n\r\n```ruby\r\nfronts = Squib::Deck.new do\r\n  # make your fronts here\r\nend\r\n\r\nbacks = Squib::Deck.new do\r\n # make your backs here\r\nend\r\n\r\nSquib.save_pdf(decks: [fronts, backs], method: :duplex) # front page, then back page\r\n``` \r\nOr, perhaps have Squib be aware of what's front and what's back. Something like a ubiquitous argument `face: :front`, (and then always default to `:front`). What I don't like about this approach is (a)introducing a new option *everywhere* is annoying, (b) it can make your builds slower. \r\n\r\nFor me, the cleanest option is to create separate Ruby files, e.g. `fronts.rb` and `backs.rb`, then have my `Rakefile` look like this:\r\n\r\n```ruby\r\ntask default: [:fronts]\r\n\r\ntask :fronts { load 'fronts.rb' }\r\ntask :backs { load 'fronts.rb' }\r\ntask :all => [:fronts, :backs]\r\n```\r\n\r\nGiven that there already is a physical process for handling fronts and backs with separate PDFs, though, and given how complex it will be to properly handle things like duplex printing and interleaving cards, this idea has been low priority for me.\r\n\r\nBut, in the short term, I should document some these ideas in the README, \r\n  - [ ] Document some of these ideas in the README\r\n  - [ ] Make a sample or two about backs"}}