Load a minimal PDF stub from a string
To load a minimal PDF stub from a string, use the basic set of information needed by Nutrient Web SDK to render a document. Some of the examples from this Stack Overflow thread(opens in a new tab) work. Here’s one of them, which is converted to an array buffer passed in PSPDFKit.Configuration#document
that can then be consumed and rendered by our API:
const PDFstub = `%PDF-1.01 0 obj<</Type/Catalog/Pages 2 0 R>>endobj 2 0 obj<</Type/Pages/Kids[3 0 R]/Count 1>>endobj 3 0 obj<</Type/Page/MediaBox[0 0 750 1000]>>endobjxref0 40000000000 65535 f0000000010 00000 n0000000053 00000 n0000000102 00000 ntrailer<</Size 4/Root 1 0 R>>startxref149%EOF`;const uint8array = new TextEncoder().encode(PDFstub);PSPDFKit.load({ ...defaultConfiguration, document: uint8array.buffer});
Internet Explorer 11 is no longer supported in our Web SDK as of version 2022.5. Edge 18 is no longer supported in our Web SDK as of version 2023.2.
This has been tested with Nutrient Web SDK 2019.4.1.