Vocabulary
pdf.layout

Inputs
objectsan object


Outputs
stran object


Definition


: pdf-trailer ( objects -- str )
[
"xref" , dup length 1 + "0 %d" sprintf ,
"0000000000 65535 f" , 9 over
[ over "%010X 00000 n" sprintf , length 1 + + ] each
drop "trailer" , "<<" , dup length 1 +
"/Size %d" sprintf , "/Info 1 0 R" , "/Root 2 0 R" ,
">>" , "startxref" , [ length 1 + ] map-sum 9 +
"%d" sprintf , "%%EOF" ,
] { } make "\n" join ;