I'm creating an app in Xamarin for android that when you finish your task, create a PDF with iTextSharp.
I have a problem since this app has a SignaturePad, it captures the signature and inserts it into the PDF.
When I capture the signature for the first time I do not have any problem, but when I do it for the 2nd time, the following exception occurs:
Unhandled Exception:
System.Net.WebException: Sharing violation on path /mnt/sdcard/ProjectTest/Firma.jpg
I have no idea what is due, since the image of the signature is being saved without problems and in the PDF before inserting the signature I put 2 or 3 more images and in none of them I have a problem.
I leave here the part where I entered the image so that they can review it, if they need more parts of the code they let me know in the comments:
string RutaFirma = "/mnt/sdcard/ProyectoTest/Firma.jpg";
Image FirmaPaciente = Image.GetInstance(RutaFirma);
FirmaPaciente.ScalePercent(20);
FirmaPaciente.SetAbsolutePosition(380, 150);
document.Add(FirmaPaciente);