238
Views
9
Comments
Solved
Merging multiple pdfs into a single pdf for reactive application.
Application Type
Reactive

Hi friends,

Hope you are doing well.  I want to merge multiple pdf into a  single pdf. To do this I have used two components from Forge namely PDF Tools and Pdf Merger.


For both the components I, debugged the code and found its throwing a error 504 "An error was raised by the application Request failed"

Please help me to resolve this issue or help me to find other ways to obtain this functionality.

Thankyou In Advance friends.


CustomersOrdersData.oml
2024-01-04 15-15-51
Abed Al Banna
Solution

Hi @Md Sohel Khan 

The issue is most likely stemming from the Action1 logic.

You are looping over all the records of the entity and always overwriting the first record of the pdfFiles list, instead of extending that list with all the records.

To solve that issue, you need to use the ListAppendAll server action and remove the For Each and the Assign elements, I will attach screenshots of the solution below.

Step 1: Remove the 2 disabled elements (the For Each and the Assign). 


Step 2: Set the List and SourceList properties of the ListAppendAll as follows:

Let me know if this solves your issue!


Best regards,

Abed

2024-01-04 15-15-51
Abed Al Banna

Looking at the flow again, a more optimal solution would be to simply use one single assign, where you assign the output of the aggregate to the output of Action1 in one step:

You don't need the ListAppendAll server action in this case.

2025-10-16 10-02-51
Sohel Khan

Thanks for your reply.

The same error coming, unable to see the pdf. I have used using list append and without using it.


UserImage.jpg
Puja Rani

I have tried that component , works fine for me.  Did you tried to open the pdf file in some other browser? or also if you can try to clear your browser cache and try to open again

2025-10-16 10-02-51
Sohel Khan

Thankyou for replies friend.

Its solved . And thankyou and @Abed Al Banna  for the resolution.

Have a wonderful time friends. 

2025-10-16 10-02-51
Sohel Khan

Thankyou @Abed Al Banna  for the solution. 

2024-01-04 15-15-51
Abed Al Banna
UserImage.jpg
Puja Rani

Hi @Md Sohel Khan ,

Error 504 is mainly occurs if we send request to the server and it did not receive a timely response from another server to complete the request. It might be getting delayed because of the For loop. Try using the List append All.

Regards,
Puja

UserImage.jpg
alexis hector

I was wondering if anyone can help. I have a bunch of PDF files created by another application (unknown quantity but known filenames) and I would like to combining PDF files so that it can be attached and emailed as a unit. I have searched all over bu the solutions out there involve buying adobe acrobat, I was wondering if there was a B4J solution I can run on my server to do this bespokely.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.