Please give a brief summary of your issue: File Attachments not working
Please describe your issue and provide steps to reproduce it:
I’m loading a PDF using buffers but when tried to view attachments of the PDF it’s not showing anything.
Please provide a link to a minimal sample where the issue is reproducible:
//Sample code for setting the pdfDoc
pdfDoc = new PDFDoc(pdfbytes);
//sample code to view attachments
Thanks for contacting us about this. Would it be possible if you could send us a sample project that contains this issue, so we can take a closer look on our end? It would be extremely useful for our investigation of the issue.
What is “attachmentsUrl”? Also, based on your original post, we don’t have a full picture of what exactly you are doing, please kindly provide a project and video demonstration so we can proceed with more investigation.
From a brief guess, I think you are not loading the new document after documentLoaded event which could be the problem, but since I don’t have a full picture of you code, this is just a guess.
I should also mention that “handleViewFileAttachments” handles files with existing attachment baked into it, i.e. if you open the same file in Adobe, you should be able to see attachment in Adobe as well. You cannot do that with a random blank file.
I added a reference to the new PDFDoc that needs to be replaced, and only replace in event if document is ready, otherwise, new doc is loaded from document loaded event. In any case, please provide a zip for your latest project so we are on the same page. Thanks.
Thanks it works with the sample, I’ll check with actual project and update you.
Also can you please suggest solution for the other issue where nested layers are not working properly also we can’t see the titles for that.
You can use the same sample project for verification, all you need to do is replace the attachmentsUrl with layerSampleUrl