web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adobe Merge PDFs from ...
Power Automate
Unanswered

Adobe Merge PDFs from Array

(2) ShareShare
ReportReport
Posted on by

Hi all,


I have a Flow that gets attachments from a SharePoint list, creates PDFs out of them using the Adobe convert image to PDF action. The number of list items and attachments will vary. 

Now I need to use the Adobe Merge PDFs action to merge all of these PDFs. 

It needs to be dynamic. 

I've tried adding the file contents to an array like in this guide and then dropping the array into the File Content part of the Merge PDFs, but I get the error:
"For application/pdf mime-type The input file appears to be corrupted and cannot be processed."

Has anyone done anything similar?

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at
    Re: Adobe Merge PDFs from Array

    hi @Anonymous  you can find here some options

    Solved: Merging two pdf files - Power Platform Community (microsoft.com)

    Solved: Merge PDF Files - Power Platform Community (microsoft.com)

  • Community Power Platform Member Profile Picture
    on at
    Re: Adobe Merge PDFs from Array

    Thanks Christian, I won't be getting a subscription, and I need a sustainable solution so no free trials. I will look at the Cloudmersive tool, but specifically wondering if anyone has experience with the Adobe action, since it seems to be capable of accepting arrays and I'd rather use the actual Adobe tool.

    Thanks again.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Adobe Merge PDFs from Array

    Looks like it was an issue caused by an earlier step in my flow, the action is now working properly. 

  • timbo23 Profile Picture
    22 on at
    Re: Adobe Merge PDFs from Array

    Hi SylvieLet17, I'm running into the same issue. Would love to connect with you to learn how you were able to use the Adobe Merge PDF from Array too.  Could you share how you constructed your array please?  Thanks.

  • Community Power Platform Member Profile Picture
    on at
    Re: Adobe Merge PDFs from Array

    Hope this helps:

    mergePDFs.pngmergePDFs2.png

  • timbo23 Profile Picture
    22 on at
    Re: Adobe Merge PDFs from Array

    Thanks - helpful to guide how to construct the array.  I'm still getting the same error unfortunatley.  What was the issue you noted earlier in your flow?  Maybe it's the same for me too...Thanks.

  • Community Power Platform Member Profile Picture
    on at
    Re: Adobe Merge PDFs from Array

    Hey timbo23, sorry this took me so ridiculous long to answer...things get in the way you know?

    I JUST fixed it properly (I think) :

     

    mergePDF.pngmergePDF2.png

    Basically - try adding the "$content-type=application/pdf" part and the curly brackets. That should work

  • Verified answer
    timbo23 Profile Picture
    22 on at
    Re: Adobe Merge PDFs from Array

    Hi SylvieLet17,

    Thanks for your answer.  It was a help, and got me a long way down the road.  I found a solution which seems to work now and I'll put it into production tomorrow.

    I don't seem to have permission to upload a photo, so let me try to explain what I did:

    1.   After getting the file content, I set the value of my first "Append to array" command to be the "File Content" dynamic content item.

    Append1.JPG

     

    2.  Then, after getting the file content for the subsequent files, I had to set the value of all subsequent "Append to array" commands to include the base64 function like this:

    Append2.JPG

     

    Note - the expression for the "$content" comes from the expression builder, and is actually:  

    trim(base64(outputs('Get_file_content')?['body']))
     
    The catch was that I had to use both the 'trim()' and the 'base64()' expression in the JSON. 
    • The base64() expression solved the issue of the subsequent PDF files being merged in as blank pages (i.e. i struggled with an issue where the first doc merged fine, but all subsequent docs were just blank pages).
    • The trim() expression solved the issue of the base64() dissapearing when I went back into the flow to check, edit and test it.
    The actual MergePDF command was as simple as you show it, and I can then use the output either on sharepoint or attach it to an email.
    Final1.JPG
     
    Thankyou for your help.
  • happyccy Profile Picture
    71 on at
    Re: Adobe Merge PDFs from Array

    Dear Expertise/ Specialist, @Anonymous @timbo23 

     

    I have encountered the flow error with message “For application/pdf mime-type The input file appears to be corrupted and cannot be processed.” On the Flow of “Adobe Merge PDFs”.  And having the similar problem. I would greatly appreciate it if you could share your successful scenario.  Much Obliged.

     

    I have 2 Tables/ Lists and the flows below:

    1. From ‘Table 1’, I use Do-Loop to extract the Attachment from multiple records I needed. 
    2. After that, I use “Adobe Convert Doc to PDF” function to convert the (1) Attachment from multiple records to SAVE it ALL to a single raw record in ‘Table 2’. And the Loop function ended.
    3. Then,
      1. I get the Raw Record from ‘Table 2’
      2. Get Attachment
      3. Get Attachment Content
    4. Based on (3) result, I append it to the array Variable “varPDF”
    5. I called the “Adobe Merge PDFs” function and attach the “varPDF” to it for merging, then I could save it back to my Database.

     

    happyccy_0-1649740877092.png

     

    happyccy_1-1649740909479.png

    happyccy_2-1649740936765.png

     

     

     

  • happyccy Profile Picture
    71 on at
    Re: Adobe Merge PDFs from Array

    I would very appreciate your help.  Best.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard