Local domain + port; licenseKey not recognised

Our development site runs off a domain, rather than localhost: however the licenseKey I have set up for the local domain isn’t being recognised as valid.

Eg: the development domain is of the format http://sub.domain.local:4001 - I tried setting the domain as both domain.local and including the port number with domain.local:4001 in the license-key settings … but neither worked. I still got the “a valid license key is required…” error in the web-app (waited the 10 minutes suggested by the Profile Page).

Is this a known issue, something missing in the express-viewer config or …?

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here

I can also confirm that the https://auth.pdfjs.express/?key=3TTJs6JPhTPovwvLL84v&r=1 request is happening in the console, returning a 200.

Hi Andrew,

Unfortunately we don’t support custom local domains.

Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.


Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here

@zserviss To be clear: we’re talking about the .local part of the URL? Is this something you ever intend supporting? What domains are supported then? It seems a little odd you would even check if a domain is valid or not - why would pdfexpress care if domain.local is a real domain or not? It’s just a proxy back to localhost (thanks to /etc/hosts)

Unfortunately this means we will not be able to use pdf.jsexpress given we won’t be able to properly develop with it. Seems like an oversight that it explicitly won’t accept custom domains?? This software would otherwise serve the purposes we were looking for.

Hey there,

I just tested this on my end and was able to make it work with a custom local domain. I set my Express Viewer Key to be domain.local and then set up /etc/hosts to contain 127.0.0.1 domain.local and it was able to read the key correctly.

Couple things to try:

  • If you are using a proxy, make sure that it is not altering the origin of the request or any other headers
  • Make sure you are waiting the 10 mins after changing your key

If you still cannot get it working, try creating a new key with the domain set as domain.local (do not include the port).

Thanks,

Logan Bittner,
Head of Web Applications


Share how you are using PDF.js Express in your organization you could win a $500 Amazon gift card. All participants will receive 6 months of PDF.js Express+ for free. Learn more here