   draw_book (draw_page) ->
     draw_page()
     ctx.addPage()
-  fs.writeFile BuildDirectory + filename, canvas.toBuffer()
+  fs.writeFile BuildDirectory + filename + ".pdf", canvas.toBuffer()
 
 
 #


intervals_book = ({by_root}) ->
  if by_root
    book "Fretboard Intervals by Root.pdf", (page) ->
      finger_positions_each (fingering) ->
        page -> intervals_from_position_page fingering
  else
    book "Fretboard Intervals.pdf", (page) ->
      for _, semitones in Intervals
        page -> intervals_page semitones

chord_fingerings_page = (chord, root_note) ->
  fingerings = fingerings_for(chord, root_note)
  filename "Fingerings"
  cols = 10
  rows = 10
  grid {cols, rows, cell_width: padded_fretboard_width + 10, cell_height: padded_fretboard_height + 5}, (cell) ->
    for fingering, i in fingerings[...(cols * rows)]
      cell -> draw_fingerboard(fingering)

chord_page = (chord, options) ->

  page cols * cell_width, header_height + rows * cell_height, (ctx) ->
    i = 0
    draw_page (draw_cell) ->
      return if i >= cols * rows
      ctx.save()
      ctx.translate (i % cols) * cell_width, header_height + Math.floor(i / cols) * cell_height
      draw_cell()
