Interactive Adobe. Part 19. How to Merge an Image File with an Adobe PDF?

Interactive Adobe. Part 19. How to Merge an Image File with an Adobe PDF?
Trick to merge images and adobe form

We are going to see Interactive Adobe. Part 19. How to Merge an Image File with an Adobe PDF? It is an exceptionally normal business situation where we want to add a picture (jpg/bmp and so forth) in an adobe structure. We can utilize Picture Field UI and tie the necessary picture. However, the present point is unique. How to Merge an Image File with an Adobe PDF? 

Be that as it may, how we can combine a picture in existing structures in Adobe? As of late, one of our message bunch individuals asked answer for this case and arrangement prospects. His prerequisite was to connect the pictures saved in PO Conventional Article Administrations (GOS) and show alongside PO Result Structure. Assuming that there are 2 picture documents (for the most part in “.jpg”) saved at Buy Request, these ought to be converged with PO Result structure and send it back to merchant. To put it plainly, the necessity was to combine the picture records in GOS of PO alongside the PDF PO Result Structure.

After some head scratching and cool thinking, the below two steps looked a good start:

  1. Convert a JPG record into PDF Crude Information.
  2. Combine the Picture PDF Crude Information with existing Adobe structure.

Let us dig into the actual technicalities now.

1. Create an Adobe form ZPB_TEST_CONVERT_JPG, Interface ZPB_TEST_CONVERT_JPG with an import parameter as GV_CONTENT of type XSTRING.

2. In context of form, create a Graphics Node as follow:

3. Set the graphics node properties as follow:

4. Create an Image field UI in form layout and bind it with GRAPHICS node created in the context.

We are finished with production of first Adobe structure in which any picture from driver program can be transferred as need might arise to be converged with any current Adobe structure.

Then, I have made another Adobe structure ZPB_HIDE_TABLE_COLUMN with basic table showcase. Simply make one adobe and hard code a few table qualities. This will behave like our second PDF record which we need to combine.

5. Create a driver program with the below steps:

i. Call FP_JOB_OPEN

ii. Generate FM for 1st Adobe form:

iii. Upload an image file from local system.

iv. Convert Binary data into Raw data :

v. Call FM for 1st Adobe Form from step 1 and collect it’s Raw data into an internal table GT_PDF:

vi. Call second Adobe structure in which we need to blend the picture as PDF and gather it’s Crude information in the interior table GT_PDF:

vii. Now, merge both the PDFs (1st Image, 2nd Adobe Form PDF) into one PDF.

LO_CL_MERGE is an object of class cl_rspo_pdf_merge. For additional insights concerning this class and different functionalities, if it’s not too much trouble, allude the underneath connect:

viii. Close the form processing as:

ix. Presently, you can produce the outcome combined PDF (GV_MERGE) from above step vii with the accompanying code:

Testing Time: 

Execute the driver program. Select a picture record from your nearby framework and save the consolidated PDF in your neighborhood drive:

Trust you could bring back home the arrangement. To the surprise of no one, there may be other better ways of doing likewise, however this is the first and the easiest arrangement I can imagine.

Assuming you have a few different considerations, if it’s not too much trouble, go ahead and write in the remarks segment beneath.

In this turn of events, we did nothing new. We just executed what we have realized and performed freely in other business necessities. We knew how to change the information over completely to Crude. We knew how to make Adobe Structures. We new how to get Crude information of the Adobe Structures. We knew how to blend PDF records. What we did was simply uniting this responses to one. At the point when we joined every one of the independent deceives it became one arrangement and this makes you the specialized draftsman of your group.

 

YOU MAY LIKE THIS

Introduction to the schema of ABAP in SAP HANA

The World of ABAP Consultants: Unlocking the Power of SAP

The setup you Courses for SAP ABAP on HANA training instance in CAL

WhatsApp WhatsApp us