Exemplo n.º 1
0
        /// <summary>
        /// Insert the Image Object into the Document before placing it in a document page
        /// </summary>
        /// <param name="file">
        /// the Color 72dpi Jpeg Image to insert into the document
        /// </param>
        /// <returns>
        ///
        ///</returns>
        public PdfImage NewImage(string file)
        {
            PdfImage pi;

            try { pi = new PdfImage(this.GetNextId, file); }
            catch { throw new Exception("Error opening the Image File"); }
            this.AddPdfObject(pi);
            return(pi);
        }
Exemplo n.º 2
0
 /// <summary>
 /// adds a Pdf Element into this PdfPage.
 /// </summary>
 /// <param name="PdfImage"></param>
 /// <param name="posx">The target X positioning of the picture.</param>
 /// <param name="posy">The target Y positioning of the picture.</param>
 /// <param name="DPI">The target resolution of the picture.</param>
 public void Add(PdfImage PdfImage, double posx, double posy, double DPI)
 {
     if (DPI <= 0)
     {
         throw new Exception("DPI must be greater than zero.");
     }
     this.PagePdfObjects.Add(PdfImage);
     this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId, "I" + PdfImage.ID, PdfImage.ID, PdfImage.Width, PdfImage.Height, posx, this.PdfDocument.PH - posy, DPI));
 }
Exemplo n.º 3
0
		/// <summary>
		/// adds a Pdf Element into this PdfPage.
		/// </summary>
		/// <param name="PdfImage"></param>
		/// <param name="posx"></param>
		/// <param name="posy"></param>
		public void Add(PdfImage PdfImage,double posx,double posy)
		{
			this.PagePdfObjects.Add(PdfImage);
			this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId,"I"+PdfImage.ID,PdfImage.ID,PdfImage.Width,PdfImage.Height,posx,this.PdfDocument.PH-posy,PdfImage.bmp.HorizontalResolution));
		}
Exemplo n.º 4
0
		/// <summary>
		/// adds a Pdf Element into this PdfPage.
		/// </summary>
		/// <param name="PdfImage"></param>
		/// <param name="posx">The target X positioning of the picture.</param>
		/// <param name="posy">The target Y positioning of the picture.</param>
		/// <param name="DPI">The target resolution of the picture.</param>
		public void Add(PdfImage PdfImage,double posx,double posy,double DPI)
		{
			if (DPI<=0) throw new Exception("DPI must be greater than zero.");
			this.PagePdfObjects.Add(PdfImage);
			this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId,"I"+PdfImage.ID,PdfImage.ID,PdfImage.Width,PdfImage.Height,posx,this.PdfDocument.PH-posy,DPI));
		}
Exemplo n.º 5
0
		/// <summary>
		/// Insert the Image Object into the Document before placing it in a document page
		/// </summary>
		/// <param name="file">
		/// the Color 72dpi Jpeg Image to insert into the document
		/// </param>
		/// <returns>
		/// 
		///</returns>
		public PdfImage NewImage(string file)
		{
			PdfImage pi;
			try {pi=new PdfImage(this.GetNextId,file);}
			catch {throw new Exception("Error opening the Image File");}
			this.AddPdfObject(pi);
			return pi;
		}
Exemplo n.º 6
0
 /// <summary>
 /// adds a Pdf Element into this PdfPage.
 /// </summary>
 /// <param name="PdfImage"></param>
 /// <param name="posx"></param>
 /// <param name="posy"></param>
 public void Add(PdfImage PdfImage, double posx, double posy)
 {
     this.PagePdfObjects.Add(PdfImage);
     this.PagePdfObjects.Add(new PdfImageContent(PdfDocument.GetNextId, "I" + PdfImage.ID, PdfImage.ID, PdfImage.Width, PdfImage.Height, posx, this.PdfDocument.PH - posy, PdfImage.bmp.HorizontalResolution));
 }