Open michaelrsweet opened 2 years ago
Currently the PDF write API only supports a single page content stream, while the read API supports an arbitrary number of streams, as supported by the PDF format.
Proposed API:
extern pdfio_obj_t *pdfioFileCreatePageObj(pdfio_file_t *pdf, pdfio_dict_t *dict) _PDFIO_PUBLIC; extern pdfio_stream_t *pdfioPageCreateStream(pdfio_obj_t *page, pdfio_filter_t compression) _PDFIO_PUBLIC;
Usage:
pdfio_file_t *pdf; // PDF file pdfio_obj_t *page; // Page object pdfio_dict_t *dict; // Page dictionary page = pdfioFileCreatePageObj(pdf, dict); pdfio_stream_t *st1, *st2; st1 = pdfioPageCreateStream(page, PDFIO_FILTER_FLATE); // write some page content commands to the stream pdfioStreamClose(st1); st2 = pdfioPageCreateStream(page, PDFIO_FILTER_NONE); // write some page content commands to the stream pdfioStreamClose(st2); // Close the page object to write it out... pdfioObjClose(page);
Moving this to the "future" milestone - not critical to support.
Also lowered the priority because you can merge multiple streams when writing anyways...
Currently the PDF write API only supports a single page content stream, while the read API supports an arbitrary number of streams, as supported by the PDF format.
Proposed API:
Usage: