Print an external page without opening it not working in Firefox

I’m trying to print a PDF document without opening it. I found a guide on MDN that explains how this can be done.

  const handleClick = (
    event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
  ) => {

    const frame = document.createElement('iframe');

    frame.onload = () => {
    // = 'none';
    frame.src = docflow.primaryDocumentPdfUrl;

In Chrome everything works well, but in Firefox an error occurs (see below).

Partitioned cookie or storage access was provided to
because it is loaded in the third-party context and dynamic state
partitioning is enabled

enter image description here

Storage tab screenshot:

enter image description here

Guide is wrong or am I doing wrong?