As mentionned in gotenberg/gotenberg#1498 by @jordy-manner, it's not possible to sort sent files.
We could add a method to change the filename in the form data (not the file itself, ex: --form 'files=@portrait.pdf;filename=01-portrait.pdf') in order to respect calls order. Example:
$builder
->files('c.pdf', 'a.pdf', 'b.pdf', 'a.pdf')
->sortFilesByName() // Default behavior => a, a, b, c
->sortFilesByCall() // Files are renamed => c, a, b, a
It will concern the Merge endpoint, maybe the Embed once (not sure).
As mentionned in gotenberg/gotenberg#1498 by @jordy-manner, it's not possible to sort sent files.
We could add a method to change the filename in the form data (not the file itself, ex:
--form 'files=@portrait.pdf;filename=01-portrait.pdf') in order to respect calls order. Example:It will concern the Merge endpoint, maybe the Embed once (not sure).