'Getting URL Parameter using WKHTMLTOPDF

We have created a configurator using Gatsby.js where users can customize their products and download the PDF using WKHTMLTOPDF. To do that we are passing the custom values on the URL like this

http://127.0.0.1:8887/configurator/pdf/?params=W3siY3JvcHBlZEFyZWEiOnt9LCJsb2dvIjoiaHR0cHM6Ly9ncm91cGhvc3RpbmcuYmxvYi5jb3JlLndpbmRvd3MubmV0L2ltYWdlcy9jMmQ0ZjYyNi00MGRkLTRjOGEtYWM1OS1kYjM2NjUwMGM0OWIucG5nIiwiYm9yZGVyIjoidGhpY2siLCJib3JkZXJDb2xvciI6IiM1NTNmOGUiLCJjdXN0b21Db2xvciI6IiM5QjUxRTAiLCJncmFkaWVudCI6InJhZGlhbCIsImltYWdlIjoiL3N0YXRpYy9pLW1vcC14bC1jb25maWd1cmF0b3ItMDc1MTBjYzJiZDk3OTQyYTNmMTAwZTY3ZjA2YzgyNjMucG5nIiwiaWQiOjIsInBhdHRlcm4iOiIiLCJyb3RhdGlvbiI6MCwiem9vbSI6MSwiY3JvcCI6eyJ4IjowLCJ5IjowfSwicG9zaXRpb24iOnsibGVmdCI6IjQ2LjklIiwidG9wIjoiNDQuMyUiLCJ3aWR0aCI6IjklIiwiaGVpZ2h0IjoiOSUiLCJyb3RhdGlvbiI6IjI4LjJkZWcifX1d

We are getting the URL values if we use the latest browsers like Chrome (Tried every way I know to get the URL values). enter image description here

But if we try to do this and convert the page using WKHTMLTOPDF we are getting this (Reference errors shows ONLY on the PDF itself).

enter image description here

What can I try to resolve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source