pdf-value ( obj -- str )


Vocabulary
pdf.values

Inputs
objan object


Outputs
stran object


Definition


Methods




M: f pdf-value drop "false" ;



M: font pdf-value
[
"<<" , "/Type /Font" , "/Subtype /Type1" , {
[
name>> {
{ "sans-serif" ~quotation~ }
{ "serif" ~quotation~ }
{ "monospace" ~quotation~ }
[ " is unsupported" append throw ]
} case
]
[
[ bold?>> ] [ italic?>> ] bi or
[ "-" append ] when
]
[ bold?>> [ "Bold" append ] when ]
[ italic?>> [ "Italic" append ] when ]
[
name>> { "sans-serif" "monospace" } member?
[ "Italic" "Oblique" replace ] when
]
} cleave "/BaseFont " prepend , ">>" ,
] { } make join-lines ;



M: hashtable pdf-value
[
"<<\n" % [ swap % " " % pdf-value % "\n" % ] assoc-each
">>" %
] "" make ;





















M: timestamp pdf-value "%Y%m%d%H%M%S" strftime "D:" prepend ;