Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2720

Re: How to merge different abap-list spools, xstrings or binary files to one PDF

$
0
0

Hi,

 

As i said we  use the pdf merge solution:

 

The zca_spool_to_pdf  program is essentialy for the code in my post obove.

 

This merge several lists...

 

...

  form merge_pdf.
   field-symbols: <l_xline>  type x.

   create object pdfmerge.

   clear pdf.
   loop at it_rqid into wa_rqid.
     clear: it_pdf[].
     submit zca_spool_to_pdf with p_rqid = wa_rqid-rqident
                             with p_mem = 'X'
                             with p_memid = 'MERGEPDF'
                             with p_fich = p_fich
                             and return.
     import it_pdf
              from memory id 'MERGEPDF'.
     loop at it_pdf into wa_pdf.
       assign wa_pdf to <l_xline> casting.
       concatenate pdf <l_xline> into pdf in byte mode.
     endloop.

     pdfmerge->add_pdf( pdf ).
   endloop.
   pdfmerged = pdfmerge->get_merged( ).

   if p_memid is initial.
     open dataset p_fich for output in binary mode.
     transfer pdfmerged to p_fich.
     close dataset p_fich.

     call function 'WS_EXECUTE'
       exporting
         document = 'X'
         program  = p_fich.
   else.
     export pdfmerged to memory id 'ZCA_MERGE_PDF'.
   endif.
endform.                    " MERGE_PDF



Regards,

Maria João Rocha



Viewing all articles
Browse latest Browse all 2720

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>