"/Type /Catalog"
"/Pages 15 0 R"
">>"
- } "\n" join ;
+ } unlines ;
: pdf-pages ( n -- str )
[
"/Kids [ " "]" surround ,
] bi
">>" ,
- ] { } make "\n" join ;
+ ] { } make unlines ;
: pdf-page ( n -- page )
[
"/F10 12 0 R /F11 13 0 R /F12 14 0 R" ,
">> >>" ,
">>" ,
- ] { } make "\n" join ;
+ ] { } make unlines ;
: pdf-trailer ( objects -- str )
[
"startxref" ,
[ length 1 + ] map-sum 9 + "%d" sprintf ,
"%%EOF" ,
- ] { } make "\n" join ;
+ ] { } make unlines ;
SYMBOLS: pdf-producer pdf-author pdf-creator ;
dup length [1,b] zip [ first2 pdf-object ] map ;
: objects>pdf ( objects -- str )
- [ "\n" join "\n" append "%PDF-1.4\n" ]
+ [ unlines "\n" append "%PDF-1.4\n" ]
[ pdf-trailer ] bi surround ;
! Rename to pdf>string, have it take a <pdf> object?