Skip to Content
avatar image
Former Member

Very large PDFs using bundling


Hi

I got the bundling bit working, by setting the following output parameeters of fm FP_JOB_OPEN:

BUMODE = 'M'

GETPDF = 'M'

ASSEMBLE = 'S'

Right at the end, when calling fm FM FP_JOB_CLOSE, the output parameters are set to the following:

FORMCOUNT = 22

REMAINING_PAGES = 44

The above looks correct, because there are 44 pages in the generated PDF document, consisting of 22 forms.  Each new form starts page numbering at page 1.

How do I number all 44 pages, using the same page number range, starting at page 1?  (In reality i could have 1000s of pages)

For example:

PAGE 1 OF 3

PAGE 2 OF 3

PAGE 3 OF 3

PAGE 1 OF 2

PAGE 2 OF 2

Should be

PAGE 1 OF 5

PAGE 2 OF 5

PAGE 3 OF 5

PAGE 4 OF 5

PAGE 5 OF 5

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 06, 2015 at 02:01 PM

    Seems I found a possible solution:

    Generate forms in batches, but with bundling disabled.  The SFP function module returns structure FPFORMOUTPUT that contains field PAGE.  So for each batch, I now have a page count.

    Now re-generate the forms, but with bundling enabled, and by passing the page count as a parameter to the SFP function module.  Within each batch, add 1 to the page count using client-side scripting.

    At the end, call fm FP_GET_PDF_TABLE that contains the entire PDF, with the correct page numbers.     

    I'm over-simplifying, maybe it's a good topic for my first blog

    Add comment
    10|10000 characters needed characters exceeded