public GetBottom ( float margin ) : float | ||
margin | float | a margin |
Résultat | float |
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); float effectiveStrWidthFirstPart = 0.0f; int pageN = writer.PageNumber; String text = "Page " + pageN.ToString() + " of "; Console.WriteLine("###-->> OnEndPageText = " + text); float len = 10.5f; iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(BaseFont.CreateFont(), 10.5f); cb.SetTextMatrix(document.LeftMargin, pageSize.GetBottom(document.BottomMargin - 10)); cb.ShowText(text); effectiveStrWidthFirstPart = cb.GetEffectiveStringWidth(text, true); Console.WriteLine("###-->> Effective Str Width (first part) = " + effectiveStrWidthFirstPart); cb.EndText(); cb.AddTemplate(template, document.LeftMargin + len, pageSize.GetBottom(document.BottomMargin - 10)); }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); //x/total x pages 第X页/共X页 int pageN = writer.PageNumber; //String text = "Page " + pageN.ToString() + " of "; String text = string.Format("Page {0}/total pages 第{0}页/共 页", CurrentPage.ToString()); //float len = BF_Light.GetWidthPoint(text, ContentFontSize); float len1 = BF_Light.GetWidthPoint("Page x/total ", ContentFontSize); float len2 = BF_Light.GetWidthPoint("Page x/total pages 第x页/共 ", ContentFontSize); iTextSharp.text.Rectangle pageSize = document.PageSize; //cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(BF_Light, ContentFontSize); //make page template in the middle, 90f is half of all length of page font cb.SetTextMatrix(document.PageSize.Width / 2 - 90f, pageSize.GetBottom(20f)); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, document.PageSize.Width / 2 - 90f + len1, pageSize.GetBottom(20f)); cb.AddTemplate(template, document.PageSize.Width / 2 - 90f + len2, pageSize.GetBottom(20f)); }
void IPdfPCellEvent.CellLayout(PdfPCell cell, iTextSharp.text.Rectangle position, PdfContentByte[] canvases) { PdfContentByte canvas = canvases[PdfPTable.TEXTCANVAS]; float x = 0; float y = 0; int alignment = 0; switch (pos) { case "TOP_LEFT": x = position.GetLeft(3); y = position.GetTop(content.Leading); alignment = Element.ALIGN_LEFT; break; case "TOP_RIGHT": x = position.GetRight(3); y = position.GetTop(content.Leading); alignment = Element.ALIGN_RIGHT; break; case "BOTTOM_LEFT": x = position.GetLeft(3); y = position.GetBottom(3); alignment = Element.ALIGN_LEFT; break; case "BOTTOM_RIGHT": x = position.GetRight(3); y = position.GetBottom(3); alignment = Element.ALIGN_RIGHT; break; case "CENTER_TOP": x = position.GetRight(3) + position.GetLeft(3) / 2; y = position.GetTop(3); alignment = Element.ALIGN_RIGHT; break; case "CENTER_BOTTOM": x = position.GetRight(3) + position.GetLeft(3) / 2; y = position.GetBottom(3); alignment = Element.ALIGN_RIGHT; break; case "CENTER_MIDDLE": x = position.GetRight(3) + position.GetLeft(3) / 2; y = x; alignment = Element.ALIGN_RIGHT; break; } ColumnText.ShowTextAligned(canvas, alignment, content, x, y, 0); }
/** * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[]) */ public void CellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) { float sp_left = spacing_left; if (float.IsNaN(sp_left)) { sp_left = 0f; } float sp_right = spacing_right; if (float.IsNaN(sp_right)) { sp_right = 0f; } float sp_top = spacing_top; if (float.IsNaN(sp_top)) { sp_top = 0f; } float sp_bottom = spacing_bottom; if (float.IsNaN(sp_bottom)) { sp_bottom = 0f; } Rectangle rect = new Rectangle(position.GetLeft(sp_left), position.GetBottom(sp_bottom), position.GetRight(sp_right), position.GetTop(sp_top)); rect.CloneNonPositionParameters(this); canvases[PdfPTable.BACKGROUNDCANVAS].Rectangle(rect); rect.BackgroundColor = null; canvases[PdfPTable.LINECANVAS].Rectangle(rect); }
/// <summary> /// Clears the contents of a given page leaving header and footer. /// </summary> /// <param name="inputPdf">The pdf to modify.</param> /// <param name="outputPdf">The pdf created after modification.</param> /// <param name="pageNum">The page number to be cleared.</param> public static void ClearContents(string inputPdf, string outputPdf, int pageNum) { using (FileStream fs = new FileStream(outputPdf, FileMode.Create, FileAccess.Write)) { PdfReader reader = new PdfReader(inputPdf); PdfStamper stamper = new PdfStamper(reader, fs); //Get the reactangle leaving header and footer Rectangle mediabox = reader.GetPageSize(pageNum); float llx = mediabox.GetLeft(10f); float urx = mediabox.GetRight(10f); float lly = mediabox.GetBottom(10f) + 100f; // Leave footer float ury = mediabox.GetTop(10f) - 120f; //Leave header List <PdfCleanUpLocation> cleanUpLocations = new List <PdfCleanUpLocation> { new PdfCleanUpLocation(pageNum, new iTextSharp.text.Rectangle(llx, lly, urx, ury), BaseColor.WHITE) }; //Use the PdfCleanUpProcessor to clean the page PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, stamper); cleaner.CleanUp(); stamper.Close(); reader.Close(); } }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); float footerTextSize = 14f; int pageN = writer.PageNumber; String Pagina = pageN.ToString() + " de "; float len = FontFactory.GetFont(FontFactory.HELVETICA).BaseFont.GetWidthPoint(Pagina, footerTextSize); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); //Add paging to header { EMPRESAEntity EMPRESATy = new EMPRESAEntity(); EMPRESAProvider EMPRESAP = new EMPRESAProvider(); EMPRESATy = EMPRESAP.Read(1); string Cabeçalho = EMPRESATy.NOMEFANTASIA + " " + EMPRESATy.CNPJCPF + " " + DateTime.Now.ToLongDateString(); cb.BeginText(); cb.SetFontAndSize(FontFactory.GetFont(FontFactory.HELVETICA).BaseFont, 14); cb.SetTextMatrix(document.LeftMargin + 55, document.PageSize.GetTop(45)); cb.ShowText(Cabeçalho); cb.EndText(); } //Titulo { cb.BeginText(); cb.SetFontAndSize(FontFactory.GetFont(FontFactory.HELVETICA).BaseFont, 14); cb.SetTextMatrix(document.LeftMargin + 55, document.PageSize.GetTop(60)); cb.ShowText(BmsSoftware.ConfigSistema1.Default.TituloRelatorio); //cb.ShowTextAligned(PdfContentByte.ALIGN_CENTER, BmsSoftware.ConfigSistema1.Default.TituloRelatorio, 250, 700, 0); cb.EndText(); } //Add paging to footer { cb.BeginText(); cb.SetFontAndSize(FontFactory.GetFont(FontFactory.HELVETICA).BaseFont, 14); cb.SetTextMatrix(document.LeftMargin + 1120, pageSize.GetBottom(document.BottomMargin + 8)); cb.ShowText(Pagina); cb.EndText(); cb.AddTemplate(template, document.LeftMargin + 1120 + len, pageSize.GetBottom(document.BottomMargin + 8)); } }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); BaseFont bf_qty = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, false); //int pageN = writer.PageNumber; //String text = "Page " + pageN.ToString(); String text = "Page " + 1 + " of "; float len = bf_qty.GetWidthPoint(text, 8); //float len = this.RunDateFont.BaseFont.GetWidthPoint(text, this.RunDateFont.Size); iTextSharp.text.Rectangle pageSize = document.PageSize; // cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); //Font font_qty = new Font(bf_qty, 10, Font.NORMAL); cb.SetFontAndSize(bf_qty, 10f); cb.SetTextMatrix(document.LeftMargin, pageSize.GetBottom(document.BottomMargin)); // cb.ShowText(text); cb.ShowTextAligned(PdfContentByte.ALIGN_RIGHT, "Printed On " + DateTime.Now.ToString(), pageSize.GetRight(40), pageSize.GetBottom(30), 0); cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, text, pageSize.GetLeft(40), pageSize.GetBottom(30), 0); cb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, "This is a Computer generated Invoice", pageSize.GetLeft(200), pageSize.GetBottom(30), 0); cb.EndText(); // cb.AddTemplate(template, document.LeftMargin, pageSize.GetBottom(document.BottomMargin)); cb.AddTemplate(template, pageSize.GetLeft(40) + len, pageSize.GetBottom(30)); }
// --------------------------------------------------------------------------- /** * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout( * com.lowagie.text.pdf.PdfPCell, * com.lowagie.text.Rectangle, * com.lowagie.text.pdf.PdfContentByte[] * ) */ public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] cb) { parent.AddKid(kid); kid.SetWidget( new Rectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)), PdfAnnotation.HIGHLIGHT_INVERT ); }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); int pageN = writer.PageNumber; String text = "Page " + pageN.ToString() + " of "; float len = this.RunDateFont.BaseFont.GetWidthPoint(text, this.RunDateFont.Size); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(this.RunDateFont.BaseFont, this.RunDateFont.Size); cb.SetTextMatrix(document.LeftMargin, pageSize.GetBottom(document.BottomMargin)); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, document.LeftMargin + len, pageSize.GetBottom(document.BottomMargin)); }
public override void OnEndPage(PdfWriter writer, Document document) { BaseFont bfTimes = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, false); iTextSharp.text.Font times = new iTextSharp.text.Font(bfTimes, 8f, iTextSharp.text.Font.NORMAL); base.OnEndPage(writer, document); Rectangle page = document.PageSize; int pageN = writer.PageNumber; String text = "Página " + pageN.ToString() + " de "; float len = bfTimes.GetWidthPoint(text, times.Size); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.BeginText(); cb.SetFontAndSize(bfTimes, times.Size); cb.SetTextMatrix(page.Width - document.RightMargin - (len + 10), pageSize.GetBottom(writer.PageSize.Bottom) + 10); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, page.Width - document.RightMargin - 10, pageSize.GetBottom(writer.PageSize.Bottom) + 10); }
// write on end of each page public override void OnEndPage(PdfWriter writer, Document document) { //Adiociona os direitos autorais na última página #region Footer base.OnEndPage(writer, document); PdfPTable footerTbl = new PdfPTable(1); footerTbl.WidthPercentage = 100f; footerTbl.TotalWidth = 1000f; footerTbl.HorizontalAlignment = 0; PdfPCell cell; footerTbl.DefaultCell.HorizontalAlignment = 0; footerTbl.WidthPercentage = 100; cell = new PdfPCell(new Phrase("Copyright © " + DateTime.Now.Year + " | Automasul ", new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.TIMES_ROMAN, 11, iTextSharp.text.Font.NORMAL, iTextSharp.text.BaseColor.BLACK))); cell.Border = 0; cell.Colspan = 1; cell.PaddingLeft = 0; cell.HorizontalAlignment = 0; footerTbl.AddCell(cell); footerTbl.WriteSelectedRows(0, -30, 230, 30, writer.DirectContent); base.OnEndPage(writer, document); int pageN = writer.PageNumber; String text = pageN.ToString(); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, BaseFont.NOT_EMBEDDED), 11F); cb.SetTextMatrix(document.RightMargin, pageSize.GetBottom(document.BottomMargin)); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, document.RightMargin + 0, pageSize.GetBottom(document.BottomMargin)); #endregion }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); string ARIALUNI_TFF = HttpContext.Current.Server.MapPath("~/fonts/ARIALUNI.TTF"); BaseFont bf = BaseFont.CreateFont(ARIALUNI_TFF, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED); int pageN = writer.PageNumber; string text = pageN.ToString() + "/"; float len = bf.GetWidthPoint(text, 9f); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(bf, 9); cb.SetTextMatrix(document.LeftMargin, pageSize.GetBottom(document.BottomMargin)); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, document.LeftMargin + len, pageSize.GetBottom(document.BottomMargin)); }
public void OnEndPage(iPdf.PdfWriter writer, iText.Document document) { iPdf.BaseFont helv = iPdf.BaseFont.CreateFont(iPdf.BaseFont.HELVETICA, iPdf.BaseFont.WINANSI, iPdf.BaseFont.NOT_EMBEDDED); iPdf.PdfContentByte cb = writer.DirectContent; int pageN = writer.PageNumber; string text = pageN.ToString(); iText.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(helv, 12); cb.SetTextMatrix(document.LeftMargin, pageSize.GetBottom(document.BottomMargin)); cb.ShowText(text); cb.EndText(); }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); int pageN = writer.PageNumber; String text = "Página " + pageN + "/"; float len = bf.GetWidthPoint(text, 8); Rectangle pageSize = document.PageSize; cb.SetRgbColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(bf, 8); cb.SetTextMatrix(pageSize.GetLeft(40), pageSize.GetBottom(30)); cb.ShowText(text); cb.EndText(); cb.AddTemplate(template, pageSize.GetLeft(40) + len, pageSize.GetBottom(30)); cb.BeginText(); cb.SetFontAndSize(bf, 8); cb.ShowTextAligned(PdfContentByte.ALIGN_RIGHT, "Fecha Impre.: " + PrintTime.ToString(), pageSize.GetRight(40), pageSize.GetBottom(30), 0); cb.EndText(); }
public override void OnEndPage(PdfWriter writer, Document document) { base.OnEndPage(writer, document); int pageN = writer.PageNumber; String text = msg + " Page " + pageN; float len = bf.GetWidthPoint(text, 8); iTextSharp.text.Rectangle pageSize = document.PageSize; cb.SetRGBColorFill(100, 100, 100); cb.BeginText(); cb.SetFontAndSize(bf, 8); cb.SetColorFill(iTextSharp.text.Color.BLACK); cb.ShowTextAligned(PdfContentByte.ALIGN_RIGHT, text, 570, 15, 0); cb.EndText(); cb.AddTemplate(template, pageSize.GetLeft(570) + len, pageSize.GetBottom(15)); }
/// <summary> /// Recreate the pdf with a Table of Contents at the given location. /// </summary> /// <param name="inputPdf">The pdf to read from.</param> /// <param name="outputPdf">The pdf created with the TOC.</param> /// <param name="pageTOC">Page number for TOC.</param> /// <param name="pageStart">Starting page for TOC.</param> /// <param name="pageEnd">Ending page for TOC.</param> public static void CreateTOC(string inputPdf, string outputPdf, int pageTOC, int pageStart, int pageEnd) { //Bind a reader to our input file using (PdfReader reader = new PdfReader(inputPdf)) { using (FileStream fs = new FileStream(outputPdf, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None)) { using (Document doc = new Document(reader.GetPageSizeWithRotation(1))) { PdfWriter writer = PdfWriter.GetInstance(doc, fs); doc.Open(); PdfContentByte cb = writer.DirectContentUnder; //Get the rectangle to copy and paste Rectangle mediabox = reader.GetPageSize(1); float llx = mediabox.GetLeft(0f); float lly = mediabox.GetBottom(0f); //Not working //TOCEvent evento = new TOCEvent(); //writer.PageEvent = evento; //Create the list of pageIndex manulally. List <PageIndex> toc = new List <PageIndex>(); for (int i = pageStart; i <= pageEnd; i++) { String text = GetContentsTextFromPage(inputPdf, i); toc.Add(new PageIndex() { Text = text, Name = text, Page = i }); } //Start copying the pdf for (int i = 1; i <= reader.NumberOfPages; i++) { if (i == pageTOC) //This is the TOC page. { //Add header and footer doc.NewPage(); PdfImportedPage page = writer.GetImportedPage(reader, i); cb.AddTemplate(page, llx, lly); //Create TOC Chunk dottedLine = new Chunk(new DottedLineSeparator()); // Change later for drawing with rectangle Paragraph gap = new Paragraph { "\n\n\n\n\n\n\n" }; doc.Add(gap); Paragraph p; foreach (PageIndex pageIndex in toc) { Chunk chunk = new Chunk(pageIndex.Text); chunk.SetAction(PdfAction.GotoLocalPage(pageIndex.Name, false)); p = new Paragraph(chunk) { dottedLine }; chunk = new Chunk(pageIndex.Page.ToString()); chunk.SetAction(PdfAction.GotoLocalPage(pageIndex.Name, false)); p.Add(chunk); doc.Add(p); } } else // other pages write { doc.NewPage(); PdfImportedPage page = writer.GetImportedPage(reader, i); cb.AddTemplate(page, llx, lly); } } } } } }
/** * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[]) */ virtual public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvases) { if (cellField == null || (fieldWriter == null && parent == null)) throw new ArgumentException(MessageLocalization.GetComposedMessage("you.have.used.the.wrong.constructor.for.this.fieldpositioningevents.class")); cellField.Put(PdfName.RECT, new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding))); if (parent == null) fieldWriter.AddAnnotation(cellField); else parent.AddKid(cellField); }
/** * @see com.lowagie.text.pdf.PdfPageEvent#onGenericTag(com.lowagie.text.pdf.PdfWriter, com.lowagie.text.Document, com.lowagie.text.Rectangle, java.lang.String) */ public override void OnGenericTag(PdfWriter writer, Document document, Rectangle rect, String text) { rect.Bottom = rect.Bottom - 3; PdfFormField field; genericChunkFields.TryGetValue(text, out field); if (field == null) { TextField tf = new TextField(writer, new Rectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding)), text); tf.FontSize = 14; field = tf.GetTextField(); } else { field.Put(PdfName.RECT, new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding))); } if (parent == null) writer.AddAnnotation(field); else parent.AddKid(field); }
/** * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[]) */ public void CellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) { float sp_left = spacing_left; if (float.IsNaN(sp_left)) sp_left = 0f; float sp_right = spacing_right; if (float.IsNaN(sp_right)) sp_right = 0f; float sp_top = spacing_top; if (float.IsNaN(sp_top)) sp_top = 0f; float sp_bottom = spacing_bottom; if (float.IsNaN(sp_bottom)) sp_bottom = 0f; Rectangle rect = new Rectangle(position.GetLeft(sp_left), position.GetBottom(sp_bottom), position.GetRight(sp_right), position.GetTop(sp_top)); rect.CloneNonPositionParameters(this); canvases[PdfPTable.BACKGROUNDCANVAS].Rectangle(rect); rect.BackgroundColor = null; canvases[PdfPTable.LINECANVAS].Rectangle(rect); }
public void AddPageNumber(string str, string displaytext) { byte[] bytes = File.ReadAllBytes(str); iTextSharp.text.Font blackFont = FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.NORMAL, BaseColor.BLACK); using (var stream = new MemoryStream()) { stream.Flush(); System.Windows.Forms.Application.DoEvents(); PdfReader reader = new PdfReader(bytes); PdfReader.unethicalreading = true; Paragraph p = new Paragraph(); Document doc = new Document(); using (PdfStamper stamper = new PdfStamper(reader, stream)) { System.Windows.Forms.Application.DoEvents(); //PdfContentByte canvas = stamper.GetOverContent(1); //iTextSharp.text.Rectangle size = reader.GetPageSizeWithRotation(1); int pages = reader.NumberOfPages; for (int i = 1; i <= pages; i++) { iTextSharp.text.Rectangle mediabox = reader.GetPageSize(i); float x, y; x = mediabox.Height; y = mediabox.Width; iTextSharp.text.Rectangle cropBox = reader.GetCropBox(i); cropBox.GetRectangle(y - 1000, x - 50); iTextSharp.text.Rectangle bottomRight = new iTextSharp.text.Rectangle(cropBox.GetRight(199), cropBox.Bottom, cropBox.Right, cropBox.GetBottom(18)); //TextField tf = new TextField(stamper.Writer, new iTextSharp.text.Rectangle(0, 0, 300, 100), displaytext); ////Change the orientation of the text //tf.Rotation = 0; EmptyTextBoxSimple(stamper, i, bottomRight, BaseColor.WHITE); ColumnText columnText = GenerateTextBox(stamper, i, bottomRight); columnText.AddText(new Phrase(displaytext.ToString(), blackFont)); columnText.Go(); } } bytes = stream.ToArray(); //stream.Flush(); } System.Threading.Thread.Sleep(200); File.WriteAllBytes(str, bytes); }
/// <summary> /// Returns the lower left y-coordinate, considering a given margin. /// </summary> /// <param name="margin">a margin</param> /// <returns>the lower left y-coordinate</returns> public float GetBottom(float margin) { return(pageSize.GetBottom(marginBottom + margin)); }
// Private Methods (4) private void addPrintDate(Rectangle pageSize, string printTime) { ColumnText.ShowTextAligned( canvas: _pdfContentByte, alignment: Element.ALIGN_RIGHT, phrase: _pdfRptFont.FontSelector.Process(printTime), x: pageSize.GetRight(40), y: pageSize.GetBottom(30), rotation: 0, runDirection: (int)_direction, arabicOptions: 0); }
/** * @see com.lowagie.text.pdf.PdfPCellEvent#cellLayout(com.lowagie.text.pdf.PdfPCell, com.lowagie.text.Rectangle, com.lowagie.text.pdf.PdfContentByte[]) */ public void CellLayout(PdfPCell cell, Rectangle rect, PdfContentByte[] canvases) { if (cellField == null || (fieldWriter == null && parent == null)) throw new ArgumentException("You have used the wrong constructor for this FieldPositioningEvents class."); cellField.Put(PdfName.RECT, new PdfRectangle(rect.GetLeft(padding), rect.GetBottom(padding), rect.GetRight(padding), rect.GetTop(padding))); if (parent == null) fieldWriter.AddAnnotation(cellField); else parent.AddKid(cellField); }