void pdf_put_pdfname(PDF *p, const char *name) { char *ascname = (char *) name; int len = (int) strlen(ascname); pdc_put_pdfname(p->out, ascname, len); }
void pdf__end_font(PDF *p) { int i; pdc_t3font *t3font; PDF_SET_STATE(p, pdf_state_document); t3font = p->t3font; t3font->charprocs_id = pdc_alloc_id(p->out); pdc_begin_obj(p->out, t3font->charprocs_id); /* CharProcs dict */ pdc_begin_dict(p->out); for (i = 0; i < t3font->next_glyph; i++) { pdc_put_pdfname(p->out, t3font->glyphs[i].name, strlen(t3font->glyphs[i].name)); pdc_printf(p->out, " %ld 0 R\n", t3font->glyphs[i].charproc_id); } pdc_end_dict(p->out); pdc_end_obj(p->out); /* CharProcs dict */ pdc_begin_obj(p->out, t3font->res_id); pdc_begin_dict(p->out); /* Resource dict */ pdf_write_page_fonts(p); /* Font resources */ pdf_write_page_colorspaces(p); /* Color space resources */ pdf_write_page_pattern(p); /* Pattern resources */ pdf_write_xobjects(p); /* XObject resources */ pdc_end_dict(p->out); /* Resource dict */ pdc_end_obj(p->out); /* Resource object */ p->t3font = (pdc_t3font *) NULL; if (p->flush & pdf_flush_content) pdc_flush_stream(p->out); }