pdc_id pdc_begin_obj(pdc_output *out, pdc_id obj_id) { if (obj_id == PDC_NEW_ID) obj_id = pdc_alloc_id(out); out->file_offset[obj_id] = pdc_tell_out(out); pdc_printf(out, "%ld 0 obj\n", obj_id); return obj_id; }
void pdc_end_pdfstream(pdc_output *out) { if (out->compresslevel) pdc_end_compress(out); out->length = pdc_tell_out(out) - out->start_pos; /* some PDF consumers seem to need the additional "\n" before "endstream", ** the PDF reference allows it, and Acrobat's "repair" feature relies on it. */ pdc_puts(out, "\nendstream\n"); }