BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Ali,
Thank you for using syncfusion products,
We have created the sample to draw the “Png” image in PdfLightTable cell and attached for your reference,
if (args.CellIndex % 2 == 0 && !string.IsNullOrEmpty(args.Value))
{
//Drawing the image
args.Skip = true;
PdfImage image = PdfImage.FromStream (ToStream("pdf.png"));
Syncfusion.Drawing.RectangleF rect = args.Bounds;
args.Graphics.DrawImage (image, new Syncfusion.Drawing.RectangleF (rect.X + 2, rect.Y + 2, rect.Width - 2, rect.Height - 2));
}
public Stream ToStream(string path)
{
Stream stream = new MemoryStream();
stream = UIImage.FromBundle(path).AsJPEG().AsStream();
//stream.Position = 0;
return stream;
}
Please let us know if you need further assistance.
With Regards,
Praveen
Hi Ali,
Our Syncfusion xamarin pdf will work in following platforms.
Xamarin.Android
Xamarin.IOS
Xmarin.WindowsPhone
Xamarin.Forms.
So you can use the all PDF related operations in all other platform also there is no necessary to use only xamarin.Forms.
With Regards,
Praveen
Hi Ali,
A quick note on our previous update. Our Pdf library for Xamarin is a portable library and can be used in any kind of xamarin app. It doesnt require a Xamarin.Forms dependency.
Please let me know if there is any other concerns.
With Regards,
Praveen
Hi Ali,
Thank you for your interest in Syncfusion Products.
We are analysing the feasibility of your requirement, we will provide you the details shortly.
Regards,
Karthikeyan.C
Hi Ali,
Thank you for your update,
Currently we do have support to load the pdf document from stream.
Please refer the following code snippet.
Stream PdfStream = typeof(DetailViewController).GetTypeInfo().Assembly.GetManifestResourceStream("PdfLightTableTesting.Products.pdf");
PdfLoadedDocument document = new PdfLoadedDocument(PdfStream);
Please let us know if you need further assistance.
With Regards,
Praveen
Hi Ali,
Thank you for your update,
Currently we do support to load the documents only from the stream using PdfLoadedDocument class.
We can load the document from the application documents folder as follow, please refer the below code snippet.
var path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
FileStream file = File.OpenRead(path + "/Invoice.pdf");
byte[] data = new byte[file.Length];
file.Read(data, 0, (int)file.Length);
MemoryStream stream = new MemoryStream(data);
PdfLoadedDocument document = new PdfLoadedDocument(stream);
MemoryStream save = new MemoryStream();
document.Save(save);
document.Close(true);
Save("table.pdf", "application/pdf", save);
Please ensure the requested file present in the MyDocuments folder before get the stream from the file.
Please let us know if you need further assistance.
With Regards,
Praveen