title: How can I save locally the pdf that I have generated with html2pdf with node?
body: <p>I am generating a pdf with html2pdf, and I have managed to generate the pdf, but now I need to send this pdf to my server in node or save it directly in a folder on my server, now the pdf is downloaded in the path indicated by the client, but I I need to have a copy on my server, I have tried with the output parameter but I have not achieved anything, this is my current code:</p>
  <pre><code> document.addEventListener(&quot;DOMContentLoaded&quot;, () =&gt; {
          // Escuchamos el click del botón
          const $boton = document.querySelector(&quot;#btnCrearPdf&quot;);
          $boton.addEventListener(&quot;click&quot;, () =&gt; {
              const $elementoParaConvertir = document.body; // &lt;-- Aquí puedes elegir cualquier elemento del DOM
              html2pdf()
                  .set({
                      margin: 1,
                      filename: 'documento.pdf',
                      image: {
                          type: 'jpeg',
                          quality: 0.98
                      },
                      html2canvas: {
                          scale: 3, // A mayor escala, mejores gráficos, pero más peso
                          letterRendering: true,
                      },
                      jsPDF: {
                          unit: &quot;in&quot;,
                          format: &quot;a3&quot;,
                          orientation: 'portrait' // landscape o portrait
                      }
                  })
                  .from($elementoParaConvertir)
                  .save()
                  .output('./123123123.pdf', 'f')
                  .then(pdfResult =&gt; {
                       console.log(pdfResult);
                  })
                  .catch(err =&gt; console.log(err)); 
          });
      });
  </code></pre>
  <p>But I can't figure out how to send the pdf to the server or save it directly from the frontend, does anyone know how I can save the pdf that is generated on my server? Thanks a lot.</p>