Can not find the exported file (FileAttachment annotation)

Apryse PDFTron SDK

Product Version:

Please give a brief summary of your issue:
I cannot find the exported file (FileAttachment annotation).

Please describe your issue and provide steps to reproduce it:
I attached the file (the image was attached as FileAttachment annotation) to the pdf file through the WEB. Then I opened this pdf file on Android. I see the attached file as a pin. Next, I need to click on the annotation to open the attached file in another window. When I click, I get the annotation, and then I call the export function for it, but nothing happens. If, after calling the export function, I try to open a file that lies along the path specified in the FileSpec, then such a file does not exist.

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

Thank you for your post. Is there a reason you are trying to implement this feature yourself? The out-of-box component has file attachment working already: Fragment | Apryse Documentation
If you do require implementing this yourself, to extract a file attachment:

String exportFileAttachment (PDFViewCtrl pdfViewCtrl, FileAttachment attachment, File directory)

For your reference on our Viewer Utils: ViewerUtils - PDFTron API Reference | Apryse Software Inc.
It has also been noted by our Engineering Team that the code provided is not correct. Please let us know if this addresses your concerns.


Thank you. Your answer helped me a lot.

1 Like