예제 #1
0
		private void CommonConstructor( iTextSharp.text.Rectangle pageSize, float marginLeft, float marginRight, float marginTop, float marginBottom, System.IO.Stream stream, string fontpath, BackgroundImageDefinition bImageDefinition  ){
			
			if(this.fontpath != null)this.fontpath = fontpath;
			
			this.margin_left = marginLeft;
			this.margin_right = marginRight;
			this.margin_top = marginTop;
			this.margin_bottom = marginBottom;
			this.pageSize = pageSize;
			
			this._backgroundImage = bImageDefinition;
			
			_pdfDoc = new iTextSharp.text.Document(pageSize, margin_left, margin_right, margin_top, margin_bottom);
			_iPDFWriter = iTextSharp.text.pdf.PdfWriter.GetInstance(PdfDoc, stream);
			
			PdfDoc.Open();
			iPDFContent = PDFWriter.DirectContent;
			
			_init();
			initRow();
		}
예제 #2
0
		/// <summary>
		/// Store background image.
		/// </summary>
		/// <param name="backgroundImage"></param>
		public void SetBackgroundImage(BackgroundImageDefinition backgroundImage)
		{
			this._backgroundImage = backgroundImage;
			DrawBackgroundImage();
		}