Which product are you using?
PDF.js Express Plus
PDF.js Express Version
UI version |‘8.4.1’|
Core version |‘8.4.0’|
Detailed description of issue
After purchasing a PDF.js Express Plus license, the red watermark “PDF.js Express Dev mode” is still visible after editing a PDF file.
That error happens on the build of my registered domain
On localhost, I receive this message
“PDFJS.express: Development environment detected. This license key is currently registered to ‘domain’”
So I assume the license is valid. But the watermark remains
Expected behaviour
That the red “PDF.js Express Dev mode” watermark is not visible
Does your issue happen with every document, or just one?
Happens on every doc
Link to document
graded_1649833337247.pdf (1.9 MB)
Code snippet
package.json
“dependencies”: {
“@pdftron/pdfjs-express”: “^8.4.0”,
“@pdftron/pdfjs-express-utils”: “^1.3.1”,
import WebViewer from “@pdftron/pdfjs-express”;
import ExpressUtils from “@pdftron/pdfjs-express-utils”;
WebViewer(
{
licenseKey: process.env.PDF_EXPRESS_KEY,
path: “…/webviewer”,
disableFlattenedAnnotations: true,
},
this.$refs.viewer
).then(async (_instance) => {
this.instance = _instance;
this.annotationManager = _instance.Core.annotationManager;
this.documentViewer = _instance.Core.documentViewer;
this.utils = new ExpressUtils({serverKey: process.env.PDF_EXPRESS_KEY});
this.instance.UI.setLanguage(“ja”);
await this.instance.UI.loadDocument(path, { filename: path })
});
upload() {
return new Promise((resolve, reject) => {
try {
this.mergePdf()
.then((file) => {
// upload to server
})
…
} catch (err) {
reject(err);
}
});
}
async mergePdf() {
const xfdf = await this.annotationManager.exportAnnotations({});
const fileData = await this.documentViewer.getDocument().getFileData({});
const resp = await this.utils.setFile(fileData).setXFDF(xfdf).merge();
const mergedBlob = await resp.getBlob();
const file = new File([mergedBlob], “”, {
type: “image/*”,
lastModified: Date.now(),
});
return file;
},