Skip to content

Instantly share code, notes, and snippets.

@bradediger
Created March 14, 2011 15:38
Show Gist options
  • Select an option

  • Save bradediger/869329 to your computer and use it in GitHub Desktop.

Select an option

Save bradediger/869329 to your computer and use it in GitHub Desktop.
label_count.times do |i|
pos = i % 20 # pos = label's position on the page (0-19)
pdf.start_new_page if pos == 0 # start new page for the first label on each page
box = pdf.grid(pos/4, pos%4) # lay labels out in 4 columns
# (print label in box)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment