Hi there,
We’re looking to start using GemBox.PdfViewer in our Angular app (client-side rendering) to display PDFs, but we don’t want to expose our global license. The free license isn’t an option, as we’d like to avoid the watermark.
Is there a way to achieve this?
Hi Alexander,
I presume you’re working with an ASP.NET Core
application. In that case, the simplest approach would probably be to have a controller action that returns your license key.
You would call that controller from JS and use the returned key to set the GemBox.PdfViewer license. You would protect that controller action with anti-forgery middleware ([ValidateAntiForgeryToken]
). In other words, you would use Cross-Site Request Forgery tokens to enable license retrieving for only the calls from your application’s clients.
I hope this helps, please let me know if you need anything else.
Regards,
Mario