react-file-viewer icon indicating copy to clipboard operation
react-file-viewer copied to clipboard

Displaying PDF's Attachments

Open mendozamartinezm opened this issue 4 years ago • 1 comments

Is there any way to display the attachments embedded in a PDF? I would like to list down all the documents attached in a PDF and then handle an onClick action to do something, like opening a new tab with the attachment.

mendozamartinezm avatar Feb 18 '21 14:02 mendozamartinezm

Looking at the source code, it seems like PDFDriver holds pdf property in its state, and pdf has the method getAttachments which returns an Array with the attachments details: content (as Uinit8Array) and filename.

mendozamartinezm avatar Feb 18 '21 18:02 mendozamartinezm