or



Imports iTextSharp.text.pdfImports System.IOImports iTextSharp.textPublic Class Form1 Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim document As New Document() Dim pdfStream As New MemoryStream() Dim pdfwriter As PdfWriter = pdfwriter.GetInstance(document, pdfStream) document.Open() Dim over As PdfContentByte = pdfwriter.DirectContent over.BeginText() 'Add logo. 'Dim imagelog As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(My.Resources.manalivelogo, System.Drawing.Imaging.ImageFormat.Jpeg) 'imagelog.ScalePercent(20) 'imagelog.Transparency = New Integer() {255, 255} 'imagelog.SetAbsolutePosition(25, 800) 'over.AddImage(imagelog) document.Add(New iTextSharp.text.Phrase("More sample text for signature demo")) Dim tr As BaseFont = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.WINANSI, BaseFont.EMBEDDED) Dim btr As BaseFont = BaseFont.CreateFont(BaseFont.TIMES_BOLD, BaseFont.WINANSI, BaseFont.EMBEDDED) over.SetFontAndSize(btr, 12) over.ShowTextAligned(iTextSharp.text.Element.ALIGN_MIDDLE, "2117 Maryland Avenue, Baltimore, MD 21218", 45, 780, 0) over.ShowTextAligned(iTextSharp.text.Element.ALIGN_MIDDLE, "Phone: 410-837-4892 Fax: 410-837-0639", 55, 768, 0) over.EndText() pdfwriter.CloseStream = False document.Close() pdfStream.Position = 0 RadPdfViewer1.LoadDocument(pdfStream) RadPdfViewer1.PrintPreview() End Sub




Private Sub GridView_RowFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) Handles GridView.RowFormatting Dim dataRow As Telerik.WinControls.UI.GridRowElement = e.RowElement If dataRow IsNot Nothing Then Try If dataRow.RowInfo.Tag IsNot Nothing Then If Is_Check_Some_Condition(dataRow.RowInfo.Tag) Then dataRow.ResetValue(Telerik.WinControls.UI.LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local) Else dataRow.ForeColor = Color.Blue End If End If Catch ex As Exception End Try End IfEnd Sub
