Thanks @EmadBeshai, I definitely have more insight now.
Have managed to download the PDF, but it's broken.
The difference from the original file seems to be the encoding, the original file has Windows 1252 encoding while the one I save with Blob is UTF-8, also the size is double, any idea what the problem may be?
Have tested in Power automate, the output of "Download a file or an image" is
{
"$content-type": "application/octet-stream",
"$content": "base64 data"
}
If I manually decode the data of $content I get the proper PDF.
Next step is "Return value to Power Pages", no matter if I choose "Text" or "File" and the value as "File or image content", I get the wrong encoded.
Is it possible to get a string that is base64 encoded? This way maybe I could decode it myself with JS and create the file after.