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
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
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!
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
Thank you SO much!!!
Most welcome.