Once PDF viewed, Share to Whatsapp etc

Hello!

Is it possible to use the SfPdfViewer  control to not just view the PDF file, but also share it to Whatsapp etc?

I could not find any related information on this.


Thanks!


Jaco


5 Replies 1 reply marked as answer

RG RameshBabu Ganesan Syncfusion Team May 19, 2023 01:10 PM UTC

Hi Jaco,


Currently, MAUI PdfViewer does not have support for editing annotations or saving PDF documents. Please let us know whether you want to share the PDF document with or without changes.


Regards,

Ramesh Babu Ganesan



JA Jaco replied to RameshBabu Ganesan May 19, 2023 01:39 PM UTC

Thanks. In the meantime I saw some code you use to save a stream of bytes to PDF. That is with the general PDF api you provide. That will be sufficient as I will get a stream from a web api which I then will save.


Thanks!



RG RameshBabu Ganesan Syncfusion Team May 22, 2023 07:44 AM UTC

Hi Jaco,


We suspect that you mean the PdfLoadedDocument.Save or PdfDocument.Save method by PDF API. However, if you simply want to share the PDF as it is without any modifications, then you do not need these APIs. These APIs are needed only if a PDF needs to be modified, and then the modified PDF should be shared after saving. 


If you want to share the PDF stream coming from the web API as it is, then you can simply share the stream without using the Pdf API or the Pdf Viewer control. We have prepared a demo sample to share a PDF stream via WhatsApp. Please find the sample and let us know whether it meets your requirements. 


If not, please let us know more details about your use case scenario so that we can help you better.


Regards,

Ramesh Babu Ganesan


Attachment: ShareFile_879b5006.zip

Marked as answer

JA Jaco May 23, 2023 07:44 AM UTC

Thank you SO much!!!



SS Swetha Srikumar Syncfusion Team May 24, 2023 12:50 PM UTC

Most welcome.


Loader.
Up arrow icon