Пример #1
0
        void PDFBitmapEkle(Android.Graphics.Bitmap bitmap, int Yukseklik, int ScaleYukseklik, PdfPTable table)
        {
            var logo = BitmapHelpers.LoadAndResizeBitmap2(bitmap, Yukseklik, Yukseklik);
            var ms1  = new MemoryStream();

            logo.Compress(Android.Graphics.Bitmap.CompressFormat.Png, 100, ms1);
            var logobyte = ms1.ToArray();

            iTextSharp.text.Image LogoIcon = iTextSharp.text.Image.GetInstance(logobyte);
            LogoIcon.ScaleToFit(ScaleYukseklik, ScaleYukseklik);
            PdfPCell logocell = new PdfPCell(LogoIcon);

            logocell.Colspan = 1;
            //  logocell.FixedHeight = Yukseklik+20;
            logocell.Border = 0;
            logocell.HorizontalAlignment = Element.ALIGN_CENTER;
            logocell.VerticalAlignment   = Element.ALIGN_CENTER;
            table.AddCell(logocell);
        }