Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple page content stream APIs #30

Open
michaelrsweet opened this issue May 17, 2022 · 1 comment
Open

Add multiple page content stream APIs #30

michaelrsweet opened this issue May 17, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request priority-high
Milestone

Comments

@michaelrsweet
Copy link
Owner

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);
@michaelrsweet michaelrsweet self-assigned this May 17, 2022
@michaelrsweet michaelrsweet added enhancement New feature or request priority-high labels May 17, 2022
@michaelrsweet michaelrsweet added this to the v1.1 milestone May 17, 2022
@michaelrsweet michaelrsweet modified the milestones: v1.1, v1.2 Feb 4, 2023
@michaelrsweet michaelrsweet modified the milestones: v1.2, Future Dec 6, 2023
@michaelrsweet
Copy link
Owner Author

Moving this to the "future" milestone - not critical to support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high
Projects
None yet
Development

No branches or pull requests

1 participant