Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle Pagination for merged PDF files?

mustafa_74199
Participant
0 Kudos
858

Hi,

I have 3 PDF documents which are generated with Adobe Forms.

I can merge them using CL_RSPO_PDF_MERGE:

But i can't handle the pagination. Do you have an idea?

Let me explain.

1st PDF has 3 pages.

2nd PDF has 2 pages.

3rd PDF has 4 pages.

Page numbers should start like 'Page 1 of 9'.

And end like 'Page 9 of 9' at the last page.

Best Regards

Mustafa

2 REPLIES 2

dominik_jacobs
Participant
0 Kudos
764

can you provide more informations how you use the methode "set_pagination".

Cause

lr_pdf_merge->set_pagination(
page_number = 'your page number'
....
)

works for me.

BR

Dom

mustafa_74199
Participant
0 Kudos
764

Hi Dominik,

I can't see the method 'set_pagination' in the class. Here are the methods. (Maybe i missed an update.)

Step_1: I found a workaround by myself. I open the job, generate the 3 PDFs first, get the page numbers of documents seperately, then close the job.

Step_2: I open the job again and this time i generate the PDFs again. There are 2 fields in the interfaces of the documents. First one is the number of pages in above documents. Second one is the number of total page numbers. And inside Adobe Form, i wrote a custom logic for the calculation on 'Page n of m'. So, pagination of second document starts with the number 'page number of first document + 1' and total page is taken from the relevant field of interface. Similarly pagination of third document starts with the number 'page number of first document + page number of second document + 1' and total page is taken from the relevant field of interface.

It works fine.

Regards