cancel
Showing results for 
Search instead for 
Did you mean: 

Merge Adobe printform pdf strings into 1 pdf

0 Kudos

Hi,

I would like to grab the contents of the return value of a Adobe form using the return value fpformoutput-pdf

In my simple mind I thought I could concatenate all of the different fpformoutput-pdf (e.g.when I look 10 invoices and make 10 calls to the form) and then save that hugh line as 1 pdf.

I indeed get 1 pdf with the total size of the individual pdf's but when I open it I only see the first document. I can only assume that each pdf string has a identifier like begin of form, begin page end page, end form and somehow I need to strip it of the individual forms and join the forms into pages.

Anybody any ideas?

Thanks!

Frans

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

You cannot merge the forms easily in SAP, but you can bundle the forms together: you can generate a form (a main one) and some other forms attach to it (as ordinary emaile attachment). Check the attachment icon on the left bottom in the adobe reader, here you can add other "attached" forms. Next you can delete them, save them, print them etc.

You cannot see everything at one moment, but mostly this can suffice. Like when you print a header as a main form, attach lines as an attached form, next you add report1 result as next attached form etc.

Check report (SE38) FP_PDF_TEST_16 which can help you with the technical details of the development of such a solution.

Hope this can at least partially help.

Have a nice day, Otto

kmoore007
Active Contributor
0 Kudos

It's been a while since this was first posted. Anyone get this to work?

brad_bohn
Active Contributor
0 Kudos

Sandra's response hints at the required process, though it's not a true internal solution. There was a wiki posted on it a while ago as well but it wasn't very slick. The code basically dumped the PDF files into an app server directory with a common naming convention, used an operating system command to trigger a 3rd party PDF tool that does the merging, then read back the resulting file from the folder, and then cleaned up the folder.

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor

PDF forms don't work like sapscript and smart forms, you can't merge into one PDF file. The only positive answer I saw within SAP is in [NW 7.01 + CE, see chapter "Output of multiple form templates in a single PDF"|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40638d89-66ae-2b10-bd8b-dd665e28f906&overridelayout=true]. Otherwise, use an third-party software to merge several PDFs into one.

0 Kudos

Thanks Sandra,

I looked at the info but we have no 7.11 yet. I was wondering if anybody knew the parameters for either fpformoutput or sfpdocparams. so I could see this new parameters.

thanks!

Frans

abo
Active Contributor
0 Kudos

Just in case someone looking for info comes across this answer, the situation is now (2023) a bit changed:

  • with class CL_RSPO_PDF_MERGE you can merge PDF files, with some restrictions
  • with ADS a second file can be added as additional attachment to an original file (see demo FP_PDF_TEST_16)