Vocabulary
pdf.layout

Inputs
pdfan object


Outputs
objectsan object


Definition


:: pages>objects ( pdf -- objects )
[
pdf info>> pdf-value , pdf-catalog , {
T{ font
{ name "sans-serif" }
{ size 12 }
{ foreground
T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
}
}
{ background
T{ rgba
{ red 1.0 }
{ green 1.0 }
{ blue 1.0 }
{ alpha 1.0 }
}
}
}
T{ font
{ name "serif" }
{ size 12 }
{ foreground
T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
}
}
{ background
T{ rgba
{ red 1.0 }
{ green 1.0 }
{ blue 1.0 }
{ alpha 1.0 }
}
}
}
T{ font
{ name "monospace" }
{ size 12 }
{ foreground
T{ rgba
{ red 0.0 }
{ green 0.0 }
{ blue 0.0 }
{ alpha 1.0 }
}
}
{ background
T{ rgba
{ red 1.0 }
{ green 1.0 }
{ blue 1.0 }
{ alpha 1.0 }
}
}
}
} {
[ [ f >>bold? f >>italic? pdf-value , ] each ]
[ [ t >>bold? f >>italic? pdf-value , ] each ]
[ [ f >>bold? t >>italic? pdf-value , ] each ]
[ [ t >>bold? t >>italic? pdf-value , ] each ]
} cleave pdf pages>> length pdf-pages ,
pdf pages>> dup length 16 swap 2 range boa zip
[ pdf-page , , ] assoc-each
] { } make dup length [1,b] zip [ first2 pdf-object ] map ;