Hi Community
I am facing an issue while merging two PDF files through Power Automate Desktop. Can anyone help?
Error:Microsoft.Flow.RPA.Desktop.Robin.SDK.ActionException: Failed to merge PDF files: 'C:\Users\Umar.Shahzad\Desktop\Registry6.pdf', 'C:\Users\Umar.Shahzad\Desktop\Registry3.pdf' ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Flow.RPA.Desktop.Modules.PDF.Actions.PDFium.PDFium.FPDF_SaveAsCopy(IntPtr doc, FPDF_FILEWRITE writer, Int32 flags)
at Microsoft.Flow.RPA.Desktop.Modules.PDF.Actions.MergePDFFilesAction.Execute(ActionContext context)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.PDF.Actions.MergePDFFilesAction.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
Not sure, I tried same way and no problem.
Also, I read some tips that upload the files into web for PDF to do that.
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
It might be another way to automatic.
Thank you Benny_1857
Let me explain in detail.
I use the action "Merge PDF Files" and use it to merge two files, namely Registry 1 and Registry 2. The process runs successfully but in the merged file Registry 2 comes as first page Registry 1 as second despite the fact the sorting is ascending. I want to Registry1 to become the first page. So I thought it may be due to sorting. So I changed the sorting to descending and run. However, this time the process goes in error and produces the error in my first message. No matter what I do I am unable to make registry 1 as first page. Can you please test this at your end and let me know if you end up in the same error.
Thanks
Pease refer this, for me it was working.
Thanks Ahammad. Can you please check the page order in which they were merged. I also messaged earlier a bit in detail. Were you able to reproduce the issue by changing the sort order?
When I get the files from folder, I set the accending sort by FullName in advanced.
It works.
Thanks. For some reason it is not working for me.
I am not sure. I just guess whether it is because of sort by text?
For example sort 3 file name acceding. A2.PDF,A3.PDF,A12.PDF
After sort it will be A12.PDF,A2.PDF, A3.PDF
Sorting is perfectly working fine. But merge is not merging according to sort order. If I select ascending it merges fine but in descending order. If I select descending it goes into error.
Hi,
I tried too and no problem for me.
Have you the last version of PAD?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.