breathe

“You are just as likely to solve a problem

by being unconventional and determined

as by being brilliant”

sir james dyson


who wuda thunk?

unfamilar terrain wicked, but me wickeda dan


after countless (mindless) installations of “node” and enough insight to find node modules 🤝 thor’s hammer jokes relatable, i finally had to understand what [node-modules] are.

🧷 basically, you invoke any of them and boom- your app bags an extra layer of complexity.

🧷 these kind sires for instance 👇

Web capture_19-10-2022_35418_replit com


..one episode of over-excitement later

did a bit of snooping on repos owned by internet strangers and this guy 👉 express won’t stop showing up.

🧷 thankfully, MDN pulled up- rather expressive.


this guy too 👉 app.use() sort of had me stumbling.

🧷 Express Docs came in handy 👇

Web capture_29-9-2022_1155_expressjs com


🧷 Fell into a rabbit hole about ports.


…aaand thus began me woes

Web capture_19-10-2022_25233_replit com

the sdk requires that the HTML FILE for conversion be stationed in a zip file.

one question… why? why me?

🧷 well, imagine how elated i was when after hours of brute-applying all shades of solutions, it finally clicked. pardon me for ever speaking so flippantly about node-modules.


fr fr i thought i was done

now, imagine how my face dropped, when i encountered yet another.. woe

the pdf file showed up empty and i had no idea why, until when, ofcourse, i headed right back to the docs 👇

Web capture_19-10-2022_31416_replit com

Web capture_29-9-2022_3437_opensource adobe com

🧷 i was missing some js-code in the source-html.

🧷 with the js-code, star-boi data-to-merge will show up in the empty fields @ source-html

🧷 i.e populate.

🧷 sample files came in handy 👇

<script src="./json.js"></script>
  
  <script type="text/javascript">
    
      function populate()
      {
          let document = window.document;
          document.getElementById("title").innerHTML = String(window.json.title);
          document.getElementById("sub-title").innerHTML = String(window.json.sub_title);
      }
    </script>

(i still have no idea how this works <script src="./json.js"></script>)


guess who showed up again? problem 👇

Web capture_19-10-2022_34113_downloads

multiple attempts to fetch the pdf via the client but the server just won’t budge

..where did i go wrong?


🧷 all it took was a formal request 👇

Web capture_19-10-2022_34733_replit com

🧷 plus these guys to handle …and deliver 👇

Web capture_19-10-2022_34942_replit com

🧷 and kaboom! 👇

Web capture_19-10-2022_3550_downloads

did i mention?

believe me, i went on another bout of why isn’t it working

🧷 because an unwanted slash made it’s way in ..somehow.. 👇

Web capture_19-10-2022_35918_replit com


whew!

now that we’ve made it “work”, let’s put it to work.


thank you for reading 🚀