No se puede usar "html2pdf.loqode.repl.co"

Desde el medio día no he podido encontrar la solución para generar pdfs usando “html2pdf.loqode.repl.co” al parecer el link está roto.

Alguna solución alternativa para esto?

@Loqode

1 Like

Replit recently removed their free plan and automatically unpublished my html2pdf app. I have created another instance on Netlify, so you have 3 options:

1. Use the new tool:

https://pdfwizard.netlify.app?PDF="Insert Your HTML Here"

2. Host the code yourself:

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML to PDF</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <script>
    function getUrlParameter(name) {
      name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
      var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
      var results = regex.exec(location.search);
      return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
    }

    function loadPdfContent() {
      const pdfContent = getUrlParameter('PDF');
      if (pdfContent) {
        document.getElementById('content').innerHTML = pdfContent;
        setTimeout(function () {
          window.print();
        }, 500); // 1000 milliseconds = 1 second
      }
    }
  </script>
</head>

<body onload="loadPdfContent()">
  <div id="content"></div>
</body>

</html>

3. Enrol in my Glide Document Masterclass

For more robust & flexible methods of free PDF generation, you enrol in my Glide Document Masterclass by clicking here.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.