Save and Print button are not working in Xamarin.Android SfPdfViewer

Dear SyncFusion team,

we are using pdf-viewer in Xamarin.Android. The code snippets:



                     var mPDFView = FindViewById<SfPdfViewer>(Resource.Id.pdfView);
                    Stream objStream = webresponse.GetResponseStream();
                    mPDFView.ZoomPercentage = Constants.PDF_VIEWER_ZOOM_PERCENTAGE;
                    mPDFView.LoadDocument(objStream);

 in XAML:
<Syncfusion.SfPdfViewer.Android.SfPdfViewer
                android:background="@android:color/holo_red_dark"
                android:id="@+id/pdfView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>

i would like to ask 2 questions:

1) the save button from Toolbar is clickable but doesnot do the actual save. I assume i should do customization on this. Can you help how to do it TAKING INTO CONSIDERATION THE ABOVE CODE SNIPPETS

2) We have a password-protected pdf files. And when we try to print it. it throws Error - "Cannot print password protected file". How to resolve this issue ?


Regards,
Iskandar Anvarov

Attachment: sshots_d0d752a4.zip

8 Replies

AV Ashokkumar Viswanathan Syncfusion Team September 24, 2020 08:35 AM UTC

Hi Iskandar, 
 
Greetings from Syncfusion support, 
 
Please find our comments below, 
1.       the save button from Toolbar is clickable but does not do the actual save. I assume i should do customization on this. Can you help how to do it TAKING INTO CONSIDERATION THE ABOVE CODE SNIPPETS 
Whenever save button from built-in toolbar is clicked, you can retrieved the saved PDF document stream from DocumentSaveInitiated event handler. By using the stream obtained, you can save the PDF document locally. 
 
Please find the code snippet for reference, 
pdfViewer.DocumentSaveInitiated += PdfViewer_DocumentSaveInitiated; 
 
private void PdfViewer_DocumentSaveInitiated(object sender, DocumentSaveInitiatedEventArgs args) 
        { 
            Stream stream=  args.SavedStream; 
 
            // Save Stream locally  
            Save(stream as MemoryStream); 
        } 
 
Please find the demo sample in the below link, 
 
 
2.       We have a password-protected pdf files. And when we try to print it. it throws Error - "Cannot print password protected file". How to resolve this issue ? 
We were able to reproduce the issue “Printing encrypted PDF document shows error”. Currently, we are validating the issue and the validation details will be updated on September 28th , 2020.   
 
 
Please let us know if you need any further assistance. 
 
Regards, 
Ashok Kumar Viswanathan. 



IS iskandar September 28, 2020 09:09 AM UTC

Dear Kumar,

Thank you. Save worked like a charm. Only question on Print is left. Have you reviewed it?


Best Regards,
Iskandar Anvarov


AV Ashokkumar Viswanathan Syncfusion Team September 28, 2020 03:52 PM UTC

Hi Iskandar, 
  
Thanks for your update, 
 
At present, we do not have support to “Print the encrypted document”. However, we will consider your requirement as a usability feature and provide the patch for the same on October 19, 2020. 
  
Regards, 
Ashok Kumar Viswanathan. 



AV Ashokkumar Viswanathan Syncfusion Team October 19, 2020 06:44 PM UTC

Hi Iskandar 
 
We have implemented the support to print the encrypted PDF document and the custom NuGet for this fix can be downloaded from the following location.    
  
     
Assembly Version: 18.2.0.44
 
 
Disclaimer :  
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the following issue(s) reported in this/the forum. 158086
 
 
Note : Kindly follow the steps to clear the NuGet cache and then install patched NuGet to get the issue resolved.   
    

This fix will be included in our 2020 Volume 3 service pack release which will be available in November 2020.  
 
  
Regards,  
Ashok Kumar Viswanathan. 



YR Yuri Roy replied to Ashokkumar Viswanathan November 13, 2020 09:04 AM UTC

Hi Iskandar 
 
We have implemented the support to print the encrypted PDF document and the custom NuGet for this fix can be downloaded from the following location.    
  
     
Assembly Version: 18.2.0.44
 
 
Disclaimer :  
Please note that we have created this patch for version 18.2.0.44 specifically to resolve the following issue(s) reported in this/the forum. 158086
 
 
Note : Kindly follow the steps to clear the NuGet cache and then install patched NuGet to get the issue resolved.   
    

This fix will be included in our 2020 Volume 3 service pack release which will be available in November 2020.  
 
  
Regards,  
Ashok Kumar Viswanathan. 


Hi,

i saw the fix with version 18.3.0.48 for Android. though I cannot print "protected pdf file"  in iOS. Does the the latest version covers it ? 


Regards,
Sharon C


AV Ashokkumar Viswanathan Syncfusion Team November 16, 2020 08:31 AM UTC

Hi Iskandar, 
We have provided support to print encrypted PDF document only in Xamarin.Android Platform only. However, currently we are validating the same in Xamarin.iOS Platform and we will update the details on November 18th 2020. 
 
Best & Regards,
Ashok Kumar Viswanathan. 
 



AV Ashokkumar Viswanathan Syncfusion Team November 18, 2020 05:41 PM UTC

Hi Iskandar, 
  
At present we do not have support to “Print the encrypted PDF document” in Xamarin iOS Platform. However, we will consider your requirement as a usability feature and provide the patch for the same on December 9th , 2020. 
 
Please find the feedback link below, 
  
Regards, 
Ashok Kumar Viswanathan. 



MK Muralitharan Karikalan Syncfusion Team December 9, 2020 05:22 PM UTC

Hi Iskandar, 
  

We have implemented the “support to print the encrypted PDF document” and the custom NuGet for this fix can be downloaded from the following location. 
 
 
  
Custom NuGet:  
 
 
 
 
 
  
Disclaimer: 
 
  
Please note that we have created this NuGet for version 18.3.0.48 specifically to resolve the following issue(s) reported in this/the forum 158086 

 
 
  
Note: Kindly follow the steps to clear the NuGet cache and then install patched NuGet to get the issue resolved. 
 
  
  

 
 
  
This fix will be included in our 2020 Volume 4 Service pack release which is expected to available in the month of January 2021. 
 
  
  
Regards, 
  
Muralitharan K 
 


Loader.
Up arrow icon