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 …?
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
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.
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
Can you please also recognise 127.0.0.1 as local domain instead of only localhost?
For some reasons we need to use the ip address, which is not being recognised as local dev environment.
Hi,
I am having a similar problem. Running PDF.js on localhost and on an internal VM with a key created for the internal server name no domain existing, i.e. “sdevmultweb.local”. I also confirm that the https://auth.pdfjs.express/?key=xxxxxx request is happening in the console, returning a 200. There is no error in the console that the key is not valid. On both enviroments there is still the watermark.
Integration of PDF Express is in a Blazor Server UI.
Should the license key alos passed in the load documents?
When I completly remove the key, also no error is shown in the console.
Can you check your browsers log to see if Express recognizes it as a localhost?
It’ll say something along the lines of ‘Development environment detected… this key is licensed to {domain name}’. If it doesn’t, then the key doesn’t match the domain the request is coming from.
Best Regards,
Zach Serviss
Web Development Support Engineer
PDFTron Systems, Inc.
I tried before all three options for the key:
sdevmultweb0682.spsde.local
sdevmultweb0682.spsde
sdevmultweb0682
None of them worked. Also tried to put an entry in the etc/host without success. Can you please give me an advice how you can see the missmatch and how it should be?