Hello everybody,
I want to know if it is possible to recover the last page of a pdf, and after modifying it in a power apps canvas application, I want to add it to the previous pdf by overwriting the last page and replacing it with the modified one .
THANKS
Petr
July 3, 2023, 8:28am
2
Hello @Gikido ,
You can split the last page using the * Split PDF action.
There are Start page, End page and Split at page options that allows selecing the last page in a PDF.
Then Merge the PDF withiut the last page and the modified page using * Merge PDF action.
Best regards,
Petr
Plumsail team
1 Like
@Petr
Thank you for your reply.
I have already seen the two actions but I want the Split and the merge to be dynamic because the number of pdf pages change each time. THANKS
Petr
July 4, 2023, 5:58am
4
Hi @Gikido ,
You can use Power Automate features to get the number of pages for each pdf and apply it dynamically to Plumsail actions.
Please review the thread. I suggested a flow with the dynamic page number values
I am trying to create a Power Automate flow that will open a PDF, move the last page to the front, then save and close. The trigger is moving the PDF to a sharepoint folder. I've tried but am struggling with success. Any ideas? Thanks!
Best regards,
Petr
Plumsail team
Gikido
July 4, 2023, 11:53pm
5
I check the link but I think it concerned static content not dynamic
Petr
July 5, 2023, 5:44am
6
Hi @Gikido ,
The was an example when we know the number of pages for the PDF ahead and then I added an example when we count the number of pages right in the Power Automate flow and use variables to replace the pages. For example,
Hi @dwells1 ,
Yes, it's possible
You need to count the number of pages in the source PDF. Add Compose action and this expression.
[image]
sub(length(split(replace(base64ToString(outputs('Get_file_content')?['body']['$content']), 'Type/Pages', ''), 'Type/Page')),1)
Add an integer variable to get the number of pages without the last page.
[image]
Finally, replace all static page number values in the Plumsaill actions.
This is how the entire flow looks like
[image]
Best regards,
Petr
…
Try to take the same approach to count the number of pages and then add variables to split and merge the PDFs.
Best regards,
Petr
Plumsail team