Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents


Introduction

...

The File Add Image Tool plugin is used to add uploaded images on every page of an uploaded PDF File or image file. Supports multiple file uploads.

...

Get Started

To see how the PDF File Add Image Tool actually functions, we should first create an app. Here are the steps for this process:

Steps To Import This Plugin

...

This plugin source code is available in JogetOSS repository at https://github.com/jogetoss/

...

2. Go to the "Releases" page (See Figure 1).

Image Removed

Figure 1

3. Click on the .jar file to initiate the download (see Figure 2).

Image Removed

Figure 2

4. Go to your Joget localhost or server and login as admin.

5. In Joget Console navigate to "Admin Bar>Systems Settings>Manage Plugins" and click the "Upload Plugins" button.

6. In "Upload Plugin", select the plugin .jar file you downloaded, then click "Upload".

7. You should be able to view the newly installed plugin under the Installed Plugins tab.

8. Remember to always uninstall the old plugin before uploading a new version.

The Joget Knowledge Base has more information on managing and developing plugins.

Steps to use the Plugin

...


File Add Image Tool Properties

Configure File Add Image Tool

Name

Description

Source File

Header

Choose Form *

Form where field for source file resides

Choose Field *

Field of source file

Record Id

Record ID of process, if not filled, default value will be current process record ID.

Source Image

Header

Choose Form *

Form where field for source image resides

Choose Field *

Field of source image

Record Id

Record ID of process, if not filled, default value will be current process record ID.

Output File

Header

Choose Form *

Form where field for output file resides

Choose Field *

Field of output file

Record Id

Record ID of process, if not filled, default value will be current process record ID.

How to create app to use plugin from scratch

You can skip this section if you plan to use the demo app. 

1. Start the Joget server and open the App Center.


2. Login as admin and click on Design New App or click on existing application (See Figure 3).

Image Modified

Figure 3


3. For new applications, fill up the App ID and App Name then proceed to click on the Save button (See Figure 4).

Image Modified

Figure 4


4. Let's start with creating a form that'll serve for uploading the original PDF and obtaining the edited PDF, fill up the form ID and form name and Save the form (See Figure 5).

Image Modified

Figure 5


5. Add 2 File Upload elements to the form and name them PDF Upload and PDF Output, then Save the form (See Figure 6).

Image Modified

Figure 6


6. After saving the form, use the Generate menu to Generate a List for this form (Figure 7).

Image Modified

Figure 7


7. Now let's create another Form to upload the image that shall be added to the PDF, fill up the form ID and form name and Save the form (Figure 8).

Image Modified

Figure 8


8. Add a File Upload element to the form and name it Image Upload (Figure 9). Save the form, and then from the Generate menu, generate a List (Figure 10).

Image Modified

Figure 9


Image Modified

Figure 10


9. Go to the List that has just been created (List - Add Images), and add the ID column to the list and then Save the List (Figure 11). 

Image Modified

Figure 11


10. Navigate back to the Add PDF Form, and select Settings > Advanced. Select PDF Add Image File as the Post From Submission Processing Tool (Figure 12).

Image Modified

Figure 12


11. Configure the plugin as shown in Figure 13.

Image Modified

Figure 13


12. Now let's create a UI to interact with all the components we just created. After creating the UI, Create 2 UI Categories, Name one PDF Setup and the other Image Setup (Figure 14).

Image Modified

Figure 14


13. Add a Form UI Menu and a CRUD UI menu to the PDF Setup Category , and configure them as shown in Figures 15 &16. 

Image Modified

Figure 15


Image Modified

Figure 16


14. In the Image Setup Category, add a Form UI Menu and a List UI Menu. Configure them as shown in Figures 17 & 18.

Image Modified

Figure 17


Image Modified

Figure 18


15. Save the UI, and Launch the Application.

Plugin Usage

...

1. Start with uploading your chosen image to add to the PDF in the Add Image Form (Figure 19). 

Image Modified

Figure 19

...


2. Navigate to the Images List, Take note of the Record ID and save it to your clipboard (Figure 20).

Image Modified

Figure 20

...


3. Navigate back to the Add PDF Form, and add the saved Record ID to the plugin settings as shown in Figure 21. Save the Form.

Image Modified

Figure 21

...


4. In the Application, navigate to the Add PDF Form UI menu, upload your chosen PDF to the PDF Upload element (Figure 22) and Save your addition. You can also upload multiple files, and upload image file type.

Image Modified

Figure 22

...


5. Navigate to the PDF List CRUD Menu, and select the record you have just created. There you should see the

...

new PDF with image appended in the PDF Output element Figure 23.

Image Modified

Figure 23

...


Sample App Download

...

...