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.
39 lines
966 B
Racket
39 lines
966 B
Racket
8 years ago
|
#lang at-exp s-exp pitfall/render
|
||
|
|
||
|
;; catalog object
|
||
|
(co-io 1 0 (co-catalog #:pages (co-io-ref 2 0)))
|
||
|
|
||
|
;; pages
|
||
|
(co-io 2 0 (co-pages #:kids (list (co-io-ref 3 0))
|
||
|
#:count 1))
|
||
|
;; page
|
||
|
(co-io 3 0 (co-page #:parent (co-io-ref 2 0)
|
||
8 years ago
|
#:mediabox '(0 0 400 400)
|
||
8 years ago
|
#:contents (co-io-ref 5 0)
|
||
8 years ago
|
; the value of annots must be an array
|
||
|
#:annots (co-array (list (co-io-ref 7 0)))))
|
||
8 years ago
|
|
||
|
|
||
|
;; contents
|
||
|
(co-io 5 0
|
||
|
(make-co-stream
|
||
8 years ago
|
#"
|
||
|
BT
|
||
|
0.9 g
|
||
|
100 100 100 100 re
|
||
|
F
|
||
|
ET
|
||
|
"))
|
||
8 years ago
|
|
||
8 years ago
|
(co-io 7 0
|
||
8 years ago
|
(make-co-dict 'Type 'Annot
|
||
|
'Subtype 'Link
|
||
|
;; rect is left bottom right top in page coordinates
|
||
|
'Rect (co-array '(125 125 175 175))
|
||
|
'A (co-io-ref 8 0)))
|
||
|
|
||
8 years ago
|
|
||
|
(co-io 8 0
|
||
8 years ago
|
(make-co-dict 'Type 'Action
|
||
|
'S 'URI
|
||
|
'URI (co-string "http://practicaltypography.com")))
|