@ -8,7 +8,10 @@
(provide (all-defined-out))
(define (current-page doc) (car (pdf-pages doc)))
(define (current-page doc)
(match (pdf-pages doc)
[(? pair? ps) (car ps)]
[_ (raise-argument-error 'current-page "no pages in pdf" doc)]))
(define (add-content doc data)
(page-write (current-page doc) data))