Product: @pdftron/pdfnet-node
Product Version: 9.2.0
Please give a brief summary of your issue:
We are seeing issues when we are converting our pdf files to an xod file type, we see Webpublisher Permissions issue.
Please describe your issue and provide steps to reproduce it:
We are trying to convert our PDF files to XOD and we are seeing issues particularly this permissions issue. We want to make sure this is a licensing issue not a code issue.
Message: Your license does not include
WebPublisher
permission.
Please provide a link to a minimal sample where the issue is reproducible:
Here is a sample of our code
export async function doXODConversionAndUploadFile(
companyId,
fileRevision,
mimeType
) {
const extension = ".xod";
const tempFile = await tmpFile({ postfix: ".pdf" });
const tempXodFile = await tmpFile({ postfix: extension });
const run = async () => {
let doc = await PDFNet.PDFDoc.create();
try {
doc = await PDFNet.PDFDoc.createFromURL(sampleUrl);
await doc.save(tempFile.path, PDFNet.SDFDoc.SaveOptions.e_linearized);
await PDFNet.Convert.fileToXod(tempXodFile.path, tempFile.path);
} catch (e) {
logger.error(e);
}
};
await PDFNet.runWithCleanup(run, process.env.PDF_NET_LICENSE);
await PDFNet.shutdown();
await tempFile.cleanup();
await tempXodFile.cleanup();
}