feat(form-filler): enable XFA support and use original file bytes
Use original file bytes instead of saved PDF doc to preserve XFA streams. This ensures PDF.js can fully render XFA-based forms by also enabling the XFA flag in the viewer.
This commit is contained in:
@@ -183,7 +183,10 @@
|
||||
|
||||
async function loadPDF(data) {
|
||||
try {
|
||||
const loadingTask = pdfjsLib.getDocument({ data });
|
||||
const loadingTask = pdfjsLib.getDocument({
|
||||
data,
|
||||
enableXfa: true,
|
||||
});
|
||||
pdfDocument = await loadingTask.promise;
|
||||
pdfViewer.setDocument(pdfDocument);
|
||||
linkService.setDocument(pdfDocument);
|
||||
|
||||
Reference in New Issue
Block a user