Rohit
April 18, 2022, 2:42pm
1
Please fill out the following template as best you can. .
→
Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
UI version’8.3.2’Core version’8.3.0’Build’My8xNi8yMDIyfDM4YzVkNDMxYQ=='WebViewer ServerfalseFull APIfalse
Build : “My8xNi8yMDIyfDM4YzVkNDMxYQ==”
Core version : “8.3.0”
Full API : false
UI version : “8.3.2”
WebViewer Server : false
Detailed description of issue
{We are converting content to PDF design and using pdf express viewer with free license key, but still watermark is showing}
Expected behaviour
{Watemark should not be displayed}
Does your issue happen with every document, or just one?
{Everytime}
Link to document
{Not possible but please see screenshot: Screenshot by Lightshot }
Code snippet
{
useEffect(() => {
if (viewerUrl) {
WebViewer(
{
initialDoc: viewerUrl,
licenseKey: ‘HFDPE8hSA29DWNektuPB’,
path: process.env.REACT_APP_API_URL + “/pdfviewer”,
},
viewer
).then(async (instance) => {
const { docViewer } = instance;
docViewer.getDocument(viewerUrl);
});
}
}, [viewer, viewerUrl]);}
system
April 18, 2022, 2:42pm
3
Hello, I’m Ron, an automated tech support bot
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:
Logan
April 18, 2022, 2:48pm
4
Hi there,
What domain are you loading Express on? It will always show a watermark on localhost - the watermark is only removed in production.
Thanks,
Logan
Rohit
April 19, 2022, 5:16am
5
Hello @Logan We are using it on Live (production domain)
Logan
April 19, 2022, 3:00pm
6
Hi there,
Please make sure you are using @pdftron/pdfjs-express-viewer
and not @pdftron/pdfjs-express
Thanks,
Logan
Hi @Logan
What if I am starting by adding the snippet directly into html code? There is no “import” involved here. This is my example:
<head>
<title>PDF Viewer</title>
</head>
<body>
<div id="viewer" style="width: 100%; height: 100%;"></div>
<script src="../pdfjs/lib/webviewer.min.js"></script>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const pdfFile = urlParams.get('file');
WebViewer({
path: 'lib',
licenseKey: 'License Key',
initialDoc: pdfFile ? `../viewer/${pdfFile}` : 'about:blank',
}, document.getElementById('viewer')).then(instance => {
// PDF.js Express Viewer is now ready
instance.UI.setTheme('dark');
});
</script>
</body>
</html>
Thank you.