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.
15 lines
801 B
Racket
15 lines
801 B
Racket
#lang racket/base
|
|
(require racket/class rackunit "document.rkt" "page.rkt" "reference.rkt" "helper.rkt")
|
|
(define p (make-object PDFPage (make-object PDFDocument)))
|
|
(check-equal? (· p size) "letter")
|
|
(check-equal? (· p layout) "portrait")
|
|
(check-equal? (· p margins) '#hasheq((right . 72) (bottom . 72) (left . 72) (top . 72)))
|
|
(check-equal? (· p height) 792.0)
|
|
(check-equal? (· p width) 612.0)
|
|
(check-equal? (· p resources data ProcSet) '("PDF" "Text" "ImageB" "ImageC" "ImageI"))
|
|
|
|
(check-equal? (· p dictionary data Type) "Page")
|
|
(check-equal? (· p dictionary data MediaBox) '(0 0 612.0 792.0))
|
|
(check-true (is-a? (· p dictionary data Contents) PDFReference))
|
|
(check-true (is-a? (· p dictionary data Resources) PDFReference))
|
|
(check-true (is-a? (· p dictionary data Parent) PDFReference)) |