You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
852 B
Racket
21 lines
852 B
Racket
#lang racket/base
|
|
(require racket/class
|
|
rackunit
|
|
"document.rkt"
|
|
"page.rkt"
|
|
"reference.rkt"
|
|
"core.rkt"
|
|
sugar/unstable/js)
|
|
(define p (make-object PDFPage (make-object PDFDocument)))
|
|
(check-equal? (· p size) "letter")
|
|
(check-equal? (· p layout) "portrait")
|
|
(check-equal? (· p margins) (margin 72 72 72 72))
|
|
(check-equal? (· p height) 792.0)
|
|
(check-equal? (· p width) 612.0)
|
|
(check-equal? (· p resources payload ProcSet) '("PDF" "Text" "ImageB" "ImageC" "ImageI"))
|
|
|
|
(check-equal? (· p dictionary payload Type) "Page")
|
|
(check-equal? (· p dictionary payload MediaBox) '(0 0 612.0 792.0))
|
|
(check-true (is-a? (· p dictionary payload Contents) PDFReference))
|
|
(check-true (is-a? (· p dictionary payload Resources) PDFReference))
|
|
#;(check-true (is-a? (· p dictionary payload Parent) PDFReference)) |