pdf-value ( obj -- str )


Vocabulary
pdf.values

Inputs and outputs
objan object
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 ]
} cleave "/BaseFont " prepend , ">>" ,
] { } make "\n" join ;






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 ;