Help required with pdf_merge_stream with multi-page documents

Project:PDF Include project
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello all

I am having problems merging multi-page documents onto one document using pdf_merge_stream. Be grateful if someone could let me know if this is a bug, or if I'm doing something wrong.
Running OpenEdge 10.2B with pdfInclude 3.3.3

I've pasted the code I'm using below. It's a stripped out version of what I'm planning to do. It creates 2 pdf files, file1.pdf and file2.pdf, both of which contain 2 pages. It also create summary.pdf. What I am trying to achieve is for the summary file to have 4 pages, the first 2 pages being the content of fileA.pdf, and the pages 3 and 4 being the content of file2.pdf.
What I am getting is a 4 page summary.pdf, with
page 1 shows Test Doc 1 - page 1,
page 2 is blank
page 3 shows Test Doc 2 - page 1,
page 4 is blank

Thanks in advance for any help on this.

Andrew Jackson

{ pdf_inc.i "THIS-PROCEDURE" }

RUN pdf_new ("Spdf2","summary.pdf").
RUN pdf_new ("Spdf","file1.pdf").

RUN pdf_new_page("Spdf").
RUN pdf_text ("Spdf", "Test Doc 1 page 1").
RUN pdf_new_page("Spdf").
RUN pdf_text ("Spdf", "Test Doc 1 page 2").
RUN pdf_merge_stream ("Spdf", "Spdf2", 1).
RUN pdf_close("Spdf").

RUN pdf_new ("Spdf","file2.pdf").
RUN pdf_new_page("Spdf").
RUN pdf_text ("Spdf", "Test Doc 2 page 1").
RUN pdf_new_page("Spdf").
RUN pdf_text ("Spdf", "Test Doc 2 page 2").
RUN pdf_merge_stream ("Spdf", "Spdf2", 1).
RUN pdf_close("Spdf").

RUN pdf_close("Spdf2").


AttachmentSize
summary.pdf4.17 KB