I have a post web method that generate a pdf file and returns it to the client. I call to this method using a form submit in a new tab using target="_blank", so the pdf opens in the new tab using the PDF Viewer tools of Chrome. Everything is working correct with this implementation, and I can download the pdf file:

But now i want to open it inside an iframe instead of a new tab. I have this in HTML:
<form id="form2" method="post" target="my_iframe" action="">
<input type="hidden" name="wsInputs" id="wsInputs" />
</form>
<iframe style="width: 100%; height:600px" name="my_iframe" src=""></iframe>
When a button is clicked, i do this in typescript:
const form = document.getElementById("form2") as HTMLFormElement;
const input = document.getElementById("wsInputs") as HTMLInputElement;
input.value = JSON.stringify(wsPDFInputs);
form.action = endpoint + "api/v1/downloads/get-pdf";
form.submit();
This works correct, and inside the iframe the document is opened and it works:

But, when i click on download button, it does not work. This is what it happens when the file explorer is opened:
I do not know why is this happening. In Firefox for example it is working, but not in Chrome. Also, if I click the print icon and I select "save as pdf" works too.
Any ideas? Thanks in advance.
EDIT This is the result of the request that generates the pdf:

Maybe the problem is the response, looks like an html document instead of the pdf file, i do not know why. But the response is the same when target _blank is set.