I was attempting to use this functionality to open a document and merge it into the current document that i was building. I ran into issues with this, and no pages were added. I then created a small test program that created a pdf and a new page, wrote to the new page, created a second stream, wrote to the second stream and finally performed a merge on the two streams. The new page was created for the merge but no content was moved over. After the merge I performed a pdf_close on both streams. The test program I wrote was a simple 8-10 line program and it wrote both files successfully, it just didn't merge the two streams when they were both open and active. I will copy code below from the test program. You will notice from the files attached, test1.pdf is where the files should be merged to, the extra page is present for the merge, but the content from test2.pdf is not there, also, test2.pdf is written to.
{pdf_inc.i}
RUN pdf_new("pdf", "C:\temp\pdfinclude\test1.pdf").
RUN pdf_new("spdf", "C:\temp\pdfinclude\test2.pdf").
RUN pdf_new_page("spdf").
RUN pdf_new_page("pdf").
RUN pdf_text_align ("pdf","Hello, I'm johnny Cash","left", 100, 600).
RUN pdf_text_align ("spdf","Hi, I'm test2","left", 100, 300).
RUN pdf_merge_stream("spdf", "pdf", 1).
RUN pdf_close("spdf").
RUN pdf_close("pdf").
Thank you
file to be merged to