libharu/libharu — pull request #24 by FinnAr (2012-10-23 21:10:04+00:00)
Title: Added functions to support multiple content streams on a page

This update provides two functions:

HPDF_EXPORT(HPDF_STATUS)
HPDF_Page_New_Content_Stream (HPDF_Page page,
HPDF_Dict* new_stream);

and

HPDF_EXPORT(HPDF_STATUS)
HPDF_Page_Insert_Shared_Content_Stream (HPDF_Page page,
HPDF_Dict* shared_stream);

Call HPDF_Page_New_Content_Stream whenever you want to change to a new content stream
on the page. The call can return a reference to the new content stream in new_stream. This reference can be used on a later page to call HPDF_Page_Insert_Shared_Content_Stream.

The use case is when you need to place a considerable amount of identical content on multiple pages. On the first occurence of the content, call HPDF_Page_New_Content_Stream before you start creating the content, in order to place the content in a separate stream. Call HPDF_Page_New_Content_Stream again after you have finished the content. Then, on subsequent pages, call HPDF_Page_Insert_Shared_Content_Stream to place the content on the page.