Beispiel #1
0
void
pdf_dict_insert_string(dict *d, char *k, char *s, int n)
{
    pdf_obj *val;
    pdf_obj key = pdf_key_to_obj(k);

    val = pdf_string_new(s, n);
    dict_insert(d, (char*)key.value.k, (void*)val);
}
Beispiel #2
0
pdf_obj *
pdf_datestring_create()
{
    time_t     t;
    struct tm *tmp;
    char       buf[128];

    t = time(0);
    tmp = localtime(&t);
    if (tmp)
    {
        strftime(buf, 128, "D:%G%m%d%H%M%S%z00", tmp);
        return pdf_string_new(buf, strlen(buf));
    }
    return 0;
}