Q: Can I load up an office document from a URL, convert it into a PDF, then load that converted PDF into WebViewer?
A:
(exports => {
const PDFNet = exports.PDFNet;
window.addEventListener('viewerLoaded', () => {
(async function() {
const inputDir = '../../samples/full-apis/TestFiles/';
const inputFilename = 'myfile.pptx';
const url = inputDir + inputFilename;
await PDFNet.initialize();
const buf = await CoreControls.office2PDFBuffer(url);
readerControl.loadDocument(buf);
})()
});
})(window);
// eslint-disable-next-line spaced-comment
//# sourceURL=config.js