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);
mPdfViewCtrlTabHostFragment.getCurrentPdfViewCtrlFragment().getPDFViewCtrl().setDoc(pdfDoc )
//sample code to view attachments
mPdfViewCtrlTabHostFragment.getCurrentPdfViewCtrlFragment().handleViewFileAttachments()
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.
Hi Team,
I have uploaded the sample project here, please check. My main use case is to load a pdf using bytes with PdfViewCtrlTabHostFragment2 & PdfViewCtrlTabFragment2 CustomUI.7z (2.2 MB)
Hi, in the video, I’m not seeing the changes I provided you in my previous response. Could you please look through the changes I suggested in the zip and apply them? Thanks.
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.
Hi,
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
Hi, I’m able to reproduce this issue, at the moment the viewer does not support nested layers. We can fix it so that the empty items don’t show up. What’s your timeline on this item? Thanks.
Hi, tried to update lib version to 9.0.3-beta09 but seem that version is available for adding as dependency, following is the error I can see
Could not resolve com.pdftron:tools:9.0.3-beta09