2 PDF templates to 1 PDF file

chillipit

New Member
I am using pdf_inc to create a PDF document. The template I am using is also a PDF document.

I now have to add a 2nd page to the final PDF document. Based on certain conditions being met the program needs to select the 2nd from a number of templates.

So I have a standard 1st page but then various 2nd pages.

How do I open and output the 2nd file.
This is what I have so far:

Opening the first template
Code:
RUN pdf_new ("Spdf":U,cSaveFileName).
RUN pdf_new_page("Spdf":U).
RUN pdf_open_PDF("Spdf":U,cTemplateFileName,"ParticipationCertificate":U + cSeqNo).

Then there's setting of fonts and margins etc.

Now I want to open the 2nd page but I'm not sure how to go about doing this:
Code:
RUN pdf_new_page("Spdf":U).
RUN pdf_open_PDF("Spdf":U,cTemplate2ndpage,"ParticipationCertificate":U + cSeqNo).

I get the error that it cannot find the 'ParticipationCertificate' in pdf_open_PDF

Should I be using the same stream Spdf or should I be using a 2nd stream and if so how do I instantiate the 2nd?
 
If your pages are 30 lines per page for example, then if line count is > 30 then do:
RUN pdf_new_page IN h_PDFinc ("Spdf").
RUN pdf_use_PDF_page("Spdf","tmp",1).

run p-header. /*if required*/
end.

/*Continue to print lines here*/
 
Back
Top